alexfh 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()) {
----------------
alexfh wrote:
> sbenza wrote:
> > Can we get this from R->hasTrivialCopyConstructor or
> > R->hasNonTrivialCopyConstructor instead of iterating all constructors?
> Interesting idea, trying `R->hasTrivialCopyConstructor() ||
> R->hasNonTrivialCopyConstructor()`.
I meant the opposite: `!R->hasTrivialCopyConstructor() &&
!R->hasNonTrivialCopyConstructor()`. But anyway it doesn't work. We could store
another bit for deleted copy constructor, but it wouldn't worth it, if it's
needed in this single case.
https://reviews.llvm.org/D31160
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits