klimek added inline comments. ================ Comment at: clang-tidy/modernize/UseDefaultCheck.cpp:83-91 @@ +82,11 @@ + const CXXMethodDecl *Method) { + if (Method->getNumParams() != 1) + return false; + QualType ArgType = Method->getParamDecl(0)->getType(); + + const auto *Record = Method->getParent(); + QualType RecordType = Context->getTypeDeclType(Record); + + return !ArgType.isNull() && ArgType->isLValueReferenceType() && + ArgType.getNonReferenceType().getUnqualifiedType() == RecordType; +} ---------------- This looks like something we'd want to matcherify, too.
================ Comment at: clang-tidy/modernize/UseDefaultCheck.cpp:152-153 @@ +151,4 @@ + + return Ctor->getNumCtorInitializers() == + BasesToInit.size() + FieldsToInit.size(); +} ---------------- In which cases can this be false? (I assume if not all are copied?) http://reviews.llvm.org/D14145 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits