diff options
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 12 |
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; } |