File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -912,7 +912,8 @@ Bug Fixes to C++ Support
912
912
between the addresses of two labels (a GNU extension) to a pointer within a constant expression. (#GH95366).
913
913
- Fix immediate escalation bugs in the presence of dependent call arguments. (#GH94935)
914
914
- Clang now diagnoses explicit specializations with storage class specifiers in all contexts.
915
-
915
+ - Fix an assertion failure caused by parsing a lambda used as a default argument for the value of a
916
+ forward-declared class. (#GH93512).
916
917
917
918
Bug Fixes to AST Handling
918
919
^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -3355,7 +3355,7 @@ Sema::NamedReturnInfo Sema::getNamedReturnInfo(const VarDecl *VD) {
3355
3355
3356
3356
// Variables with higher required alignment than their type's ABI
3357
3357
// alignment cannot use NRVO.
3358
- if (!VD->hasDependentAlignment () &&
3358
+ if (!VD->hasDependentAlignment () && !VDType-> isIncompleteType () &&
3359
3359
Context.getDeclAlign (VD) > Context.getTypeAlignInChars (VDType))
3360
3360
Info.S = NamedReturnInfo::MoveEligible;
3361
3361
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2
+
3
+ struct a ; // expected-note {{forward declaration of 'a'}} \
4
+ expected-note {{forward declaration of 'a'}}
5
+ void b (a c = [] { return c; }); // expected-error {{initialization of incomplete type 'a'}} \
6
+ expected-error {{variable has incomplete type 'a'}}
You can’t perform that action at this time.
0 commit comments