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

via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 11:35:30 PDT 2024


================
@@ -290,13 +295,13 @@ widenKeyToValueMap(const llvm::MapVector<Key, Value *> &CurMap,
 namespace {
 
 // Visitor that builds a map from record prvalues to result objects.
-// This traverses the body of the function to be analyzed; for each result
-// object that it encounters, it propagates the storage location of the result
-// object to all record prvalues that can initialize it.
+// This traverses the AST sub-tree to be visited; for each result object that
----------------
martinboehme wrote:

> I found "analyzed" to be confusing because it seemed to imply that this Visitor was doing the analyzing, which within Environment typically refers to a dataflow analysis, not any generic analysis of something.

Ah, understood. What I meant when I wrote the original comment was indeed that the visitor traverses the body of the function on which we later want to perform dataflow analysis. But I see how this can be confusing.

Agree that this bit can simply be dropped; "this traverses the AST sub-tree to be visited" is true of any `RecursiveASTVisitor`.

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


More information about the cfe-commits mailing list