diff options
author | Kazu Hirata <kazu@google.com> | 2023-06-13 00:24:40 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-06-13 00:24:40 -0700 |
commit | ee72e2b3939a82a29345c7e53929a3a769a78735 (patch) | |
tree | 8f2a3a2ee0fbf1b6601763d12394a3d3daca8435 /clang/lib | |
parent | 8876220948e6a63c2d5f1121c769d5524125d542 (diff) | |
download | llvm-ee72e2b3939a82a29345c7e53929a3a769a78735.zip llvm-ee72e2b3939a82a29345c7e53929a3a769a78735.tar.gz llvm-ee72e2b3939a82a29345c7e53929a3a769a78735.tar.bz2 |
[Sema] Remove unused isNonTypeNestedNameSpecifier
The last use was removed by:
commit 04f131da0b19abff611773c03be9bafb53c753ce
Author: Richard Smith <richard@metafoo.co.uk>
Date: Fri Jan 24 15:14:25 2020 -0800
Differential Revision: https://reviews.llvm.org/D152634
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaCXXScopeSpec.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/clang/lib/Sema/SemaCXXScopeSpec.cpp b/clang/lib/Sema/SemaCXXScopeSpec.cpp index b11f4f1..f37ba5c 100644 --- a/clang/lib/Sema/SemaCXXScopeSpec.cpp +++ b/clang/lib/Sema/SemaCXXScopeSpec.cpp @@ -415,51 +415,6 @@ NamedDecl *Sema::FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS) { return nullptr; } -bool Sema::isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS, - NestedNameSpecInfo &IdInfo) { - QualType ObjectType = GetTypeFromParser(IdInfo.ObjectType); - LookupResult Found(*this, IdInfo.Identifier, IdInfo.IdentifierLoc, - LookupNestedNameSpecifierName); - - // Determine where to perform name lookup - DeclContext *LookupCtx = nullptr; - bool isDependent = false; - if (!ObjectType.isNull()) { - // This nested-name-specifier occurs in a member access expression, e.g., - // x->B::f, and we are looking into the type of the object. - assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist"); - LookupCtx = computeDeclContext(ObjectType); - isDependent = ObjectType->isDependentType(); - } else if (SS.isSet()) { - // This nested-name-specifier occurs after another nested-name-specifier, - // so long into the context associated with the prior nested-name-specifier. - LookupCtx = computeDeclContext(SS, false); - isDependent = isDependentScopeSpecifier(SS); - Found.setContextRange(SS.getRange()); - } - - if (LookupCtx) { - // Perform "qualified" name lookup into the declaration context we - // computed, which is either the type of the base of a member access - // expression or the declaration context associated with a prior - // nested-name-specifier. - - // The declaration context must be complete. - if (!LookupCtx->isDependentContext() && - RequireCompleteDeclContext(SS, LookupCtx)) - return false; - - LookupQualifiedName(Found, LookupCtx); - } else if (isDependent) { - return false; - } else { - LookupName(Found, S); - } - Found.suppressDiagnostics(); - - return Found.getAsSingle<NamespaceDecl>(); -} - namespace { // Callback to only accept typo corrections that can be a valid C++ member |