klimek added inline comments. ================ Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:658-663 @@ -646,7 +657,8 @@ + IsTriviallyCopyable = 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: > klimek wrote: > > Can you add a comment what FixerKind is in the else, so it's obvious why we > > don't want to do anything else in here? > What do you mean? We're still inside the "if (FixerKind == LFK_Iterator)". Ah, sorry, misread. So, why don't we want to check for trivial copy-ability for all types?
================ Comment at: clang-tidy/modernize/LoopConvertCheck.h:28 @@ -27,1 +27,3 @@ private: + struct RangeDescriptor { + bool ContainerNeedsDereference; ---------------- Add a comment. http://reviews.llvm.org/D12675 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits