[PATCH] Add isSpecific matcher for builtin types.

Manuel Klimek klimek at google.com
Wed Feb 19 01:47:40 PST 2014


On Wed, Feb 19, 2014 at 10:43 AM, Peter Collingbourne <peter at pcc.me.uk>wrote:

> None other than that I wasn't aware of it at the time. (When i was writing
> my matcher in clang-query i was trying to complete a type matcher, and
> clang-query didn't show it as a type completion. Probably a clang-query bug
> but personally I think we need to do something about the distinction
> between type and qualtype matchers.) You can decline this patch if you like
> or I'll do it tomorrow.
>

Ah, yes, the type -> qualtype thing is something we need to build into the
dynamic matchers, methinks; basically, there's some automagic conversions
going on that we need to explicitly model.


>
>
> On February 19, 2014 12:45:45 AM PST, Manuel Klimek <klimek at google.com>
> wrote:
>>
>>
>>
>> ================
>> Comment at: include/clang/ASTMatchers/ASTMatchers.h:2917
>> @@ +2916,3 @@
>> +///   matches "float b"
>> +AST_MATCHER_P(BuiltinType, isSpecific, std::string, Name) {
>> +  PrintingPolicy PP((LangOptions()));
>> ----------------
>> a specific reason that "asString" doesn't already support your use case? (perhaps with adding an "isBuiltin" matcher)
>>
>>
>> http://llvm-reviews.chandlerc.com/D2823
>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140219/bbc2f91a/attachment.html>


More information about the cfe-commits mailing list