[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 01:07:33 PDT 2024


================
@@ -736,11 +756,20 @@ class Environment {
   // shared between environments in the same call.
   // https://github.com/llvm/llvm-project/issues/59005
 
-  // `DeclContext` of the block being analysed if provided.
-  std::vector<const DeclContext *> CallStack;
+  // The stack of functions called from the initial analysis target and
+  // recursively being analyzed.
+  std::vector<const FunctionDecl *> CallStack;
+
+  // If the initial analysis target is a function, this is the function
+  // declaration. Otherwise, this is null.
----------------
martinboehme wrote:

Would suggest putting the description of what this is at the front, and putting the condition behind that.

```suggestion
  // Initial function to analyze, if a function was passed to the constructor.
  // Null otherwise.
```

https://github.com/llvm/llvm-project/pull/91616


More information about the cfe-commits mailing list