[PATCH] D103605: [analyzer] Introduce a new interface for tracking

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 3 06:07:35 PDT 2021


martong added a comment.

Great initiative! You haven't mention `markInteresting` functions, but I think it would be really important to incorporate that functionality here as well. IMHO, `markInteresting` shouldn't have been part of the public API ever, Checkers should have been calling only the trackExpressionValue (as internally that calls markInteresting anyway).



================
Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:113
+
+struct StoreInfo {
+  enum Kind {
----------------
I think we should document this class' responsibility with a terse sentence.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:231
+  template <class ExpressionHandlerType, class... Args>
+  void addExpressionHandlerToTheTop(Args &&... ConstructorArgs) {
+    addExpressionHandlerToTheTop(std::make_unique<ExpressionHandlerType>(
----------------
This naming is a bit too bloated to me, what do you think about this:
```
enum class Position { Front, Back };
addExpressionHandler(Front, ...) {
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103605



More information about the cfe-commits mailing list