[PATCH] D45444: [clang-tidy] implement new check for const-correctness

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 6 14:02:46 PDT 2018


JonasToth marked an inline comment as done.
JonasToth added inline comments.


================
Comment at: clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:183
+  // TODO Implement automatic code transformation to add the 'const'.
+  diag(Variable->getLocStart(), "variable %0 of type %1 can be declared const")
+      << Variable << Variable->getType();
----------------
aaron.ballman wrote:
> Still missing the single quotes around `const` in the diagnostic.
Ups. The comment has them :D


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45444





More information about the cfe-commits mailing list