]> granicus.if.org Git - clang/commitdiff
Avoid bogus warning.
authorMike Stump <mrs@apple.com>
Wed, 11 Feb 2009 18:58:46 +0000 (18:58 +0000)
committerMike Stump <mrs@apple.com>
Wed, 11 Feb 2009 18:58:46 +0000 (18:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64313 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp

index 5fe592d5e37cdc8f3e9037292c1fd43e3cc44ee0..429dc8e1e302c79011a25bc27f6a99abb0003a64 100644 (file)
@@ -516,7 +516,8 @@ bool Sema::CheckTemplateParameterList(TemplateParameterList *NewParams,
   bool SawDefaultArgument = false;
   SourceLocation PreviousDefaultArgLoc;
 
-  TemplateParameterList::iterator OldParam;
+  // Self initialization to avoid warnings.
+  TemplateParameterList::iterator OldParam = OldParam;
   if (OldParams)
     OldParam = OldParams->begin();