Displaying 1 result from an estimated 1 matches for "getqualifiednameasstring".
[LLVMdev] Correct way to test if a declaration is within the scope of a namespace (anonymous or not)
2012 Nov 27
0
[LLVMdev] Correct way to test if a declaration is within the scope of a namespace (anonymous or not)
Hi all,
I'm trying to test if a declaration is within the scope of a namespace
(anonymous or not).
Actually I'm using this code to test this (it's just a hack I know).
What is the correct way to do this?
if (ND->getQualifiedNameAsString().find("::") != std::string::npos) {
ND is defined in a namespace
}
ND is a DeclaratorDeck*
Many thanks in advance.
Best regards.