]> granicus.if.org Git - clang/commitdiff
Dead Code Elimination
authorDouglas Gregor <dgregor@apple.com>
Fri, 9 Oct 2009 22:56:12 +0000 (22:56 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 9 Oct 2009 22:56:12 +0000 (22:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83686 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/Sema.h
lib/Sema/SemaLookup.cpp

index d319969ccec9886802f406986a904dba27e97afa..33d7468787d562b00c12504152e7a5cd1691a1ad 100644 (file)
@@ -1272,9 +1272,6 @@ public:
                            DeclarationName Name,
                            LookupNameKind NameKind,
                            bool RedeclarationOnly = false);
-  Decl *LookupQualifiedNameWithType(DeclContext *LookupCtx,
-                                    DeclarationName Name,
-                                    QualType T);
   bool LookupParsedName(LookupResult &R, Scope *S, const CXXScopeSpec *SS,
                         DeclarationName Name,
                         LookupNameKind NameKind,
index 1c6e93682780dd2e8f0bd790a06b8e61fb5a50ff..aad12ccaa8399929282bb5ab0f213a92b408e039 100644 (file)
@@ -1352,26 +1352,6 @@ ObjCCategoryImplDecl *Sema::LookupObjCCategoryImpl(IdentifierInfo *II) {
   return cast_or_null<ObjCCategoryImplDecl>(D);
 }
 
-// Attempts to find a declaration in the given declaration context
-// with exactly the given type.  Returns null if no such declaration
-// was found.
-Decl *Sema::LookupQualifiedNameWithType(DeclContext *DC,
-                                        DeclarationName Name,
-                                        QualType T) {
-  LookupResult result;
-  LookupQualifiedName(result, DC, Name, LookupOrdinaryName, true);
-
-  CanQualType CQT = Context.getCanonicalType(T);
-
-  for (LookupResult::iterator ir = result.begin(), ie = result.end();
-       ir != ie; ++ir)
-    if (FunctionDecl *CurFD = dyn_cast<FunctionDecl>(*ir))
-      if (Context.getCanonicalType(CurFD->getType()) == CQT)
-        return CurFD;
-
-  return NULL;
-}
-
 void Sema::LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S,
                                         QualType T1, QualType T2,
                                         FunctionSet &Functions) {