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 | 370ab3f1373841d70582feac9e35c3c6b3489f63 (patch) | |
tree | 1371980207aa58ccfea3e8ee70c2fbeab5d49b39 /lib/Sema/SemaChecking.cpp | |
parent | 41573ebf8fb971f40fa8a3e20648362c359b4916 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index ab71255496..7ecc304fc9 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/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 { |