[PATCH] D70265: [clang-tidy] Add CppCoreGuidelines I.2 "Avoid non-const global variables" check

Kim Viggedal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 01:11:35 PST 2020


vingeldal updated this revision to Diff 243757.
vingeldal added a comment.

Updating D70265 <https://reviews.llvm.org/D70265>: [clang-tidy] Add CppCoreGuidelines I.2 "Avoid non-const global variables" check

Created the requested pull request to C++ Core guidelines and since it is now merged this patch is updated accordingly.

- Anonymous namespaces are no longer ignored by the check as guideline editors explained that was not wanted.
- The option to ignore data members was reomved, they are now always ignored.
- Documentation was updated to mention that this check also covers C++ COre Guideline R.6, since R.6 is simply a duplication of I.2.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70265

Files:
  clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp
  clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.h
  clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt
  clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-avoid-non-const-global-variables.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-avoid-non-const-global-variables.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70265.243757.patch
Type: text/x-patch
Size: 25634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200211/cc10f41a/attachment-0001.bin>


More information about the cfe-commits mailing list