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

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 08:37:36 PDT 2015


klimek 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;
     }
 
----------------
angelgarcia wrote:
> 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.
Ah, ok. I think that code is really hard to follow, and we'll want to refactor the flow (not in this patch though).


http://reviews.llvm.org/D12675





More information about the cfe-commits mailing list