gribozavr added inline comments.

================
Comment at: 
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:460
+  using iterator = ReportList::iterator;
+  using const_iterator = ReportList::const_iterator;
+
----------------
gribozavr wrote:
> gribozavr wrote:
> > 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?
> Could even do away with all these typedefs, and four begin/end overloads, and 
> replace everything with:
> 
> ```
> ArrayRef<std::unique_ptr<BugReport>> Reports() const;
> ```
> 
> I believe we don't even need a non-const overload since `unique_ptr` allows 
> mutations regardless.
`BugReports` would be a better name.


Repository:
  rC Clang

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

https://reviews.llvm.org/D67024



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

Reply via email to