diff options
author | James Y Knight <jyknight@google.com> | 2019-12-03 23:32:57 -0500 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2019-12-04 15:12:17 -0500 |
commit | 90fce46fa6c9ccec86f642be0a75da2d0a5b11c1 (patch) | |
tree | 14959e616a4d695f876942bac5e44ac0d3334933 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 975a43512709a9e989dea11d2fefab9212e3a4f4 (diff) | |
download | llvm-90fce46fa6c9ccec86f642be0a75da2d0a5b11c1.zip llvm-90fce46fa6c9ccec86f642be0a75da2d0a5b11c1.tar.gz llvm-90fce46fa6c9ccec86f642be0a75da2d0a5b11c1.tar.bz2 |
Fix crash-on-invalid-code in lambda constant evaluation.
If the lambda used 'this' without without capturing it, an error was
emitted, but the constant evaluator would still attempt to lookup the
capture, and failing to find it, dereference a null pointer.
This only happens in C++17 (as that's when lambdas were made
potentially-constexpr). Therefore, I also updated the
lambda-expressions.cpp test to run in both C++14 and C++17 modes.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions