diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
commit | b897c8660c4ff7037dde81b9645737bc1c992abe (patch) | |
tree | b6403365e77095a79062d3379c9e6aea0df5f088 /lib/Sema/SemaChecking.cpp | |
parent | 7ef7bab7e3d06f660b059b903c231f100bb13cc5 (diff) |
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 4856e7fd2164..a2ceafad3037 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -166,7 +166,7 @@ Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall) { // handlers. // Printf checking. - if (const FormatAttr *Format = FDecl->getAttr<FormatAttr>()) { + if (const FormatAttr *Format = FDecl->getAttr<FormatAttr>(Context)) { if (Format->getType() == "printf") { bool HasVAListArg = Format->getFirstArg() == 0; if (!HasVAListArg) { @@ -178,7 +178,8 @@ Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall) { HasVAListArg ? 0 : Format->getFirstArg() - 1); } } - for (const Attr *attr = FDecl->getAttrs(); attr; attr = attr->getNext()) { + for (const Attr *attr = FDecl->getAttrs(Context); + attr; attr = attr->getNext()) { if (const NonNullAttr *NonNull = dyn_cast<NonNullAttr>(attr)) CheckNonNullArguments(NonNull, TheCall); } @@ -191,7 +192,7 @@ Sema::CheckBlockCall(NamedDecl *NDecl, CallExpr *TheCall) { OwningExprResult TheCallResult(Owned(TheCall)); // Printf checking. - const FormatAttr *Format = NDecl->getAttr<FormatAttr>(); + const FormatAttr *Format = NDecl->getAttr<FormatAttr>(Context); if (!Format) return move(TheCallResult); const VarDecl *V = dyn_cast<VarDecl>(NDecl); |