Add methods for emitting diagnostics with no location as well as a special diagnostic for configuration errors.
These show up in the errors as [clang-tidy-config].
The reason to use a custom name rather than the check name is to distinguish the error isn't the same category as the check that reported it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
clang-tools-extra/clang-tidy/ClangTidyCheck.h | ||
---|---|---|
183 | checks -> check's | |
clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp | ||
276 | Perhaps this is a bad idea, but would it make sense to have isCheckEnabled() report true for clang-tidy-config? It's not really a check, so that's a bit odd, but it seems like anywhere we're testing this property we wouldn't want to ignore config issues? | |
clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h | ||
102 | with reading configuration -> with reading the configuration and add a full stop to the end of the comment. |
clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp | ||
---|---|---|
276 | I didn't personally think that was a good way to go. This is the only real place its used where you would get isCheckEnabled called with clang-tidy-config. |
LGTM!
clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp | ||
---|---|---|
276 | Okay, that's good enough for me, thank you! |
checks -> check's