================
@@ -390,29 +390,37 @@ bool Sema::isAcceptableNestedNameSpecifier(const
NamedDecl *SD,
/// (e.g., Base::), perform name lookup for that identifier as a
/// nested-name-specifier within the given scope, and return the result of that
/// name lookup.
-NamedDecl *Sema::FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS)
{
- if (!S || !NNS)
- return nullptr;
+bool Sema::LookupFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS,
+ UnresolvedSetImpl &R) {
+ if (!S)
+ return false;
while (NNS->getPrefix())
NNS = NNS->getPrefix();
- if (NNS->getKind() != NestedNameSpecifier::Identifier)
- return nullptr;
-
- LookupResult Found(*this, NNS->getAsIdentifier(), SourceLocation(),
- LookupNestedNameSpecifierName);
+ // FIXME: This is a rather nasty hack! Ideally we should get the results
----------------
mizvekov wrote:
I don't think this is a hack per se, I think this is just a consequence of not
having a special NNS kind for this situation, and representing it with a DTST.
The alternative that I see is to implement a new NNS prefix which is composed
by an identifier followed by template arguments.
It can still be represented internally with the type, if that's cheaper, but
having a special accessor, and making `NNS->getAsIdentifier()` work for it,
would be nicer.
https://github.com/llvm/llvm-project/pull/92957
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits