summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2012-01-23 22:09:39 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2012-01-23 22:09:39 +0000
commit09edce040071668f8c3251eb226eacb4e0d35c9c (patch)
treea7e51f288d502d12dc3ec5570efac094b7c1e3a3 /clang/lib/Sema/SemaExprCXX.cpp
parenta8b444b08b5f8a7af4359282cc3b87ee2a9c7149 (diff)
downloadbcm5719-llvm-09edce040071668f8c3251eb226eacb4e0d35c9c.tar.gz
bcm5719-llvm-09edce040071668f8c3251eb226eacb4e0d35c9c.zip
Minor fixups for auto deduction of initializer lists.
Fix some review comments. Add a test for deduction when std::initializer_list isn't available yet. Fix redundant error messages. This fixes and outstanding FIXME too. llvm-svn: 148735
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 3d155a5cf3a..bea0954c6f0 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -952,7 +952,8 @@ Sema::BuildCXXNew(SourceLocation StartLoc, bool UseGlobal,
<< AllocType << TypeRange);
}
TypeSourceInfo *DeducedType = 0;
- if (!DeduceAutoType(AllocTypeInfo, ConstructorArgs.get()[0], DeducedType))
+ if (DeduceAutoType(AllocTypeInfo, ConstructorArgs.get()[0], DeducedType) ==
+ DAR_Failed)
return ExprError(Diag(StartLoc, diag::err_auto_new_deduction_failure)
<< AllocType
<< ConstructorArgs.get()[0]->getType()
OpenPOWER on IntegriCloud