================
@@ -1355,7 +1357,7 @@ static void verifyDiagnosticWording(const Record &Diag) {
   if (isDigit(FullDiagText.back()) && *(FullDiagText.end() - 2) == '}') {
     // Scan backwards to find the opening curly brace.
     size_t BraceCount = 1;
-    auto Iter = FullDiagText.end() - /*}0*/ 3;
+    auto Iter = FullDiagText.end() - sizeof("}0");
----------------
AaronBallman wrote:

It's because we want to get to the iterator just *before* the `}0`, so -2 gets 
us to `}` while -3 gets us to the character before the `}`.

https://github.com/llvm/llvm-project/pull/93229
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to