AllKindInfo is being indexed by NodeKindId, so the order must match.
I've updated the tests, though I'm not sure what exactly they verify and whether
the new state of the tests makes sense ;)
I can add dedicated tests for this change, if needed.
Paths
| Differential D19059
Reorder ASTNodeKind::AllKindInfo to match NodeKindId. ClosedPublic Authored by alexfh on Apr 13 2016, 8:12 AM.
Details Summary AllKindInfo is being indexed by NodeKindId, so the order must match. I can add dedicated tests for this change, if needed.
Diff Detail Event Timelinealexfh updated this object. Comment Actions Those tests are testing the code completion you get in clang-query. hasParent is declared as const internal::ArgumentAdaptingMatcherFunc< internal::HasParentMatcher, internal::TypeList<Decl, NestedNameSpecifierLoc, Stmt, TypeLoc>, internal::TypeList<Decl, NestedNameSpecifierLoc, Stmt, TypeLoc>> LLVM_ATTRIBUTE_UNUSED hasParent = {}; so the completion message is correct now.
This revision is now accepted and ready to land.Apr 13 2016, 8:45 AM Closed by commit rL266268: Reorder ASTNodeKind::AllKindInfo to match NodeKindId. (authored by alexfh). · Explain WhyApr 13 2016, 5:53 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 53569 lib/AST/ASTTypeTraits.cpp
unittests/AST/ASTTypeTraitsTest.cpp
unittests/ASTMatchers/Dynamic/ParserTest.cpp
unittests/ASTMatchers/Dynamic/RegistryTest.cpp
|
Add a derived Decl type too.
You added one for Stmt and Type, but not for Decl.