We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37f978c commit 1acdfceCopy full SHA for 1acdfce
1 file changed
interpreter/cling/lib/Utils/AST.cpp
@@ -1501,7 +1501,15 @@ namespace utils {
1501
// No definition, no lookup result.
1502
return;
1503
}
1504
- S->LookupQualifiedName(R, const_cast<DeclContext*>(primaryWithin));
+ auto res =
1505
+ S->LookupQualifiedName(R, const_cast<DeclContext*>(primaryWithin));
1506
+
1507
+ // If the lookup fails and the context is a namespace, try to lookup in
1508
+ // the namespaces brought in by using directives.
1509
+ if (!res && primaryWithin->isNamespace())
1510
+ for (auto* UD : primaryWithin->using_directives())
1511
+ if (NamespaceDecl* NS = UD->getNominatedNamespace())
1512
+ res = S->LookupQualifiedName(R, NS);
1513
1514
1515
0 commit comments