djasper added a subscriber: djasper.

================
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:495-496
@@ +494,4 @@
+  for (unsigned I = 0; I < NumErrors; ++I) {
+    const auto &Error = Errors[I];
+    // Skip errors without fixes. They are never going to overlap with anything
+    // and the bounding box is undefined.
----------------
From a brief look, it seems like it might be slightly easier, to do what this 
is currently doing, but skip the bounding-box-calculation step. Simple do the 
same with each interval of each fix. We are just interested to efficiently 
calculate, which fixes overlap at all.

Now, I am not sure whether this is going to be more or less efficient:
* It might be hard / not worth it to calculate which fixes have already been 
compared so we might compare the same two fixes repeatedly (once for each 
"touching point").
* We might not need to carefully compare fixes at all in spite of their 
bounding boxes overlapping, e.g. two fixes A and B might have 3 entirely 
disjoint intervals: A, B, A. Then, we don't need to do the sweep at all.




http://reviews.llvm.org/D13516



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to