[PATCH] D31160: [clang-tidy] Fix misc-move-const-arg for move-only types.

Samuel Benzaquen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 5 09:41:35 PDT 2017


sbenza added inline comments.


================
Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:76
   if (IsConstArg || IsTriviallyCopyable) {
+    if (const CXXRecordDecl *R = Arg->getType()->getAsCXXRecordDecl()) {
+      for (const auto *Ctor : R->ctors()) {
----------------
Can we get this from R->hasTrivialCopyConstructor or R->hasNonTrivialCopyConstructor instead of iterating all constructors?


https://reviews.llvm.org/D31160





More information about the cfe-commits mailing list