diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-14 01:52:53 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-14 01:52:53 +0000 |
commit | 538c3d845986a43014574d6a21a030281c266fdb (patch) | |
tree | e304449e0a82e5dedd173f7d0bec8e9c618a6625 /clang/lib/Sema/SemaChecking.cpp | |
parent | e68c0fcfb239eef2c8468bb8c32e97fe9f58e7be (diff) | |
download | bcm5719-llvm-538c3d845986a43014574d6a21a030281c266fdb.tar.gz bcm5719-llvm-538c3d845986a43014574d6a21a030281c266fdb.zip |
Make it possible for builtins to expression FILE* arguments, so that
we can define builtins such as fprintf, vfprintf, and
__builtin___fprintf_chk. Give a nice error message when we need to
implicitly declare a function like fprintf.
llvm-svn: 64526
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index ab712554965..7ecc304fc90 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -87,12 +87,10 @@ Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall) { } else if (FnInfo == KnownFunctionIDs[id_NSLog]) { format_idx = 0; HasVAListArg = false; - } else if (FnInfo == KnownFunctionIDs[id_asprintf] || - FnInfo == KnownFunctionIDs[id_fprintf]) { + } else if (FnInfo == KnownFunctionIDs[id_asprintf]) { format_idx = 1; HasVAListArg = false; - } else if (FnInfo == KnownFunctionIDs[id_vasprintf] || - FnInfo == KnownFunctionIDs[id_vfprintf]) { + } else if (FnInfo == KnownFunctionIDs[id_vasprintf]) { format_idx = 1; HasVAListArg = true; } else { |