sgatev added inline comments.

================
Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:395
   // `DeclContext` of the block being analysed if provided.
-  const DeclContext *DeclCtx = nullptr;
+  std::vector<const DeclContext *> CallString;
 
----------------



================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:210
+                             const DeclContext *Callee) const {
+  return CallString.size() <= MaxDepth &&
+         std::find(CallString.begin(), CallString.end(), Callee) ==
----------------
If `canDescend` is supposed to return false for `MaxDepth = 0`, shouldn't this 
be `<`?


================
Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:4003
 
-TEST(TransferTest, ContextSensitiveSetTwoLayers) {
+TEST(TransferTest, ContextSensitiveSetTwoLayersDepthOne) {
   std::string Code = R"(
----------------
Let's add a similar test with `Depth` set to 0.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131809

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

Reply via email to