[cfe-commits] r72630 - in /cfe/trunk/lib/Sema: Sema.h SemaDecl.cpp SemaInit.cpp
Anders Carlsson
andersca at mac.com
Sat May 30 13:41:30 PDT 2009
Author: andersca
Date: Sat May 30 15:41:30 2009
New Revision: 72630
URL: http://llvm.org/viewvc/llvm-project?rev=72630&view=rev
Log:
Remove VarDecl from CheckInitializerTypes now that CXXConstructExpr doesn't need to take a VarDecl anymore. (It still does, but it won't for long)
Modified:
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaInit.cpp
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=72630&r1=72629&r2=72630&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Sat May 30 15:41:30 2009
@@ -2641,11 +2641,9 @@
/// type checking declaration initializers (C99 6.7.8)
- /// FIXME: The VarDecl parameter should not have a default value,
- /// and all call sites should be audited.
bool CheckInitializerTypes(Expr *&simpleInit_or_initList, QualType &declType,
SourceLocation InitLoc,DeclarationName InitEntity,
- bool DirectInit, VarDecl *VD = 0);
+ bool DirectInit);
bool CheckInitList(InitListExpr *&InitList, QualType &DeclType);
bool CheckForConstantInitializer(Expr *e, QualType t);
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=72630&r1=72629&r2=72630&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sat May 30 15:41:30 2009
@@ -2551,7 +2551,7 @@
VDecl->setInvalidDecl();
} else if (!VDecl->isInvalidDecl()) {
if (CheckInitializerTypes(Init, DclT, VDecl->getLocation(),
- VDecl->getDeclName(), DirectInit, VDecl))
+ VDecl->getDeclName(), DirectInit))
VDecl->setInvalidDecl();
// C++ 3.6.2p2, allow dynamic initialization of static initializers.
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=72630&r1=72629&r2=72630&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Sat May 30 15:41:30 2009
@@ -119,8 +119,7 @@
bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType,
SourceLocation InitLoc,
- DeclarationName InitEntity,
- bool DirectInit, VarDecl *VD) {
+ DeclarationName InitEntity, bool DirectInit) {
if (DeclType->isDependentType() ||
Init->isTypeDependent() || Init->isValueDependent())
return false;
@@ -175,10 +174,8 @@
if (!Constructor)
return true;
- // FIXME: What do do if VD is null here?
- if (VD)
- Init = CXXConstructExpr::Create(Context, VD, DeclType, Constructor,
- false, &Init, 1);
+ Init = CXXConstructExpr::Create(Context, 0, DeclType, Constructor,
+ false, &Init, 1);
return false;
}
More information about the cfe-commits
mailing list