[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 15 12:19:23 PDT 2021
JonasToth added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ConstCorrectnessCheck.cpp:145
+ /// const emit multiple warnings otherwise.
+ const bool IsNormalVariableInTemplate = Function->isTemplateInstantiation();
+ if (IsNormalVariableInTemplate &&
----------------
this check can happen before the heavy lifting.
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:78
+
+ Suggest adding ``const`` to unmodified local variables.
+
----------------
Add a note on the transformation capability, too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54943/new/
https://reviews.llvm.org/D54943
More information about the cfe-commits
mailing list