<div dir="ltr">David - thanks for your suggestions, but no luck here. I had hoped for something like a isTemplateTypeParam() function in QualType, but no such luck. In many cases, if I do a getCanonicalType().getAsString() I get a "type-parameter-0-0" as a result. Though not always. I don't even always see "Type" returned if I do a getUnqualifiedType().getAsString(). I had hoped for a simple function call, as these template parameters seem like generic types.<div><br></div><div>Robert</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 17, 2020 at 11:58 AM via cfe-users <<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send cfe-users mailing list submissions to<br>
        <a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:cfe-users-request@lists.llvm.org" target="_blank">cfe-users-request@lists.llvm.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:cfe-users-owner@lists.llvm.org" target="_blank">cfe-users-owner@lists.llvm.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of cfe-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. How to determine if variable is templated?<br>
      (Robert Ankeney via cfe-users)<br>
   2. Re: How to determine if variable is templated?<br>
      (David Blaikie via cfe-users)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 16 Feb 2020 17:43:19 -0800<br>
From: Robert Ankeney via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
To: via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
Subject: [cfe-users] How to determine if variable is templated?<br>
Message-ID:<br>
        <<a href="mailto:CAJL6GZpyLBNx8iYDxNzZSxOBNf5_JAegE%2BWVxDW233Cvo-TF1w@mail.gmail.com" target="_blank">CAJL6GZpyLBNx8iYDxNzZSxOBNf5_JAegE+WVxDW233Cvo-TF1w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Suppose I have some code like:<br>
<br>
template<typename Type><br>
Type tVar;<br>
function(tVar);<br>
<br>
How can I determine that tVar is templated from the VarDecl or a<br>
MemberExpr? I don't see any obvious function in QualType or Type.<br>
<br>
Thanks,<br>
Robert<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/cfe-users/attachments/20200216/2a886f3a/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/cfe-users/attachments/20200216/2a886f3a/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 17 Feb 2020 09:28:51 -0800<br>
From: David Blaikie via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
To: Robert Ankeney <<a href="mailto:rrankene@gmail.com" target="_blank">rrankene@gmail.com</a>><br>
Cc: via cfe-users <<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>><br>
Subject: Re: [cfe-users] How to determine if variable is templated?<br>
Message-ID:<br>
        <<a href="mailto:CAENS6Evh8eyvO%2Bh4eZJU8GKdkXOXj7UzKT8BjYtY%2B2inhkD2QA@mail.gmail.com" target="_blank">CAENS6Evh8eyvO+h4eZJU8GKdkXOXj7UzKT8BjYtY+2inhkD2QA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Guessing these sort of functions would be relevant:<br>
<a href="https://clang.llvm.org/doxygen/classclang_1_1VarDecl.html#a617bcdd5baaab0ccba71a96cd9c2ed03" rel="noreferrer" target="_blank">https://clang.llvm.org/doxygen/classclang_1_1VarDecl.html#a617bcdd5baaab0ccba71a96cd9c2ed03</a><br>
<br>
On Sun, Feb 16, 2020 at 5:43 PM Robert Ankeney via cfe-users <<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>> wrote:<br>
<br>
> Suppose I have some code like:<br>
><br>
> template<typename Type><br>
> Type tVar;<br>
> function(tVar);<br>
><br>
> How can I determine that tVar is templated from the VarDecl or a<br>
> MemberExpr? I don't see any obvious function in QualType or Type.<br>
><br>
> Thanks,<br>
> Robert<br>
><br>
> _______________________________________________<br>
> cfe-users mailing list<br>
> <a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/cfe-users/attachments/20200217/fda6a48f/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/cfe-users/attachments/20200217/fda6a48f/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of cfe-users Digest, Vol 85, Issue 8<br>
****************************************<br>
</blockquote></div>