<div dir="ltr">Hello,<div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"> </span>I have the following classes in the input to my clang analyzer checker:</div><br>namespace bases{<br>  class base0{<br>  int x;<br>  ....};<br>  <br>  template <class T><br>  class base1{<div>     private:</div><div>     int x;</div><div>     public:</div><div>      void print_member(){</div><div>         std::cout << x << std::endl;</div><div>    }<br>  };<br>  <br>  class derived : public base1<base0>{</div><div>  ...<br>  };<br><br>}<br><br>In my code in VisitRecordDecl(CXXRecordDecl decl) where decl is the declaration of class "derived" I iterate over the bases of derived as follows:<br> <br>for (CXXBaseSpecifier *it = decl->bases->begin(); it!=decl->bases_end(); it++){<br>   QualType qual_type = it->getType();<br>   std::cout << qual_type.getAsString();  <br>   }<br>   <br>   qual_type.getAsString() gives "base1<class bases::base 0>" for the base of bases::derived. How can I get the full qualified name bases::base1<class bases::base0>?<br>   <br> The same happens when the derived and base classes are defined in different namespaces.<br> <br> For example<br> <br> using namespace bases;<br> namespace bases2{<br>   class derived2 : public base1<base0><br>      <br> }<br><br> I still get only base1<class bases::base0> instead of bases::base1<class bases::base0>.<br> Note that for the template argument the full qualified name is given.<br> <br><div> ***The problem happens only when the base is a template. ***<br></div></div><div>Any idea how to solve this?</div><div>Thanks,</div><div>Sitvanit</div></div>