Debian Codegraph @

clang-tools-extra/docs/clang-tidy/checks/misc/confusable-identifiers.rst

raw
1 .. title:: clang-tidy - misc-confusable-identifiers
2
3 misc-confusable-identifiers
4 ===========================
5
6 Warn about confusable identifiers, i.e. identifiers that are visually close to
7 each other, but use different Unicode characters. This detects a potential
8 attack described in `CVE-2021-42574 <https://www.cve.org/CVERecord?id=CVE-2021-42574>`_.
9
10 Example:
11
12 .. code-block:: text
13
14 int fo; // Initial character is U+0066 (LATIN SMALL LETTER F).
15 int 𝐟o; // Initial character is U+1D41F (MATHEMATICAL BOLD SMALL F) not U+0066 (LATIN SMALL LETTER F).