[cfe-commits] r66422 - /cfe/trunk/lib/Sema/SemaTemplate.cpp

Douglas Gregor dgregor at apple.com
Mon Mar 9 09:46:39 PDT 2009


Author: dgregor
Date: Mon Mar  9 11:46:39 2009
New Revision: 66422

URL: http://llvm.org/viewvc/llvm-project?rev=66422&view=rev
Log:
Mark a non-type template parameter invalid if there was a problem with its type

Modified:
    cfe/trunk/lib/Sema/SemaTemplate.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=66422&r1=66421&r2=66422&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Mon Mar  9 11:46:39 2009
@@ -230,8 +230,10 @@
   }
 
   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(),





More information about the cfe-commits mailing list