[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)
Anutosh Bhat via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 26 06:02:15 PST 2025
================
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) {
RecoverErr = Interp->Parse("var1 = 424;");
EXPECT_TRUE(!!RecoverErr);
+
+ Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2; };").takeError();
----------------
anutosh491 wrote:
Hmmm @vgvassilev
Don't you think we should look at this from an error recovery perspective rather than something for lambdas ? If that's the case, the test is placed correctly.
The above test cause clang-repl to crash but should work if wrapped in a function or not presented as a top level decl.
https://github.com/llvm/llvm-project/pull/127467
More information about the cfe-commits
mailing list