On Thu, Aug 8, 2013 at 4:08 AM, Benjamin Kramer <span dir="ltr"><<a href="mailto:benny.kra@googlemail.com" target="_blank">benny.kra@googlemail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: d0k<br>
Date: Thu Aug  8 06:08:26 2013<br>
New Revision: 187975<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=187975&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=187975&view=rev</a><br>
Log:<br>
Remove unused variable. No functionality change.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaChecking.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaChecking.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=187975&r1=187974&r2=187975&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=187975&r1=187974&r2=187975&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Thu Aug  8 06:08:26 2013<br>
@@ -714,17 +714,15 @@ void Sema::checkCall(NamedDecl *FDecl,<br>
     return;<br>
<br>
   // Printf and scanf checking.<br>
-  bool HandledFormatString = false;<br>
   llvm::SmallBitVector CheckedVarArgs;<br>
   if (FDecl) {<br>
+    CheckedVarArgs.resize(Args.size());<br></blockquote><div><br></div><div>We were deliberately not doing this if there are no FormatAttrs on the function.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

     for (specific_attr_iterator<FormatAttr><br>
-           I = FDecl->specific_attr_begin<FormatAttr>(),<br>
-           E = FDecl->specific_attr_end<FormatAttr>(); I != E ; ++I) {<br>
-      CheckedVarArgs.resize(Args.size());<br>
-      if (CheckFormatArguments(*I, Args, IsMemberFunction, CallType, Loc,<br>
-                               Range, CheckedVarArgs))<br>
-        HandledFormatString = true;<br>
-    }<br>
+             I = FDecl->specific_attr_begin<FormatAttr>(),<br>
+             E = FDecl->specific_attr_end<FormatAttr>();<br>
+         I != E; ++I)<br>
+      CheckFormatArguments(*I, Args, IsMemberFunction, CallType, Loc, Range,<br>
+                           CheckedVarArgs);<br>
   }<br>
<br>
   // Refuse POD arguments that weren't caught by the format string<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br>