Skip to content

Diagnose vertical whitespaces in single line comments #149185

@cor3ntin

Description

@cor3ntin

The Unicode consortium and the C++ committee are interested in diagnosing Vertical whitespaces (VT, FF) that appear in single-line comments. We should explore a warning to guide this effort.

The motivation for this warning is that if an IDE treats such a vertical character as whitespace (which they are recommended to do), the divergence between the behavior of compilers and IDEs can lead to code spoofing, and therefore security concerns

https://www.unicode.org/reports/tr55/#Spoofing-LB
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2843r2.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions