[llvm-branch-commits] [clang] [clang-tools-extra] [llvm] Add format string handling (PR #196568)
Sergei Barannikov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Nov 14 19:07:32 PST 2026
================
@@ -132,25 +143,38 @@ ParsePrintfSpecifier(FormatStringHandler &H, const char *&Beg, const char *E,
if (R.match(Str, &Matches)) {
MatchedStr = Matches[1];
+ II = I;
I += Matches[0].size();
+ while (FormatStrConverter.convertBasicChar(*II) == u8' ')
+ ++II;
+
// Set the privacy flag if the privacy annotation in the
// comma-delimited segment is at least as strict as the privacy
// annotations in previous comma-delimited segments.
if (MatchedStr.starts_with("mask")) {
- StringRef MaskType = MatchedStr.substr(sizeof("mask.") - 1);
+ StringRef MaskType(II + sizeof("mask.") - 1,
+ MatchedStr.size() - sizeof("mask.") + 1);
----------------
s-barannikov wrote:
Why did this if-else chain have to change?
https://github.com/llvm/llvm-project/pull/196568
More information about the llvm-branch-commits
mailing list