Szelethus added inline comments.
================ Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:76 + std::unique_ptr<PathDiagnostic>> { + const BugReport *Report = nullptr; +}; ---------------- Some comments about this field would be welcome! ================ Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:3076-3077 ArrayRef<PathDiagnosticConsumer*> Consumers = getPathDiagnosticConsumers(); + return generateDiagnosticForConsumerMap(EQ, Consumers); +} ---------------- Considering that the consumers are already a part of the `BugReport`, the overload on `generateDiagnosticForConsumerMap` feels too arbitrary. Wouldn't a predicate function instead of an overload be more fitting? ================ Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:3210 + BugReportEquivClass &EQ, ArrayRef<PathDiagnosticConsumer *> consumers) { + SmallVector<BugReport *> _; + auto *report = BugReporter::findReportInEquivalenceClass(EQ, _); ---------------- Ohh, a variable with its pants down! ================ Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:3286-3290 std::unique_ptr<DiagnosticForConsumerMapTy> PathSensitiveBugReporter::generateDiagnosticForConsumerMap( - BugReport *exampleReport, ArrayRef<PathDiagnosticConsumer *> consumers, - ArrayRef<BugReport *> bugReports) { + BugReportEquivClass &EQ, ArrayRef<PathDiagnosticConsumer *> consumers) { + SmallVector<BugReport *, 10> bugReports; + const BugReport *report = findReportInEquivalenceClass(EQ, bugReports); ---------------- Really happy to see `exampleReport` gone as a parameter. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115716/new/ https://reviews.llvm.org/D115716 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits