[cfe-dev] How to get the AST of an expression serving as a template argument?

slycelote via cfe-dev cfe-dev at lists.llvm.org
Wed Apr 6 20:58:16 PDT 2016

For example, in the program below RecursiveASTVisitor sees the template
argument as the integer 6. How to get the actual expression "n+n"?

template<int m>
struct S {

const int n = 3;

struct S<n+n> {

int main() {
    S<6> s;


More information about the cfe-dev mailing list