PiotrZSL added inline comments.

================
Comment at: clang/include/clang/Analysis/Analyses/ExprMutationAnalyzer.h:31
+    if (nullptr == DeclAnalyzed) {
+      OwningDeclAnalyzed = std::make_unique<DeclSet>();
+      this->DeclAnalyzed = OwningDeclAnalyzed.get();
----------------
NOTE: This memory allocation could be removed by creating class 
ExprMutationAnalyzerWithHistory that could keep DeclSet as private object and 
use ExprMutationAnalyzer as base class.


================
Comment at: clang/lib/Analysis/ExprMutationAnalyzer.cpp:574
+    }
+    DeclAnalyzed->insert(Func);
+
----------------
I would assume that Func should be removed from DeclAnalyzed when leaving 
scope. Otherwise it may not work to good when for example same function would 
be called twice.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155321

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

Reply via email to