[clang] [analyzer] Introduce the check::BlockEntrance checker callback (PR #140924)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon May 26 07:25:02 PDT 2025


================
@@ -166,6 +179,23 @@ class CheckerDocumentation
   /// check::Bind
   void checkBind(SVal Loc, SVal Val, const Stmt *S, CheckerContext &) const {}
 
+  /// Called after a CFG edge is taken within a function.
+  ///
+  /// This callback can be used to obtain information about potential branching
+  /// points or any other constructs that involve traversing a CFG edge.
+  /// Note that when inlining a call, there is no CFG edge between the caller
+  /// and the callee. One will only see the edge between the entry block and
+  /// the body of the function once inlined.
----------------
NagyDonat wrote:

I don't understand these two sentences (although this is not necessarily your fault :sweat_smile:). What do you mean by "when inlining" and "once inlined"? Do you try to say something like "this callback is not triggered when a function is inlined, but later there will be a CFG edge"?

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


More information about the cfe-commits mailing list