[cfe-commits] r63208 - in /cfe/trunk/lib/Sema: Sema.h SemaDecl.cpp SemaDeclCXX.cpp
Steve Naroff
snaroff at apple.com
Wed Jan 28 07:51:12 PST 2009
Author: snaroff
Date: Wed Jan 28 09:51:12 2009
New Revision: 63208
URL: http://llvm.org/viewvc/llvm-project?rev=63208&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=63208&r1=63207&r2=63208&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Wed Jan 28 09:51:12 2009
@@ -784,7 +784,6 @@
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);
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=63208&r1=63207&r2=63208&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Jan 28 09:51:12 2009
@@ -39,7 +39,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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;
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=63208&r1=63207&r2=63208&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Jan 28 09:51:12 2009
@@ -1378,7 +1378,6 @@
Decl *PrevDecl =
LookupDecl(II, Decl::IDNS_Ordinary, DeclRegionScope, 0,
- /*enableLazyBuiltinCreation=*/false,
/*LookupInParent=*/false);
if (NamespaceDecl *OrigNS = dyn_cast_or_null<NamespaceDecl>(PrevDecl)) {
More information about the cfe-commits
mailing list