aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorJean-Daniel Dupas <devlists@shadowlab.org>2012-01-25 00:55:11 +0000
committerJean-Daniel Dupas <devlists@shadowlab.org>2012-01-25 00:55:11 +0000
commit43d1251a471d19ce83aa8ce91c0104addada5add (patch)
tree6ab376aaa69e57ca580c3911a942f3329f75a7b5 /lib/Sema/SemaChecking.cpp
parent5ac4b6917aa34fae6da64036539023a6155a3d48 (diff)
Add "multiple format attributes" support on block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index dbb0a0efaa..f5a8b448a1 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -508,11 +508,6 @@ bool Sema::CheckObjCMethodCall(ObjCMethodDecl *Method, SourceLocation lbrac,
}
bool Sema::CheckBlockCall(NamedDecl *NDecl, CallExpr *TheCall) {
- // Printf checking.
- const FormatAttr *Format = NDecl->getAttr<FormatAttr>();
- if (!Format)
- return false;
-
const VarDecl *V = dyn_cast<VarDecl>(NDecl);
if (!V)
return false;
@@ -521,7 +516,12 @@ bool Sema::CheckBlockCall(NamedDecl *NDecl, CallExpr *TheCall) {
if (!Ty->isBlockPointerType())
return false;
- CheckFormatArguments(Format, TheCall);
+ // format string checking.
+ for (specific_attr_iterator<FormatAttr>
+ i = NDecl->specific_attr_begin<FormatAttr>(),
+ e = NDecl->specific_attr_end<FormatAttr>(); i != e ; ++i) {
+ CheckFormatArguments(*i, TheCall);
+ }
return false;
}