NoQ added a comment. Looks awesome!
================ Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h:45-48 +// Tests if any two `FixItHint`s in `FixIts` conflict. Two `FixItHint`s +// conflict if they have overlapping source ranges. +bool anyConflict(const SourceManager &SM, const llvm::SmallVectorImpl<FixItHint> &FixIts); + ---------------- Maybe we should put it into some namespace, so that it didn't look like it's part of our public interface? ================ Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:695-696 + const llvm::SmallVectorImpl<FixItHint> &FixIts) { + // A simple interval overlap detecting algorithm. Sorts all ranges by their + // begin location then find any overlap in one pass. + std::vector<const FixItHint *> All; // a copy of `FixIts` ---------------- Nitpicks. ================ Comment at: clang/unittests/Analysis/UnsafeBufferUsageTest.cpp:17 + Diags(DiagID, new DiagnosticOptions, new IgnoringDiagConsumer()), + SourceMgr(Diags, FileMgr) {} + ---------------- Oh my, you constructed it just like that and it worked? This is awesome! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141338/new/ https://reviews.llvm.org/D141338 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits