diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-10-21 10:07:26 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-10-21 10:07:26 +0000 |
commit | e8c51fdbd6c74cfa07bc9fae089bc4587cb2226b (patch) | |
tree | 09ddff7de42fa6f9cfa6600b0739bc2b7b648b9e /clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp | |
parent | 7dacc242d90c98f74cb14d8e841e4a040e33bb81 (diff) | |
download | bcm5719-llvm-e8c51fdbd6c74cfa07bc9fae089bc4587cb2226b.tar.gz bcm5719-llvm-e8c51fdbd6c74cfa07bc9fae089bc4587cb2226b.zip |
Revert "[AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap."
Putting DynTypedNode in the ParentMap bloats its memory foot print.
Before the void* key had 8 bytes, now we're at 40 bytes per key which
can mean multiple gigabytes increase for large ASTs and this count
doesn't even include all the added TypeLoc nodes. Revert until I come
up with a better data structure.
This reverts commit r250831.
llvm-svn: 250889
Diffstat (limited to 'clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp')
-rw-r--r-- | clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp b/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp index 9b562bcc9df..ca1dfefd538 100644 --- a/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp +++ b/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp @@ -447,10 +447,8 @@ TEST_F(RegistryTest, Errors) { TEST_F(RegistryTest, Completion) { CompVector Comps = getCompletions(); // Overloaded - EXPECT_TRUE(hasCompletion(Comps, "hasParent(", - "Matcher<NestedNameSpecifierLoc|TypeLoc|Decl|...> " - "hasParent(Matcher<NestedNameSpecifierLoc|TypeLoc|" - "Decl|...>)")); + EXPECT_TRUE(hasCompletion( + Comps, "hasParent(", "Matcher<Decl|Stmt> hasParent(Matcher<Decl|Stmt>)")); // Variadic. EXPECT_TRUE(hasCompletion(Comps, "whileStmt(", "Matcher<Stmt> whileStmt(Matcher<WhileStmt>...)")); @@ -465,10 +463,8 @@ TEST_F(RegistryTest, Completion) { EXPECT_TRUE(hasCompletion(WhileComps, "hasBody(", "Matcher<WhileStmt> hasBody(Matcher<Stmt>)")); - EXPECT_TRUE(hasCompletion(WhileComps, "hasParent(", "Matcher<Stmt> " - "hasParent(Matcher<" - "NestedNameSpecifierLoc|" - "TypeLoc|Decl|...>)")); + EXPECT_TRUE(hasCompletion(WhileComps, "hasParent(", + "Matcher<Stmt> hasParent(Matcher<Decl|Stmt>)")); EXPECT_TRUE( hasCompletion(WhileComps, "allOf(", "Matcher<T> allOf(Matcher<T>...)")); |