How to print(or dump) a function with qualified name

Hi all,

  1. I’m doing some src-to-src transformation and now want to print a function decl. But the Decl::print() or Decl::dump() don’t print qualifiers.

For example, a method defined outside the class :

int ClassName::Method() {}

is printed as

int Method(){}

How can I print it with “ClassName::” ?

I know getQualifiedNameAsString() can get the full name, but I need to add other trivial things like return type, parmvars, template info all by myself, not a good plan.

  1. Another minor case, the ConditionVariableDeclStmt of a condition expression is not printed correctly, eg.

if(T t=x) {}

is printed as

if(t) {}

Maybe it needs a tiny patch.

I’m using clang 3.1 release.

Thank you.

Best Regards,

wolf5x(Qingquan Zhang)