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

Malcolm Parsons via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 11 10:00:37 PST 2017

malcolm.parsons added inline comments.

Comment at: lib/Sema/SemaLambda.cpp:1491
     diag << From.getVariable();
   diag << From.isNonODRUsed();
dim wrote:
> Just for sanity's sake, I would still put an assert here, that `getVariable()` does not return `nullptr`.  That might catch similar issues in the future.  (And it is better than a segfault... :) )
I'm adding an assert to `getVariable()` instead.

  rC Clang


More information about the cfe-commits mailing list