[cfe-commits] r147503 - /cfe/trunk/lib/AST/ExprConstant.cpp
Eli Friedman
eli.friedman at gmail.com
Tue Jan 3 15:54:05 PST 2012
Author: efriedma
Date: Tue Jan 3 17:54:05 2012
New Revision: 147503
URL: http://llvm.org/viewvc/llvm-project?rev=147503&view=rev
Log:
Get rid of an unnecessary check; the AST for init-lists is the same independent of whether we're in C++11 mode.
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=147503&r1=147502&r2=147503&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Tue Jan 3 17:54:05 2012
@@ -2128,12 +2128,10 @@
return StmtVisitorTy::Visit(E->getInitializer());
}
RetTy VisitInitListExpr(const InitListExpr *E) {
- if (Info.getLangOpts().CPlusPlus0x) {
- if (E->getNumInits() == 0)
- return DerivedZeroInitialization(E);
- if (E->getNumInits() == 1)
- return StmtVisitorTy::Visit(E->getInit(0));
- }
+ if (E->getNumInits() == 0)
+ return DerivedZeroInitialization(E);
+ if (E->getNumInits() == 1)
+ return StmtVisitorTy::Visit(E->getInit(0));
return Error(E);
}
RetTy VisitImplicitValueInitExpr(const ImplicitValueInitExpr *E) {
More information about the cfe-commits
mailing list