summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-06-18 16:11:24 +0000
committerDouglas Gregor <dgregor@apple.com>2009-06-18 16:11:24 +0000
commit78bd61f6613196207adcfe48d59b2410882df1b8 (patch)
treee2524bdcd97b54a68d08ced81985b50537ad400f /clang/lib/Sema/SemaChecking.cpp
parent0fd4eaef3038694dc25b3c13ad21d8ed5b196f50 (diff)
downloadbcm5719-llvm-78bd61f6613196207adcfe48d59b2410882df1b8.tar.gz
bcm5719-llvm-78bd61f6613196207adcfe48d59b2410882df1b8.zip
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
llvm-svn: 73702
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 4856e7fd216..a2ceafad303 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud