diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 3 | ||||
-rw-r--r-- | lib/Sema/SemaLambda.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index ca64af644f..62332b8b4a 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -3632,7 +3632,8 @@ void Sema::CheckCompletedCXXClass(CXXRecordDecl *Record) { // complain about any non-static data members of reference or const scalar // type, since they will never get initializers. if (!Record->isInvalidDecl() && !Record->isDependentType() && - !Record->isAggregate() && !Record->hasUserDeclaredConstructor()) { + !Record->isAggregate() && !Record->hasUserDeclaredConstructor() && + !Record->isLambda()) { bool Complained = false; for (RecordDecl::field_iterator F = Record->field_begin(), FEnd = Record->field_end(); diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp index 033bf4ab3c..776d27a364 100644 --- a/lib/Sema/SemaLambda.cpp +++ b/lib/Sema/SemaLambda.cpp @@ -29,7 +29,7 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, // Start constructing the lambda class. CXXRecordDecl *Class = CXXRecordDecl::Create(Context, TTK_Class, DC, Intro.Range.getBegin(), - /*IdLoc=*/SourceLocation(), + /*IdLoc=*/Intro.Range.getBegin(), /*Id=*/0); Class->startDefinition(); Class->setLambda(true); |