[PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

Clement Courbet via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 31 08:30:05 PDT 2016


courbet created this revision.
courbet added a reviewer: alexfh.
courbet added a subscriber: cfe-commits.

This check flags initializers of globals that access extern objects, and therefore can lead to order-of-initialization problems (this recommandation is part of CPP core guidelines).
Note that this only checks half of the guideline for now (it does not enforce using constexpr functions).

http://reviews.llvm.org/D18649

Files:
  clang-tidy/cppcoreguidelines/CMakeLists.txt
  clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
  clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.cpp
  clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.h
  docs/clang-tidy/checks/cppcoreguidelines-interfaces-global-init.rst
  docs/clang-tidy/checks/list.rst
  test/clang-tidy/cppcoreguidelines-interfaces-global-init.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18649.52213.patch
Type: text/x-patch
Size: 9464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160331/c3469219/attachment.bin>


More information about the cfe-commits mailing list