[PATCH] D33722: [clang-tidy] Add checker for undelegated copy of base classes

Dominik Szabó via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 06:28:24 PDT 2017


szdominik created this revision.
Herald added a subscriber: mgorny.

Finds copy constructors where the constructor don't call 
the constructor of the base class.

  class X : public Copyable {
      X(const X& other) {}; // Copyable(other) is missing
  };

Also finds copy constructors where the base initializer 
don't have parameter.


https://reviews.llvm.org/D33722

Files:
  clang-tidy/misc/CMakeLists.txt
  clang-tidy/misc/MiscTidyModule.cpp
  clang-tidy/misc/UndelegatedCopyOfBaseClassesCheck.cpp
  clang-tidy/misc/UndelegatedCopyOfBaseClassesCheck.h
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/misc-undelegated-copy-of-base-classes.rst
  test/clang-tidy/misc-undelegated-copy-of-base-classes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33722.100858.patch
Type: text/x-patch
Size: 12846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170531/f09ac1b3/attachment-0001.bin>


More information about the cfe-commits mailing list