================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to