From 60f2e1efb821259de7ae32d9c1ff5a5cbe2aa849 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 25 Sep 2012 00:23:05 +0000 Subject: Don't produce diagnostics for missing ctor-initializers during template instantiations if we encountered errors parsing some of the initializers. llvm-svn: 164578 --- clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp') diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 8c1722fdedb..d1c30bdf0c8 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2986,7 +2986,7 @@ Sema::InstantiateMemInitializers(CXXConstructorDecl *New, const MultiLevelTemplateArgumentList &TemplateArgs) { SmallVector NewInits; - bool AnyErrors = false; + bool AnyErrors = Tmpl->isInvalidDecl(); // Instantiate all the initializers. for (CXXConstructorDecl::init_const_iterator Inits = Tmpl->init_begin(), -- cgit v1.2.3