diff options
author | Manuel Klimek <klimek@google.com> | 2013-06-07 11:27:53 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-06-07 11:27:53 +0000 |
commit | e29ec9680a6650b80cede7ecb68480283c41f1ff (patch) | |
tree | 6a71a7f2ee88a813e99702083129b0ab6357bd73 /clang/lib/Sema/SemaLambda.cpp | |
parent | f0ec19944860fb62cf02bfe816417802ad637e13 (diff) | |
download | bcm5719-llvm-e29ec9680a6650b80cede7ecb68480283c41f1ff.tar.gz bcm5719-llvm-e29ec9680a6650b80cede7ecb68480283c41f1ff.zip |
Reverts r183466: "Perform dynamic alignment computations..."
This introduces bugs in TemplateSpecializationTypeLoc's angle bracket
locations.
Regression test follows in a subsequent commit.
llvm-svn: 183513
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLambda.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp index 3402f220625..d647be37616 100644 --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -445,7 +445,6 @@ FieldDecl *Sema::checkInitCapture(SourceLocation Loc, bool ByRef, assert(!DeductType.isNull() && "can't build reference to auto"); TLB.push<ReferenceTypeLoc>(DeductType).setSigilLoc(Loc); } - TypeSourceInfo *TSI = TLB.getTypeSourceInfo(Context, DeductType); InitializationKind InitKind = InitializationKind::CreateDefault(Loc); Expr *Init = InitExpr; @@ -477,7 +476,8 @@ FieldDecl *Sema::checkInitCapture(SourceLocation Loc, bool ByRef, else InitKind = InitializationKind::CreateCopy(Loc, Loc); QualType DeducedType; - if (DeduceAutoType(TSI, Init, DeducedType) == DAR_Failed) { + if (DeduceAutoType(TLB.getTemporaryTypeLoc(DeductType), + Init, DeducedType) == DAR_Failed) { if (isa<InitListExpr>(Init)) Diag(Loc, diag::err_init_capture_deduction_failure_from_init_list) << Id << Init->getSourceRange(); @@ -492,7 +492,7 @@ FieldDecl *Sema::checkInitCapture(SourceLocation Loc, bool ByRef, // the closure type. This member is not a bit-field and not mutable. // Core issue: the member is (probably...) public. FieldDecl *NewFD = CheckFieldDecl( - Id, DeducedType, TSI, LSI->Lambda, + Id, DeducedType, TLB.getTypeSourceInfo(Context, DeductType), LSI->Lambda, Loc, /*Mutable*/ false, /*BitWidth*/ 0, ICIS_NoInit, Loc, AS_public, /*PrevDecl*/ 0, /*Declarator*/ 0); LSI->Lambda->addDecl(NewFD); |