summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index b6032339f7c..78942afcc9a 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -9755,7 +9755,8 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) {
FD->getParamDecl(FormatIdx)->getType()->isObjCObjectPointerType())
fmt = "NSString";
FD->addAttr(::new (Context) FormatAttr(FD->getLocation(), Context,
- fmt, FormatIdx+1,
+ &Context.Idents.get(fmt),
+ FormatIdx+1,
HasVAListArg ? 0 : FormatIdx+2));
}
}
@@ -9763,7 +9764,8 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) {
HasVAListArg)) {
if (!FD->getAttr<FormatAttr>())
FD->addAttr(::new (Context) FormatAttr(FD->getLocation(), Context,
- "scanf", FormatIdx+1,
+ &Context.Idents.get("scanf"),
+ FormatIdx+1,
HasVAListArg ? 0 : FormatIdx+2));
}
@@ -9803,7 +9805,7 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) {
// target-specific builtins, perhaps?
if (!FD->getAttr<FormatAttr>())
FD->addAttr(::new (Context) FormatAttr(FD->getLocation(), Context,
- "printf", 2,
+ &Context.Idents.get("printf"), 2,
Name->isStr("vasprintf") ? 0 : 3));
}
OpenPOWER on IntegriCloud