[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 13:15:10 PDT 2024
================
@@ -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");
----------------
erichkeane wrote:
Does this not need a -1? Only 2 chars, but was/ends up being 3? Or is this offset because 'end' is 1 past end?
https://github.com/llvm/llvm-project/pull/93229
More information about the cfe-commits
mailing list