diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 696e84234c..980c59c4c9 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -6011,7 +6011,8 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, // C++11 [decl.spec.auto]p6. Deduce the type which 'auto' stands in for. if (TypeMayContainAuto && VDecl->getType()->getContainedAutoType()) { TypeSourceInfo *DeducedType = 0; - if (!DeduceAutoType(VDecl->getTypeSourceInfo(), Init, DeducedType)) + if (DeduceAutoType(VDecl->getTypeSourceInfo(), Init, DeducedType) == + DAR_Failed) DiagnoseAutoDeductionFailure(VDecl, Init); if (!DeducedType) { RealDecl->setInvalidDecl(); |