[clang-tools-extra] [clang-tidy] Compact the confusable identifier table (PR #202626)
David Zbarsky via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 5 18:36:27 PDT 2026
================
@@ -17,6 +17,18 @@ int ll;
// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: 'll' is confusable with 'l1' [misc-confusable-identifiers]
// CHECK-MESSAGES: :[[#@LINE-3]]:5: note: other declaration found here
+int rn;
+int m;
+// CHECK-MESSAGES: :[[#@LINE-1]]:5: warning: 'm' is confusable with 'rn'
----------------
dzbarsky wrote:
These are regression tests for the storage change: m → rn covers a multi-code-point replacement, and µ → μ covers a non-ASCII UTF-8 replacement. The existing tests only cover single-code-point ASCII replacements, so they wouldn’t catch errors in the new offset/length or UTF-8 handling.
https://github.com/llvm/llvm-project/pull/202626
More information about the cfe-commits
mailing list