Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-11 Thread Angel Garcia via cfe-commits
angelgarcia updated this revision to Diff 34535. angelgarcia added a comment. Add examples of 'default' usages. http://reviews.llvm.org/D12734 Files: clang-tidy/modernize/LoopConvertCheck.cpp clang-tidy/modernize/LoopConvertCheck.h clang-tidy/modernize/LoopConvertUtils.cpp

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: clang-tidy/modernize/LoopConvertUtils.cpp:765-766 @@ -764,2 +764,4 @@ // exactly one usage. - addUsage(Usage(nullptr, false, C->getLocation())); + // We are using the 'IsArrow' field of Usage to store if we have to add +

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:458 @@ -438,2 +457,3 @@ // variable. for (const auto : Usages) { + std::string ReplaceText; I'd call that 'Usage' here, as it's not an iterator.

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Angel Garcia via cfe-commits
angelgarcia updated this revision to Diff 34422. angelgarcia marked 4 inline comments as done. angelgarcia added a comment. Document Usage's fields and other comments. http://reviews.llvm.org/D12734 Files: clang-tidy/modernize/LoopConvertCheck.cpp clang-tidy/modernize/LoopConvertCheck.h

Re: [PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-10 Thread Angel Garcia via cfe-commits
angelgarcia updated this revision to Diff 34428. angelgarcia added a comment. Comment the enumerators. > Do we need default? I think so. We need to set the cases that do not fall in any of these categories to something, and I think that using one of the other three as the default kind would

[PATCH] D12734: Another patch for modernize-loop-convert.

2015-09-09 Thread Angel Garcia via cfe-commits
angelgarcia created this revision. angelgarcia added a reviewer: klimek. angelgarcia added subscribers: cfe-commits, alexfh. 1. Avoid converting loops that iterate over the size of a container and don't use its elements, as this would result in an unused-result warning. 2. Never capture the