a_sidorin added a comment.

Hi Artem!
The patch looks very promising for CSA, thanks for working on this!



================
Comment at: 
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:343
+  /// to produce a good fix-it hint for most path-sensitive warnings.
+  void addFixItHint(FixItHint F) {
+    Fixits.push_back(F);
----------------
As I see, FixItHint is a pretty expensive class to copy. Should we consider 
const ref/move?


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:3100
+    R->addRange(SR);
+  for (auto FH : Fixits)
+    R->addFixItHint(FH);
----------------
const auto&/auto&&?


================
Comment at: clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:741
+      o << "  <array>\n";
+      for (auto Hint : D->getFixits()) {
+        assert(!Hint.isNull());
----------------
const auto&?


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

https://reviews.llvm.org/D65182



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

Reply via email to