]> granicus.if.org Git - clang/commit
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)
commitff9a01000ff74a994aa3da26ea2ec732c97291b7
treeb979e136b99083c2f2e8e1a47e919b15c2cfd93b
parenta4d4621b206f941cc58d9d0bc7c67a8e705c9d49
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176251 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTContext.h
include/clang/AST/ASTTypeTraits.h [moved from include/clang/ASTMatchers/ASTTypeTraits.h with 95% similarity]
include/clang/ASTMatchers/ASTMatchersInternal.h
lib/ASTMatchers/ASTMatchFinder.cpp
unittests/AST/ASTContextParentMapTest.cpp [new file with mode: 0644]
unittests/AST/CMakeLists.txt
unittests/AST/MatchVerifier.h