diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-08-10 21:21:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-08-10 21:21:05 +0000 |
commit | 820771033e6dbabc4839e87b0c7d0b06e0b049a8 (patch) | |
tree | dbfa349d3553dd45a870b11612099472a0f1bad9 /Sema/SemaChecking.cpp | |
parent | e0eb80aa7a0e4e0358a0125c08e32c3b8023d69b (diff) |
Added "id_idx" parameter to CheckPrintfArguments. This will be used
by CheckPrintfArguments to determine if a given printf function
accepts a va_arg argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Sema/SemaChecking.cpp')
-rw-r--r-- | Sema/SemaChecking.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Sema/SemaChecking.cpp b/Sema/SemaChecking.cpp index 883cbb6e70..8cc3c6c147 100644 --- a/Sema/SemaChecking.cpp +++ b/Sema/SemaChecking.cpp @@ -57,7 +57,7 @@ Sema::CheckFunctionCall(Expr *Fn, FunctionDecl *FDecl, case id_vsprintf: format_idx = 1; break; case id_vprintf: format_idx = 1; break; } - CheckPrintfArguments(Fn, FDecl, format_idx, Args, NumArgsInCall); + CheckPrintfArguments(Fn, i, FDecl, format_idx, Args, NumArgsInCall); } } @@ -70,8 +70,9 @@ Sema::CheckFunctionCall(Expr *Fn, FunctionDecl *FDecl, /// FormatGuard: Automatic Protection From printf Format String /// Vulnerabilities, Proceedings of the 10th USENIX Security Symposium, 2001. void -Sema::CheckPrintfArguments(Expr *Fn, FunctionDecl *FDecl, unsigned format_idx, - Expr** Args, unsigned NumArgsInCall) { +Sema::CheckPrintfArguments(Expr *Fn, unsigned id_idx, FunctionDecl *FDecl, + unsigned format_idx, Expr** Args, + unsigned NumArgsInCall) { assert( format_idx < NumArgsInCall ); |