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
912912 between the addresses of two labels (a GNU extension) to a pointer within a constant expression. (#GH95366).
913913- Fix immediate escalation bugs in the presence of dependent call arguments. (#GH94935)
914914- 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).
916917
917918Bug Fixes to AST Handling
918919^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -3355,7 +3355,7 @@ Sema::NamedReturnInfo Sema::getNamedReturnInfo(const VarDecl *VD) {
33553355
33563356 // Variables with higher required alignment than their type's ABI
33573357 // alignment cannot use NRVO.
3358- if (!VD->hasDependentAlignment () &&
3358+ if (!VD->hasDependentAlignment () && !VDType-> isIncompleteType () &&
33593359 Context.getDeclAlign (VD) > Context.getTypeAlignInChars (VDType))
33603360 Info.S = NamedReturnInfo::MoveEligible;
33613361
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