[all-commits] [llvm/llvm-project] 24a12a: [clang] Diagnose problematic diagnostic messages (...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Tue May 28 06:23:17 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 24a12a9c85b1ec08ff597f43e3414271d8439a97
https://github.com/llvm/llvm-project/commit/24a12a9c85b1ec08ff597f43e3414271d8439a97
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2024-05-28 (Tue, 28 May 2024)
Changed paths:
M clang/docs/InternalsManual.rst
M clang/test/TableGen/deferred-diag.td
M clang/test/TableGen/text-substitution.td
A clang/test/TableGen/wording-errors.td
M clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
Log Message:
-----------
[clang] Diagnose problematic diagnostic messages (#93229)
Clang has some unwritten rules about diagnostic wording regarding things
like punctuation and capitalization. This patch documents those rules
and adds some tablegen support for checking diagnostics follow the
rules.
Specifically: tablegen now checks that a diagnostic does not start with
a capital letter or end with punctuation, except for the usual
exceptions like proper nouns or ending with a question.
Now that the code base is clean of such issues, the diagnostics are
emitted as an error rather than a warning to ensure that failure to
follow these rules is either addressed by an author, or a new exception
is added to the checking logic.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list