[cfe-commits] r140017 - in /cfe/trunk: include/clang/Sema/Lookup.h lib/Sema/SemaAccess.cpp lib/Sema/SemaDeclCXX.cpp

Erik Verbruggen erikjv at me.com
Mon Sep 19 08:10:40 PDT 2011


Author: erikjv
Date: Mon Sep 19 10:10:40 2011
New Revision: 140017

URL: http://llvm.org/viewvc/llvm-project?rev=140017&view=rev
Log:
Removed an unused field and its accessors methods.

Modified:
    cfe/trunk/include/clang/Sema/Lookup.h
    cfe/trunk/lib/Sema/SemaAccess.cpp
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/include/clang/Sema/Lookup.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Lookup.h?rev=140017&r1=140016&r2=140017&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Lookup.h (original)
+++ cfe/trunk/include/clang/Sema/Lookup.h Mon Sep 19 10:10:40 2011
@@ -294,18 +294,6 @@
     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 @@
   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

Modified: cfe/trunk/lib/Sema/SemaAccess.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaAccess.cpp?rev=140017&r1=140016&r2=140017&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaAccess.cpp (original)
+++ cfe/trunk/lib/Sema/SemaAccess.cpp Mon Sep 19 10:10:40 2011
@@ -146,10 +146,8 @@
                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 @@
     DeclaringClass = DeclaringClass->getCanonicalDecl();
   }
 
-  bool IsUsingDeclaration : 1;
   bool HasInstanceContext : 1;
   mutable bool CalculatedInstanceContext : 1;
   mutable const CXXRecordDecl *InstanceContext;
@@ -1638,7 +1635,7 @@
     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);
     }

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=140017&r1=140016&r2=140017&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon Sep 19 10:10:40 2011
@@ -5933,7 +5933,6 @@
   // 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





More information about the cfe-commits mailing list