[PATCH] D53953: [clang-tidy] Get ClangTidyContext out of the business of storing diagnostics. NFC

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 2 01:58:21 PDT 2018


hokein accepted this revision.
hokein added a comment.

> There is a test that asserts clang-tidy exits with 0 when processing a nonexistent file (test added in https://reviews.llvm.org/D17335 which you wrote/reviewed).

This seems like a bug to me, do I need to preserve this behavior? (See patch description for how this happens).

I think this is a bug, we should return non-zero code when processing a non-existing file. The new behavior seems better to me, though we need to polish the error message.



================
Comment at: clang-tidy/ClangTidy.h:247
 /// clang-format configuration file is found, the given \P FormatStyle is used.
-void handleErrors(ClangTidyContext &Context, bool Fix,
+void handleErrors(llvm::ArrayRef<ClangTidyError> Diags,
+                  ClangTidyContext &Context, bool Fix,
----------------
nit: maybe name it `Errors`, and we match the comment again (it is out-of-date at HEAD :().


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53953





More information about the cfe-commits mailing list