瀏覽代碼

IdentifierResolver: Remove an unnecessary include and an unused parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170297 91177308-0d34-0410-b5e6-96231b3b80d8
Nico Weber 12 年之前
父節點
當前提交
355a1660d6
共有 3 個文件被更改,包括 3 次插入6 次删除
  1. 1 2
      include/clang/Sema/IdentifierResolver.h
  2. 1 3
      lib/Sema/IdentifierResolver.cpp
  3. 1 1
      lib/Sema/SemaDecl.cpp

+ 1 - 2
include/clang/Sema/IdentifierResolver.h

@@ -158,8 +158,7 @@ public:
   /// \param ExplicitInstantiationOrSpecialization When true, we are checking
   /// whether the declaration is in scope for the purposes of explicit template
   /// instantiation or specialization. The default is false.
-  bool isDeclInScope(Decl *D, DeclContext *Ctx, ASTContext &Context,
-                     Scope *S = 0,
+  bool isDeclInScope(Decl *D, DeclContext *Ctx, Scope *S = 0,
                      bool ExplicitInstantiationOrSpecialization = false) const;
 
   /// AddDecl - Link the decl to its shadowed decl chain.

+ 1 - 3
lib/Sema/IdentifierResolver.cpp

@@ -14,7 +14,6 @@
 
 #include "clang/Sema/IdentifierResolver.h"
 #include "clang/AST/Decl.h"
-#include "clang/AST/DeclObjC.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Lex/ExternalPreprocessorSource.h"
 #include "clang/Lex/Preprocessor.h"
@@ -108,8 +107,7 @@ IdentifierResolver::~IdentifierResolver() {
 /// isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true
 /// if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns
 /// true if 'D' belongs to the given declaration context.
-bool IdentifierResolver::isDeclInScope(Decl *D, DeclContext *Ctx,
-                                       ASTContext &Context, Scope *S,
+bool IdentifierResolver::isDeclInScope(Decl *D, DeclContext *Ctx, Scope *S,
                              bool ExplicitInstantiationOrSpecialization) const {
   Ctx = Ctx->getRedeclContext();
 

+ 1 - 1
lib/Sema/SemaDecl.cpp

@@ -1096,7 +1096,7 @@ void Sema::pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name) {
 
 bool Sema::isDeclInScope(NamedDecl *&D, DeclContext *Ctx, Scope *S,
                          bool ExplicitInstantiationOrSpecialization) {
-  return IdResolver.isDeclInScope(D, Ctx, Context, S,
+  return IdResolver.isDeclInScope(D, Ctx, S,
                                   ExplicitInstantiationOrSpecialization);
 }