[PATCH] D67024: [analyzer] NFC: Replace intrusive list of bug reports with a vector of pointers.

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 2 02:06:15 PDT 2019


gribozavr accepted this revision.
gribozavr added a comment.
This revision is now accepted and ready to land.

Thanks for the simplification!



================
Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:460
+  using iterator = ReportList::iterator;
+  using const_iterator = ReportList::const_iterator;
+
----------------
I don't think we intend users to use `ReportList`, so it would be better to not expose it. Instead:

```
using iterator = SmallVectorImpl<std::unique_ptr<BugReport>>::iterator;
using const_iterator = SmallVectorImpl<std::unique_ptr<BugReport>>::const_iterator;
```

... and move it closer to the usage point, right above `begin()` / `end()`. WDYT?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67024/new/

https://reviews.llvm.org/D67024





More information about the cfe-commits mailing list