[PATCH] D20170: [clang-tidy] TypeTraits - Type is not expensive to copy when it has a deleted copy constructor.

Etienne Bergeron via cfe-commits cfe-commits at lists.llvm.org
Thu May 12 13:02:21 PDT 2016


etienneb added a subscriber: etienneb.

================
Comment at: clang-tidy/utils/TypeTraits.cpp:35
@@ +34,3 @@
+    return false;
+  for (const CXXConstructorDecl *Constructor : Record->ctors()) {
+    if (Constructor->isCopyConstructor() && Constructor->isDeleted())
----------------
aaron.ballman wrote:
> Can just use `const auto *` for this, but I'm fine either way.
I prefer const auto *  too

================
Comment at: clang-tidy/utils/TypeTraits.cpp:44
@@ -27,3 +43,3 @@
 
 llvm::Optional<bool> isExpensiveToCopy(QualType Type, ASTContext &Context) {
   if (Type->isDependentType())
----------------
nit: const ASTContext &Context


http://reviews.llvm.org/D20170





More information about the cfe-commits mailing list