summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 0d41d5f3cb1..ed4a0346752 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -714,17 +714,15 @@ void Sema::checkCall(NamedDecl *FDecl,
return;
// Printf and scanf checking.
- bool HandledFormatString = false;
llvm::SmallBitVector CheckedVarArgs;
if (FDecl) {
+ CheckedVarArgs.resize(Args.size());
for (specific_attr_iterator<FormatAttr>
- I = FDecl->specific_attr_begin<FormatAttr>(),
- E = FDecl->specific_attr_end<FormatAttr>(); I != E ; ++I) {
- CheckedVarArgs.resize(Args.size());
- if (CheckFormatArguments(*I, Args, IsMemberFunction, CallType, Loc,
- Range, CheckedVarArgs))
- HandledFormatString = true;
- }
+ I = FDecl->specific_attr_begin<FormatAttr>(),
+ E = FDecl->specific_attr_end<FormatAttr>();
+ I != E; ++I)
+ CheckFormatArguments(*I, Args, IsMemberFunction, CallType, Loc, Range,
+ CheckedVarArgs);
}
// Refuse POD arguments that weren't caught by the format string
OpenPOWER on IntegriCloud