diff options
Diffstat (limited to 'clang/unittests/Tooling/Syntax/TreeTest.cpp')
| -rw-r--r-- | clang/unittests/Tooling/Syntax/TreeTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Tooling/Syntax/TreeTest.cpp b/clang/unittests/Tooling/Syntax/TreeTest.cpp index c457c788812..42d77d89353 100644 --- a/clang/unittests/Tooling/Syntax/TreeTest.cpp +++ b/clang/unittests/Tooling/Syntax/TreeTest.cpp @@ -895,6 +895,9 @@ TEST_F(SyntaxTreeTest, Mutations) { auto *S = cast<syntax::Statement>(nodeByRange(Input.range(), TU)); ASSERT_TRUE(S->canModify()) << "cannot remove a statement"; syntax::removeStatement(*Arena, S); + EXPECT_TRUE(S->isDetached()); + EXPECT_FALSE(S->isOriginal()) + << "node removed from tree cannot be marked as original"; }; std::vector<std::pair<std::string /*Input*/, std::string /*Expected*/>> |

