[cfe-commits] [PATCH] Matchers for Types, QualTypes and TypeLocs

Daniel Jasper reviews at llvm-reviews.chandlerc.com
Thu Sep 20 09:58:10 PDT 2012


Hi klimek, chandlerc, rsmith, mdiamond,

Not polished for submitting yet, but a basis for discussions.

Main question: The patch allows an implicit conversion from Matcher<Type> to Matcher<QualType>, which is probably a good idea.

It is currently implemented to be strict, i.e. the generated Matcher<QualType> only matches QualTypes without qualifiers. After initial discussions it seemed like this would be closer to the AST model. However, it leads to some bad and unintuitive things (see tests for a few examples). Maybe we should reconsider?

http://llvm-reviews.chandlerc.com/D47

Files:
  include/clang/ASTMatchers/ASTMatchFinder.h
  include/clang/ASTMatchers/ASTMatchers.h
  include/clang/ASTMatchers/ASTMatchersInternal.h
  include/clang/ASTMatchers/ASTMatchersMacros.h
  include/clang/ASTMatchers/ASTTypeTraits.h
  lib/ASTMatchers/ASTMatchFinder.cpp
  unittests/ASTMatchers/ASTMatchersTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47.1.patch
Type: text/x-patch
Size: 20158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120920/038fc887/attachment.bin>


More information about the cfe-commits mailing list