[PATCH] D131280: [clang][dataflow] Parameterize analysis by explicit map of analyzable functions.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 8 08:49:00 PDT 2022


xazax.hun added a comment.

The concept of fully qualified name is somewhat ambiguous for me. Do we expect the user to specify inline namespaces as well? I'd love to see some test cases and comments that clarify this.



================
Comment at: clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp:96
+  for (auto It = Unit.top_level_begin(); It != Unit.top_level_end(); ++It) {
+    if (auto *C = dyn_cast<CXXRecordDecl>(*It)) {
+      for (auto *M : C->methods())
----------------
Do we exclude non-toplevel declarations on purpuse? Or would this work for methods of inline classes, methods of classes defined within a function? 


================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:341
+  // Canonicalize the key, if possible.
+  if (auto *C = F->getCanonicalDecl())
+    F = C;
----------------
Out of curiosity, I'd expect getCanonicalDecl to always succeed. Do you know cases where it would not?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131280



More information about the cfe-commits mailing list