[PATCH] D12675: Avoid using rvalue references with trivially copyable types.

Angel Garcia via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 08:32:28 PDT 2015


angelgarcia added inline comments.

================
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:659-664
@@ -646,7 +658,8 @@
+          BeginPointeeType.isTriviallyCopyableType(*Context);
     } else {
       // Check for qualified types to avoid conversions from non-const to const
       // iterator types.
       if (!Context->hasSameType(CanonicalInitVarType, CanonicalBeginType))
         return;
     }
 
----------------
Yes, but the arrays never return rvalues, and the iterator and pseudoarrays are "handled" in different parts in the code. I think I updated both of them, and I ensured that there was a test for each.


http://reviews.llvm.org/D12675





More information about the cfe-commits mailing list