flx added inline comments. ================ Comment at: clang-tidy/utils/TypeTraits.cpp:24 @@ -20,2 +23,3 @@ + bool classHasTrivialCopyAndDestroy(QualType Type) { auto *Record = Type->getAsCXXRecordDecl(); ---------------- etienneb wrote: > Should this be lifted to 'type_traits' ? > > > The same function exists into clang-tidy/utils/TypeTraits.cpp > ``` > namespace { > bool classHasTrivialCopyAndDestroy(QualType Type) { > auto *Record = Type->getAsCXXRecordDecl(); > return Record && Record->hasDefinition() && > !Record->hasNonTrivialCopyConstructor() && > !Record->hasNonTrivialDestructor(); > } > } // namespace > ``` > > Alex, any toughs? I'm not following. This is the same file.
================ Comment at: clang-tidy/utils/TypeTraits.cpp:31 @@ +30,3 @@ + +bool hasDeletedCopyConstructor(QualType Type, ASTContext &Context) { + auto *Record = Type->getAsCXXRecordDecl(); ---------------- etienneb wrote: > aaron.ballman wrote: > > No need to pass in `Context` any longer. > ditto, to be lifted or not? What do you mean with lifted? Exposed in the header file? ================ Comment at: clang-tidy/utils/TypeTraits.cpp:44 @@ -27,3 +43,3 @@ llvm::Optional<bool> isExpensiveToCopy(QualType Type, ASTContext &Context) { if (Type->isDependentType()) ---------------- etienneb wrote: > nit: const ASTContext &Context isTriviallyCopyablType below takes non-const ASTContext. http://reviews.llvm.org/D20170 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits