<div dir="ltr">Sorry I can't give you the exact code but you want to get the primary template this was instantiated from (I think getTemplatedDecl returns it) and look at its argument.<br><br>On Thu, Apr 7, 2016 at 1:58 PM, slycelote via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>><br>> For example, in the program below RecursiveASTVisitor sees the template<br>> argument as the integer 6. How to get the actual expression "n+n"?<br>><br>> template<int m><br>> struct S {<br>> };<br>><br>> const int n = 3;<br>><br>> template<><br>> struct S<n+n> {<br>> };<br>><br>> int main() {<br>>     S<6> s;<br>> }<br>><br>><br>> --<br>> Sly.<br>><br>> _______________________________________________<br>> cfe-dev mailing list<br>> <a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></div>