[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-09-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342194: [Sema] Remove location from implicit capture init expr (authored by vedantk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D50927?vs=

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-09-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342194: [Sema] Remove location from implicit capture init expr (authored by vedantk, committed by ). Changed prior to commit: https://reviews.llvm.org/D50927?vs=162918&id=165400#toc Repository: rL LL

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/SemaLambda.cpp:1422-1424 auto Entity = InitializedEntity::InitializeLambdaCapture( Var->getIdentifier(), Field->getType(), Loc); I

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-28 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1422-1424 auto Entity = InitializedEntity::InitializeLambdaCapture( Var->getIdentifier(), Field->getType(), Loc); InitializationKind InitKind = InitializationKind::CreateDirect(Loc, Loc, Loc);

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-28 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 162918. vsk marked 2 inline comments as done. vsk added a comment. Address the latest round of review feedback. https://reviews.llvm.org/D50927 Files: clang/lib/Sema/SemaLambda.cpp clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp clang/test/CXX/expr

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1422-1424 auto Entity = InitializedEntity::InitializeLambdaCapture( Var->getIdentifier(), Field->getType(), Loc); InitializationKind InitKind = InitializationKind::CreateDirect(Loc, Loc, Loc); -

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-27 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 162764. vsk added a comment. - Partially address some of @rsmith's feedback. Instead of using the capture default location, I used the beginning location of the capture list. This results in smoother single-stepping when those two locations are on different lin

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-27 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:10689 - S.DiagRuntimeBehavior(DRE->getBeginLoc(), DRE, + S.DiagRuntimeBehavior(DRE->getBeginOrDeclLoc(), DRE, S.PDiag(diag) rsmith wrote: > I'm a bit surpr

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I would prefer that we use the location of the capture-default as the location of all the implicitly captured fields, rather than using an invalid location. Comment at: clang/lib/Sema/SemaDecl.cpp:10689 - S.DiagRuntimeBehavior(DRE->getBeginLoc(),

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-27 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D50927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-20 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 161536. vsk added a comment. - Here is a GIF that might help illustrate the bug: http://net.vedantk.com/static/llvm/lambda-implicit-capture-bug.gif - Update test/SemaCXX/uninitialized.cpp to highlight the behavior change which comes from using getBeginOrDeclLoc(

[PATCH] D50927: [Sema] Remove location from implicit capture init expr

2018-08-17 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. vsk added reviewers: rsmith, rtrieu, erichkeane. A lambda's closure is initialized when the lambda is declared. For implicit captures, the initialization code emitted from EmitLambdaExpr references source locations *within the lambda body* in the function containing the