klimek added inline comments. ================ Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:468-470 @@ +467,5 @@ + // are VarDecl). If the index is captured by value, add '&' to capture + // by reference instead. + ReplaceText = + Usage.Kind == Usage::UK_CaptureByCopy ? "&" + VarName : VarName; + } ---------------- Isn't it the other way round?
================ Comment at: clang-tidy/modernize/LoopConvertUtils.h:200-205 @@ -199,1 +199,8 @@ struct Usage { + enum UsageKind { + UK_Default, + UK_MemberThroughArrow, + UK_CaptureByCopy, + UK_CaptureByRef + }; + // The expression that is going to be converted. Null in case of lambda ---------------- Please comment the enumerators. Do we need default? Is that always a member expression or sometimes also something else? http://reviews.llvm.org/D12734 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits