[PATCH] D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 10 02:32:29 PDT 2022


JonasToth added inline comments.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-const-correctness.rst:10
+`CppCoreGuidelines ES.25 <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es25-declare-an-object-const-or-constexpr-unless-you-want-to-modify-its-value-later-on>`_
+and `AUTOSAR C++14 Rule A7-1-1 (6.7.1 Specifiers) <https://www.autosar.org/fileadmin/user_upload/standards/adaptive/17-03/AUTOSAR_RS_CPP14Guidelines.pdf>`_.
+
----------------
carlosgalvezp wrote:
> AUTOSAR mentions should be removed as per previous comment from @aaron.ballman 
Why? I dont think its wrong to hint that there are coding standards that require `const` to be used consistently.
The check does not run under `cppcoreguidelines-` because the guidelines are not exact on their requirements. But "the spirit" is still the same. I would like to keep the references.


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