[PATCH] D13897: [AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 20 07:59:05 PDT 2015


bkramer created this revision.
bkramer added reviewers: klimek, sbenza.
bkramer added a subscriber: cfe-commits.
Herald added a subscriber: klimek.

Firstly this changes the type of parent map to be keyed on DynTypedNode to
simplify the following changes. This comes with a DenseMapInfo for
DynTypedNode, which is a bit incomplete still and will probably only work
for parentmap right now.

Then the RecursiveASTVisitor in ASTContext is updated and finally
ASTMatchers hasParent and hasAncestor learn about the new functionality.

Now ParentMap is only missing TemplateArgumentLocs and CXXCtorInitializers.

http://reviews.llvm.org/D13897

Files:
  include/clang/AST/ASTContext.h
  include/clang/AST/ASTTypeTraits.h
  include/clang/ASTMatchers/ASTMatchers.h
  include/clang/ASTMatchers/ASTMatchersInternal.h
  lib/AST/ASTContext.cpp
  lib/ASTMatchers/ASTMatchFinder.cpp
  unittests/AST/ASTContextParentMapTest.cpp
  unittests/ASTMatchers/Dynamic/ParserTest.cpp
  unittests/ASTMatchers/Dynamic/RegistryTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13897.37882.patch
Type: text/x-patch
Size: 15527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151020/baf311f9/attachment-0001.bin>


More information about the cfe-commits mailing list