[PATCH] D80531: [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro

Konrad Wilhelm Kleine via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 09:20:03 PDT 2020


kwk marked 4 inline comments as done.
kwk added a comment.

Marked more comments as "done" after going through the code again.



================
Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.cpp:49
+        R"cpp({0}(const {0} &) = delete;
+const {0} &operator=(const {0} &) = delete{1})cpp",
+        classIdent->getNameStart(), shouldAppendSemi(Range) ? ";" : "");
----------------
kwk wrote:
> njames93 wrote:
> > if you wanted to, you could format this quite easily to avoid the need of specifying a formatter in the checks
> > ```{2}const {0} &operator=(const {0} &) = delete{1})cpp",...
> > Lexer::getIndentationForLine(Range.getBegin(), SM))```
> Well, that does fix the indentation but for east/west-side alignment of `&` this doesn't solve the problem, does it?
Well, yes but it will only work for the indentation not for anything else, like east/west alignment of `&` for example.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80531





More information about the cfe-commits mailing list