diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-01-23 22:09:39 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2012-01-23 22:09:39 +0000 |
commit | b832f6dea893f25b40500a04781286236281cb20 (patch) | |
tree | 4150adcc5c9abc204366eb0e52c74040cdb88952 /lib/Sema/SemaExprCXX.cpp | |
parent | 05b7846d871fb0d3229e4b30fa5935bc858f3547 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 3d155a5cf3..bea0954c6f 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/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() |