NoQ added a comment.

Thanks!

I could have split this up into three patches (one for the core and two patches 
for the checkers), however that'd mean that the first patch comes without 
tests; so i thought that the patch should be self-contained. Was it a bad idea 
after all?


================
Comment at: lib/StaticAnalyzer/Core/BugReporter.cpp:3449
@@ +3448,3 @@
+    // we may optionally convert those to path notes.
+    for (auto I = exampleReport->getExtraNotes().rbegin(),
+              E = exampleReport->getExtraNotes().rend(); I != E; ++I) {
----------------
a.sidorin wrote:
> Reverse iteration on array and push the corresponding element to the front 
> (always O(n)) seems a bit strange to me. I suggest using a combination of 
> resize + move existing elements to the end + copy/transform from start. What 
> do you think? Or am I missing something?
`PathPieces` is an `std::list`, so each push is O(1).


https://reviews.llvm.org/D24278



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

Reply via email to