[cfe-commits] r130680 - /cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
Nick Lewycky
nicholas at mxc.ca
Sun May 1 18:48:46 PDT 2011
Author: nicholas
Date: Sun May 1 20:48:46 2011
New Revision: 130680
URL: http://llvm.org/viewvc/llvm-project?rev=130680&view=rev
Log:
Remove redeclaration of Invalid. The code that set this to true was updating an
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.
Modified:
cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=130680&r1=130679&r2=130680&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Sun May 1 20:48:46 2011
@@ -1605,7 +1605,6 @@
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()) {
More information about the cfe-commits
mailing list