[clang] [clang-repl] Remove invalid TopLevelStmtDecl from TU on parse failure (PR #153945)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 18 05:20:29 PDT 2025
================
@@ -91,6 +93,53 @@ TEST_F(InterpreterTest, IncrementalInputTopLevelDecls) {
EXPECT_EQ("var2", DeclToString(*R2DeclRange.begin()));
}
+TEST_F(InterpreterTest, BadIncludeDoesNotCorruptTU) {
----------------
vgvassilev wrote:
Can you try to `.undo` a `TopLevelStmtDecl` instead and check if it triggers the same issue?
https://github.com/llvm/llvm-project/pull/153945
More information about the cfe-commits
mailing list