diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-14 18:57:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-14 18:57:46 +0000 |
commit | e711f7052e47be6daee85137e23b6c28857b9f05 (patch) | |
tree | b87ddb4465918a765f6d440488f99bc811178494 /clang/lib/CodeGen/CGExpr.cpp | |
parent | 978f08d9b4852579b91a9bce765da4427f8aeedf (diff) | |
download | bcm5719-llvm-e711f7052e47be6daee85137e23b6c28857b9f05.tar.gz bcm5719-llvm-e711f7052e47be6daee85137e23b6c28857b9f05.zip |
Add hook to add attributes to function declarations that we know
about, whether they are builtins or not. Use this to add the
appropriate "format" attribute to NSLog, NSLogv, asprintf, and
vasprintf, and to translate builtin attributes (from Builtins.def)
into actual attributes on the function declaration.
Use the "printf" format attribute on function declarations to
determine whether we should do format string checking, rather than
looking at an ad hoc list of builtins and "known" function names.
Be a bit more careful about when we consider a function a "builtin" in
C++.
llvm-svn: 64561
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index ddecbebded1..3e44c0079b3 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -964,7 +964,7 @@ RValue CodeGenFunction::EmitCallExpr(const CallExpr *E) { dyn_cast<const DeclRefExpr>(IcExpr->getSubExpr())) if (const FunctionDecl *FDecl = dyn_cast<const FunctionDecl>(DRExpr->getDecl())) - if (unsigned builtinID = FDecl->getBuiltinID()) + if (unsigned builtinID = FDecl->getBuiltinID(getContext())) return EmitBuiltinExpr(builtinID, E); if (E->getCallee()->getType()->isBlockPointerType()) |