Skip to content

Commit dff8dac

Browse files
authored
[clang-tidy][docs] Add description of "clang-diagnostic-error" (#153870)
This helps better distinguish warnings that could be disabled via `.clang-tidy` config (like `clang-diagnostic-literal-conversion`) from errors that could not be suppressed at all (like `clang-diagnostic-error`) because it's a hard compiler error.
1 parent 7610b13 commit dff8dac

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang-tools-extra/docs/clang-tidy/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ Diagnostics which have a corresponding warning option, are named
111111
``-Wliteral-conversion`` will be reported with check name
112112
``clang-diagnostic-literal-conversion``.
113113

114+
Clang compiler errors (such as syntax errors, semantic errors, or other failures
115+
that prevent Clang from compiling the code) are reported with the check name
116+
``clang-diagnostic-error``. These represent fundamental compilation failures that
117+
must be fixed before :program:`clang-tidy` can perform its analysis. Unlike other
118+
diagnostics, ``clang-diagnostic-error`` cannot be disabled, as :program:`clang-tidy`
119+
requires valid code to function.
120+
114121
The ``-fix`` flag instructs :program:`clang-tidy` to fix found errors if
115122
supported by corresponding checks.
116123

0 commit comments

Comments
 (0)