HomePhabricator

Fix crash-on-invalid-code in lambda constant evaluation.

Authored by jyknight on Dec 3 2019, 8:32 PM.

Description

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.

Details

Committed
jyknightDec 4 2019, 12:12 PM
Parents
rG975a43512709: [OPENMP]Update list of implemented features, NFC.
Branches
Unknown
Tags
Unknown