diff options
| author | Steve Naroff <snaroff@apple.com> | 2009-01-28 15:51:12 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2009-01-28 15:51:12 +0000 |
| commit | 49f97d7eb2fe5f49956668f10f7a78072b5497e2 (patch) | |
| tree | 0afe88abf76854b6970ec0c51bf3646c53c152b8 | |
| parent | cdca288cf8f313fdaf361eac0682021802661e5b (diff) | |
| download | bcm5719-llvm-49f97d7eb2fe5f49956668f10f7a78072b5497e2.tar.gz bcm5719-llvm-49f97d7eb2fe5f49956668f10f7a78072b5497e2.zip | |
Remove 'enableLazyBuiltinCreation' argument to Sema::LookupDecl(). It is unused.
Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert.
llvm-svn: 63208
| -rw-r--r-- | clang/lib/Sema/Sema.h | 1 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 12 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 1 |
3 files changed, 5 insertions, 9 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 5e67084353c..65b18d2ddf7 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -784,7 +784,6 @@ public: DeclarationName Name, LookupCriteria Criteria); LookupResult LookupDecl(DeclarationName Name, unsigned NSI, Scope *S, const DeclContext *LookupCtx = 0, - bool enableLazyBuiltinCreation = true, bool LookInParent = true, bool NamespaceNameOnly = false); diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 41ecf13563e..7746917e3b9 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -39,7 +39,7 @@ Sema::TypeTy *Sema::isTypeName(IdentifierInfo &II, Scope *S, return 0; DC = static_cast<DeclContext*>(SS->getScopeRep()); } - LookupResult Result = LookupDecl(&II, Decl::IDNS_Ordinary, S, DC, false); + LookupResult Result = LookupDecl(&II, Decl::IDNS_Ordinary, S, DC); Decl *IIDecl = 0; switch (Result.getKind()) { @@ -263,7 +263,6 @@ Scope *Sema::getNonFieldDeclScope(Scope *S) { Sema::LookupResult Sema::LookupDecl(DeclarationName Name, unsigned NSI, Scope *S, const DeclContext *LookupCtx, - bool enableLazyBuiltinCreation, bool LookInParent, bool NamespaceNameOnly) { LookupCriteria::NameKind Kind; @@ -344,8 +343,7 @@ NamespaceDecl *Sema::GetStdNamespace() { if (!StdNamespace) { IdentifierInfo *StdIdent = &PP.getIdentifierTable().get("std"); DeclContext *Global = Context.getTranslationUnitDecl(); - Decl *Std = LookupDecl(StdIdent, Decl::IDNS_Ordinary, - 0, Global, /*enableLazyBuiltinCreation=*/false); + Decl *Std = LookupDecl(StdIdent, Decl::IDNS_Ordinary, 0, Global); StdNamespace = dyn_cast_or_null<NamespaceDecl>(Std); } return StdNamespace; @@ -782,7 +780,7 @@ bool Sema::InjectAnonymousStructOrUnionMembers(Scope *S, DeclContext *Owner, F != FEnd; ++F) { if ((*F)->getDeclName()) { Decl *PrevDecl = LookupDecl((*F)->getDeclName(), Decl::IDNS_Ordinary, - S, Owner, false, false, false); + S, Owner, false, false); if (PrevDecl && !isa<TagDecl>(PrevDecl)) { // C++ [class.union]p2: // The names of the members of an anonymous union shall be @@ -3237,7 +3235,7 @@ Sema::DeclTy *Sema::ActOnField(Scope *S, DeclTy *TagD, if (II) { Decl *PrevDecl - = LookupDecl(II, Decl::IDNS_Member, S, 0, false, false, false); + = LookupDecl(II, Decl::IDNS_Member, S, 0, false, false); if (PrevDecl && isDeclInScope(PrevDecl, CurContext, S) && !isa<TagDecl>(PrevDecl)) { Diag(Loc, diag::err_duplicate_member) << II; @@ -3330,7 +3328,7 @@ Sema::DeclTy *Sema::ActOnIvar(Scope *S, if (II) { Decl *PrevDecl - = LookupDecl(II, Decl::IDNS_Member, S, 0, false, false, false); + = LookupDecl(II, Decl::IDNS_Member, S, 0, false, false); if (PrevDecl && isDeclInScope(PrevDecl, CurContext, S) && !isa<TagDecl>(PrevDecl)) { Diag(Loc, diag::err_duplicate_member) << II; diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 14a481eb715..91a282dd953 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -1378,7 +1378,6 @@ Sema::DeclTy *Sema::ActOnStartNamespaceDef(Scope *NamespcScope, Decl *PrevDecl = LookupDecl(II, Decl::IDNS_Ordinary, DeclRegionScope, 0, - /*enableLazyBuiltinCreation=*/false, /*LookupInParent=*/false); if (NamespaceDecl *OrigNS = dyn_cast_or_null<NamespaceDecl>(PrevDecl)) { |

