[cfe-dev] Checking whether a particular using namespace statement qualifies something.

nikanick nikanick at fb.com
Wed Jun 17 17:45:59 PDT 2015


Hello!
What is the best way to check whether a particular 'using namespace'
statement qualifies something or not?
So far I've tried to get the canonical type from a QualType of a
declaration, but it fails on this example:

namespace X {
  struct klassX {};
}
namespace A {
  typedef X::klassX klassA;
}
using namespace A;
int main() {
  klassA* p = 0;
  return 0;
}

Here canonical type for p is 'struct X::klassX'. So, is there a way to
directly get the using namespace statements responsible for a declaration or
a function call.
Thank you!



--
View this message in context: http://clang-developers.42468.n3.nabble.com/Checking-whether-a-particular-using-namespace-statement-qualifies-something-tp4046094.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list