diff options
author | Steve Naroff <snaroff@apple.com> | 2009-01-28 16:09:22 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-01-28 16:09:22 +0000 |
commit | 133147d2d31bdcd6943635f80e77d78d2504148f (patch) | |
tree | e746f9d50323335cc30097d3a23f5f5858b9186f /lib/Sema/SemaDecl.cpp | |
parent | 939837f67e0558668be9afec67f2e51eb40d86f0 (diff) |
Remove 'NamespaceNameOnly' 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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 7746917e3b..e0cb526c60 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -215,7 +215,7 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) { ObjCInterfaceDecl *Sema::getObjCInterfaceDecl(IdentifierInfo *Id) { // The third "scope" argument is 0 since we aren't enabling lazy built-in // creation from this context. - Decl *IDecl = LookupDecl(Id, Decl::IDNS_Ordinary, 0, false); + Decl *IDecl = LookupDecl(Id, Decl::IDNS_Ordinary, 0); return dyn_cast_or_null<ObjCInterfaceDecl>(IDecl); } @@ -263,14 +263,10 @@ Scope *Sema::getNonFieldDeclScope(Scope *S) { Sema::LookupResult Sema::LookupDecl(DeclarationName Name, unsigned NSI, Scope *S, const DeclContext *LookupCtx, - bool LookInParent, - bool NamespaceNameOnly) { + bool LookInParent) { LookupCriteria::NameKind Kind; if (NSI == Decl::IDNS_Ordinary) { - if (NamespaceNameOnly) - Kind = LookupCriteria::Namespace; - else - Kind = LookupCriteria::Ordinary; + Kind = LookupCriteria::Ordinary; } else if (NSI == Decl::IDNS_Tag) Kind = LookupCriteria::Tag; else { @@ -780,7 +776,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); + S, Owner, false); if (PrevDecl && !isa<TagDecl>(PrevDecl)) { // C++ [class.union]p2: // The names of the members of an anonymous union shall be @@ -3235,7 +3231,7 @@ Sema::DeclTy *Sema::ActOnField(Scope *S, DeclTy *TagD, if (II) { Decl *PrevDecl - = LookupDecl(II, Decl::IDNS_Member, S, 0, false, false); + = LookupDecl(II, Decl::IDNS_Member, S, 0, false); if (PrevDecl && isDeclInScope(PrevDecl, CurContext, S) && !isa<TagDecl>(PrevDecl)) { Diag(Loc, diag::err_duplicate_member) << II; @@ -3328,7 +3324,7 @@ Sema::DeclTy *Sema::ActOnIvar(Scope *S, if (II) { Decl *PrevDecl - = LookupDecl(II, Decl::IDNS_Member, S, 0, false, false); + = LookupDecl(II, Decl::IDNS_Member, S, 0, false); if (PrevDecl && isDeclInScope(PrevDecl, CurContext, S) && !isa<TagDecl>(PrevDecl)) { Diag(Loc, diag::err_duplicate_member) << II; |