diff options
author | Alexander Kornienko <alexfh@google.com> | 2016-04-14 00:47:40 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2016-04-14 00:47:40 +0000 |
commit | a8b8cfa73d9152e59b49af53a9a243ac4d50aca8 (patch) | |
tree | 988a9c6faa831ef388860b3854b2831580adf365 /unittests/ASTMatchers/Dynamic | |
parent | e1d7b3bd4c2f9d0866ca7eaa4178a0c06815b607 (diff) |
Reorder ASTNodeKind::AllKindInfo to match NodeKindId.
Summary:
AllKindInfo is being indexed by NodeKindId, so the order must match.
Extended ASTTypeTraits tests to cover this.
Reviewers: sbenza
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D19059
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ASTMatchers/Dynamic')
-rw-r--r-- | unittests/ASTMatchers/Dynamic/ParserTest.cpp | 2 | ||||
-rw-r--r-- | unittests/ASTMatchers/Dynamic/RegistryTest.cpp | 17 |
2 files changed, 9 insertions, 10 deletions
diff --git a/unittests/ASTMatchers/Dynamic/ParserTest.cpp b/unittests/ASTMatchers/Dynamic/ParserTest.cpp index 81373dab96..553427c9a4 100644 --- a/unittests/ASTMatchers/Dynamic/ParserTest.cpp +++ b/unittests/ASTMatchers/Dynamic/ParserTest.cpp @@ -320,7 +320,7 @@ TEST(ParserTest, CompletionNamedValues) { EXPECT_EQ("arent(", Comps[2].TypedText); EXPECT_EQ( "Matcher<Decl> " - "hasParent(Matcher<TemplateArgument|NestedNameSpecifierLoc|Decl|...>)", + "hasParent(Matcher<NestedNameSpecifierLoc|TypeLoc|Decl|...>)", Comps[2].MatcherDecl); } diff --git a/unittests/ASTMatchers/Dynamic/RegistryTest.cpp b/unittests/ASTMatchers/Dynamic/RegistryTest.cpp index 3b0bd51ec9..6bbbc2bd35 100644 --- a/unittests/ASTMatchers/Dynamic/RegistryTest.cpp +++ b/unittests/ASTMatchers/Dynamic/RegistryTest.cpp @@ -449,26 +449,25 @@ TEST_F(RegistryTest, Completion) { // Overloaded EXPECT_TRUE(hasCompletion( Comps, "hasParent(", - "Matcher<TemplateArgument|NestedNameSpecifierLoc|Decl|...> " - "hasParent(Matcher<TemplateArgument|NestedNameSpecifierLoc|Decl|...>)")); + "Matcher<NestedNameSpecifierLoc|TypeLoc|Decl|...> " + "hasParent(Matcher<NestedNameSpecifierLoc|TypeLoc|Decl|...>)")); // Variadic. EXPECT_TRUE(hasCompletion(Comps, "whileStmt(", "Matcher<Stmt> whileStmt(Matcher<WhileStmt>...)")); // Polymorphic. EXPECT_TRUE(hasCompletion( Comps, "hasDescendant(", - "Matcher<TemplateArgument|NestedNameSpecifier|NestedNameSpecifierLoc|...>" - " hasDescendant(Matcher<TemplateArgument|NestedNameSpecifier|" - "NestedNameSpecifierLoc|...>)")); + "Matcher<NestedNameSpecifierLoc|QualType|TypeLoc|...> " + "hasDescendant(Matcher<NestedNameSpecifierLoc|QualType|TypeLoc|...>)")); CompVector WhileComps = getCompletions("whileStmt", 0); EXPECT_TRUE(hasCompletion(WhileComps, "hasBody(", "Matcher<WhileStmt> hasBody(Matcher<Stmt>)")); - EXPECT_TRUE(hasCompletion(WhileComps, "hasParent(", - "Matcher<Stmt> " - "hasParent(Matcher<TemplateArgument|" - "NestedNameSpecifierLoc|Decl|...>)")); + EXPECT_TRUE(hasCompletion( + WhileComps, "hasParent(", + "Matcher<Stmt> " + "hasParent(Matcher<NestedNameSpecifierLoc|TypeLoc|Decl|...>)")); EXPECT_TRUE( hasCompletion(WhileComps, "allOf(", "Matcher<T> allOf(Matcher<T>...)")); |