[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-11 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: lib/Sema/SemaLambda.cpp:1491 else diag << From.getVariable(); diag << From.isNonODRUsed(); dim wrote: > Just for sanity's sake, I would still put an assert here, that > `getVariable()` does not

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-11 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320396: [Sema] Fix crash in unused-lambda-capture warning for VLAs (authored by malcolm.parsons). Repository: rL LLVM https://reviews.llvm.org/D41016 Files: cfe/trunk/include/clang/Sema/ScopeInfo.h

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-11 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 126394. malcolm.parsons marked an inline comment as done. malcolm.parsons added a comment. Add assert. Repository: rC Clang https://reviews.llvm.org/D41016 Files: include/clang/Sema/ScopeInfo.h lib/Sema/SemaLambda.cpp

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rC Clang https://reviews.llvm.org/D41016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-08 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. For the rest, LGTM. It fixes the segfault, for both the full original test case, and my reduced version. Comment at: lib/Sema/SemaLambda.cpp:1491 else diag <<

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-08 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons created this revision. Herald added a subscriber: cfe-commits. Clang was crashing when diagnosing an unused-lambda-capture for a VLA because From.getVariable() is null for the capture of a VLA bound. Warning about the VLA bound capture is not helpful, so only warn for the VLA