[PATCH] D30547: [clang-tidy] Forwarding reference overload in constructors

AndrĂ¡s Leitereg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 27 05:24:58 PDT 2017


leanil marked 2 inline comments as done.
leanil added inline comments.


================
Comment at: clang-tidy/misc/ForwardingReferenceOverloadCheck.cpp:119
+       DisabledMove = false;
+  for (const auto *OtherCtor : Ctor->getParent()->ctors()) {
+    if (OtherCtor->isCopyConstructor()) {
----------------
This is the most precise way to formulate the warning message I could come up with.
The condition for excluding either "copy" or "move" from the warning is to find only disabled instances of the constructor type, and there must be at least one, otherwise the compiler generated constructor (which is not present in this enumeration) can be hidden.


Repository:
  rL LLVM

https://reviews.llvm.org/D30547





More information about the cfe-commits mailing list