From: Douglas Gregor Date: Mon, 9 Mar 2009 16:46:39 +0000 (+0000) Subject: Mark a non-type template parameter invalid if there was a problem with its type X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ceef30c9baef888dbf2cc2b3efc67c276f1fd815;p=clang Mark a non-type template parameter invalid if there was a problem with its type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66422 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index ed50722d2f..a55e3a5184 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -230,8 +230,10 @@ Sema::DeclTy *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, } T = CheckNonTypeTemplateParameterType(T, D.getIdentifierLoc()); - if (T.isNull()) + if (T.isNull()) { T = Context.IntTy; // Recover with an 'int' type. + Invalid = true; + } NonTypeTemplateParmDecl *Param = NonTypeTemplateParmDecl::Create(Context, CurContext, D.getIdentifierLoc(),