diff options
author | Erik Verbruggen <erikjv@me.com> | 2011-09-19 15:10:40 +0000 |
---|---|---|
committer | Erik Verbruggen <erikjv@me.com> | 2011-09-19 15:10:40 +0000 |
commit | 24dd9ad9001d1aa16223de135d7e4ed34e94b207 (patch) | |
tree | 6f0eebafc007486c08989d567d8fcbbb111d80da | |
parent | b81d3012ff46e99c0373ef67b1481150a1dd8609 (diff) |
Removed an unused field and its accessors methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140017 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Sema/Lookup.h | 16 | ||||
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 9 | ||||
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 1 |
3 files changed, 3 insertions, 23 deletions
diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h index ce762b87f2..71b996a156 100644 --- a/include/clang/Sema/Lookup.h +++ b/include/clang/Sema/Lookup.h @@ -294,18 +294,6 @@ public: return NamingClass != 0; } - /// \brief Set whether the name lookup is triggered by a - /// using declaration. - void setUsingDeclaration(bool U) { - UsingDeclaration = U; - } - - /// \brief Returns whether the name lookup is triggered by a - /// using declaration. - bool isUsingDeclaration() const { - return UsingDeclaration; - } - /// \brief Returns the 'naming class' for this lookup, i.e. the /// class which was looked into to find these results. /// @@ -627,10 +615,6 @@ private: bool HideTags; bool Diagnose; - - /// \brief True if the lookup is triggered by a using declaration. - /// Necessary to handle a MSVC bug. - bool UsingDeclaration; }; /// \brief Consumes visible declarations found when searching for diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 21d120a9fc..db78680a13 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -146,10 +146,8 @@ struct AccessTarget : public AccessedEntity { MemberNonce _, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, - QualType BaseObjectType, - bool IsUsingDecl = false) - : AccessedEntity(Context, Member, NamingClass, FoundDecl, BaseObjectType), - IsUsingDeclaration(IsUsingDecl) { + QualType BaseObjectType) + : AccessedEntity(Context, Member, NamingClass, FoundDecl, BaseObjectType) { initialize(); } @@ -218,7 +216,6 @@ private: DeclaringClass = DeclaringClass->getCanonicalDecl(); } - bool IsUsingDeclaration : 1; bool HasInstanceContext : 1; mutable bool CalculatedInstanceContext : 1; mutable const CXXRecordDecl *InstanceContext; @@ -1638,7 +1635,7 @@ void Sema::CheckLookupAccess(const LookupResult &R) { if (I.getAccess() != AS_public) { AccessTarget Entity(Context, AccessedEntity::Member, R.getNamingClass(), I.getPair(), - R.getBaseObjectType(), R.isUsingDeclaration()); + R.getBaseObjectType()); Entity.setDiag(diag::err_access); CheckAccess(*this, R.getNameLoc(), Entity); } diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index ecbff96297..37a4026b58 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -5933,7 +5933,6 @@ NamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS, // Otherwise, look up the target name. LookupResult R(*this, NameInfo, LookupOrdinaryName); - R.setUsingDeclaration(true); // Unlike most lookups, we don't always want to hide tag // declarations: tag names are visible through the using declaration |