]> granicus.if.org Git - clang/commit
Introduces DynTypedMatcher as a new concept that replaces the UntypedBaseMatcher...
authorManuel Klimek <klimek@google.com>
Wed, 5 Sep 2012 12:12:07 +0000 (12:12 +0000)
committerManuel Klimek <klimek@google.com>
Wed, 5 Sep 2012 12:12:07 +0000 (12:12 +0000)
commita78d0d6203a990b88c9c3e4c4f2a277001e8bd46
tree191c87f69873454078c7367bd9beaadac854f52c
parent3d35a547584da3b4403552cfa9899e51ee3d8283
Introduces DynTypedMatcher as a new concept that replaces the UntypedBaseMatcher and TypedMatcher.

Due to DynTypedNode the basic dynamically typed matcher interface can now be simplified.

Also switches the traversal interfaces to use DynTypedNode;
this is in preperation for the hasAncestor implementation, and
also allows us to need fewer changes when we want to add new
nodes to traverse, thus making the code a little more decoupled.

Main design concerns: I went back towards the original design
of getNodeAs to return a pointer, and switched DynTypedNode::get
to always return a pointer (in case of value types like QualType
the pointer points into the storage of DynTypedNode, thus allowing
us to treat all the nodes the same from the point of view of a
user of the DynTypedNodes.

Adding the QualType implementation for DynTypedNode was needed
for the recursive traversal interface changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163212 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/ASTMatchFinder.h
include/clang/ASTMatchers/ASTMatchers.h
include/clang/ASTMatchers/ASTMatchersInternal.h
include/clang/ASTMatchers/ASTTypeTraits.h
lib/ASTMatchers/ASTMatchFinder.cpp
unittests/ASTMatchers/ASTMatchersTest.cpp