diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-18 16:11:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-18 16:11:24 +0000 |
commit | 68584ed35ad819a1668e3f527ba7f5dd4ae6a333 (patch) | |
tree | f92e4dc8a0ad0128f011a81e4ef954ff1ea7311c /lib/Sema/SemaChecking.cpp | |
parent | 0adea828ec9db09bf54ca4efa54b2a2f688726b5 (diff) |
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
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 4856e7fd21..a2ceafad30 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); |