[clang] Warning Libc functions (PR #101583)
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 13 15:16:37 PDT 2024
================
@@ -783,6 +783,18 @@ bool ParsePrintfString(FormatStringHandler &H,
bool ParseFormatStringHasSArg(const char *beg, const char *end,
const LangOptions &LO, const TargetInfo &Target);
+/// Parse C format string and return index (relative to `ArgIndex`) of the first
+/// found `s` specifier. Return 0 if not found.
+/// \param I The start of the C format string; Updated to the first unparsed
+/// position upon return.
+/// \param E The end of the C format string;
+/// \param ArgIndex The argument index of the last found `s` specifier; Or the
+/// argument index of the formatter in initial case.
+unsigned ParseFormatStringFirstSArgIndex(const char *&I, const char *E,
----------------
haoNoQ wrote:
The `*&` part is probably going to be very confusing to the users of this utility function.
Maybe just use the handler directly in our code?
https://github.com/llvm/llvm-project/pull/101583
More information about the cfe-commits
mailing list