sgatev added inline comments.

================
Comment at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:83
+/// overload sets. change the key to support uniqueness.
+llvm::Expected<llvm::StringMap<ControlFlowContext>>
+buildFunctionMapFromAST(ASTUnit &Unit);
----------------
`#include "llvm/ADT/StringMap.h"`


================
Comment at: 
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:27
 #include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/StringSet.h"
 #include "llvm/Support/Compiler.h"
----------------
This should be `StringMap`.


================
Comment at: 
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:60
   ///
+  /// Paramter `AnalyzableFunctions` is a map of analyzable function bodies
+  /// (represented as `ControlFlowContext`s), keyed by the fully-qualified
----------------
How about `InlineableFunctions`?


================
Comment at: 
clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:60
   ///
+  /// Paramter `AnalyzableFunctions` is a map of analyzable function bodies
+  /// (represented as `ControlFlowContext`s), keyed by the fully-qualified
----------------
sgatev wrote:
> How about `InlineableFunctions`?



================
Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:549
 
-      // Note that it is important for the storage location of `S` to be set
-      // before `pushCall`, because the latter uses it to set the storage
-      // location for `return`.
-      auto &ReturnLoc = Env.createStorageLocation(*S);
-      Env.setStorageLocation(*S, ReturnLoc);
-      auto CalleeEnv = Env.pushCall(S);
+      const FunctionDecl *FuncDecl = CFCtx->getDecl()->getAsFunction();
+      assert(FuncDecl != nullptr && "ControlFlowContexts in the environment "
----------------
How is that different from `F`? Why not let `Environment::pushCall` get this 
from the `CallExpr` argument?


================
Comment at: clang/unittests/Analysis/FlowSensitive/TestingSupport.h:74
 
+/// `Code` must be the source code from `ASTUnit` was built.
 template <typename AnalysisT>
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131280

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

Reply via email to