First step towards adding a parent map to the ASTContext.
authorManuel Klimek <klimek@google.com>
Thu, 28 Feb 2013 13:21:39 +0000 (13:21 +0000)
committerManuel Klimek <klimek@google.com>
Thu, 28 Feb 2013 13:21:39 +0000 (13:21 +0000)
commitd4be4084b4c35f8a872eea88fa0184a760b1754b
tree74bd96c2ee715afe3eaaca1de7e7068aab5e6646
parentabebb5727216bcf09bc616ac780a20b33f5b18fd
First step towards adding a parent map to the ASTContext.

This does not yet implement the LimitNode approach discussed.

The impact of this is an O(n) in the number of nodes in the AST
reduction of complexity for certain kinds of matchers (as otherwise the
parent map gets recreated for every new MatchFinder).

See FIXMEs in the comments for the direction of future work.

llvm-svn: 176251
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/ASTTypeTraits.h [moved from clang/include/clang/ASTMatchers/ASTTypeTraits.h with 95% similarity]
clang/include/clang/ASTMatchers/ASTMatchersInternal.h
clang/lib/ASTMatchers/ASTMatchFinder.cpp
clang/unittests/AST/ASTContextParentMapTest.cpp [new file with mode: 0644]
clang/unittests/AST/CMakeLists.txt
clang/unittests/AST/MatchVerifier.h