]> granicus.if.org Git - clang/commitdiff
Remove redeclaration of Invalid. The code that set this to true was updating an
authorNick Lewycky <nicholas@mxc.ca>
Mon, 2 May 2011 01:48:46 +0000 (01:48 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Mon, 2 May 2011 01:48:46 +0000 (01:48 +0000)
Invalid that was never read from again, causing non-type-template-parms to be
marked valid when in fact they weren't.

This was caught by GCC 4.6's -Wunused-but-set-variable warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130680 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateInstantiateDecl.cpp

index 5412d1325a7edf693e958ab8ddaa69e67d1b87b1..6e11ef5bbc5fab697e1cde96e6e3d1b352d525d1 100644 (file)
@@ -1605,7 +1605,6 @@ Decl *TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl(
       return 0;
     
     // Check that this type is acceptable for a non-type template parameter.
-    bool Invalid = false;
     T = SemaRef.CheckNonTypeTemplateParameterType(DI->getType(), 
                                                   D->getLocation());
     if (T.isNull()) {