<div dir="ltr"><div>I am attempting to get the name of a CXXRecordDecl that I have identified with an AST matcher.  I am using Class->getName().str() to get the class name.</div><div><br></div><div>namespace N {<br>class SomeNonInterface {<br>
  virtual void func1() = 0;<br>  virtual void func2() {}<br>};</div><div>}</div><div><br></div><div>It works great for the above code.  Gives me "SomeNonInterface" as the name.</div><div><br></div><div>class N::BaseClass1 {<br>
public:<br>  BaseClass1(int i);<br>  BaseClass1(const BaseClass1 &right);<br>  virtual ~BaseClass1();<br>  BaseClass1 &operator=(const BaseClass1 &right);<br>};</div><div><br></div><div>For the above code it gives me "" as the name.</div>
<div><br></div><div>How would I get the class name so that it works in all cases, even if the name in the declaration/definition is namespace qualified?  Or...did I hit a case that isn't legal?</div></div>