NoQ added a comment.

In D62883#1553248 <https://reviews.llvm.org/D62883#1553248>, @Szelethus wrote:

> - Add a `TODO:` in `trackExpressionValue` about maybe tracking conditions to 
> all bug locations, rather than only for tracked variables.


What do you mean by "all bug locations"?



================
Comment at: 
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:355-357
+  bool addTrackedCondition(const ExplodedNode *Cond) {
+    return TrackedConditions.insert(Cond).second;
+  }
----------------
Pls add a comment that explains when does this function return true or false. I 
always forget what does insert().second do :)


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1628
+    if (const Expr *Condition = NB->getTerminatorConditionExpr())
+      if (BR.addTrackedCondition(N))
+        bugreporter::trackExpressionValue(
----------------
Maybe let's add a comment that this is for inter-visitor communication only. 
Because otherwise we won't visit the same node twice in the same visitor.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62883



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

Reply via email to