[PATCH] D59932: [clang-tidy] **Prototype**: Add fix description to clang-tidy checks.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 2 02:27:31 PDT 2019


alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang-tools-extra/clang-tidy/ClangTidy.cpp:75
       Context.diag(CheckName, PD->getLocation().asLocation(),
-                   PD->getShortDescription())
+                   PD->getShortDescription(), /*FixDescription*/ "")
           << PD->path.back()->getRanges();
----------------
nit: Use the format that the bugprone-argument-comment check understands: `/*FixDescription=*/`

Same below.


================
Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:109
+  ///     not supported.
+  virtual llvm::StringRef fixDescription() { return ""; }
+
----------------
Checks can provide different fixes with different semantics depending on the context. It seems incorrect to assume that there can be one reasonable description for all of them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59932/new/

https://reviews.llvm.org/D59932





More information about the cfe-commits mailing list