klimek added inline comments. ================ Comment at: clang-tidy/modernize/LoopConvertUtils.cpp:463-470 @@ -462,1 +462,10 @@ +void ForLoopIndexUseVisitor::addUsage(const Usage &U) { + SourceLocation Begin = U.Range.getBegin(); + if (Begin.isMacroID()) + Begin = Context->getSourceManager().getExpansionLoc(Begin); + + if (UsageLocations.insert(Begin).second) + Usages.push_back(U); +} + ---------------- Now that I take a step back - shouldn't we go to the *spelling* location to deduplicate? The spelling location is the location that will be edited, after all.
http://reviews.llvm.org/D12631 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits