[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
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 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.
Repository:
rC Clang
https://reviews.llvm.org/D41016
More information about the cfe-commits
mailing list