[clang] [NFC][analyzer] Improve tracking of the current Block & LocCtx (PR #185107)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 9 08:14:05 PDT 2026


NagyDonat wrote:

> Looking at the diff I think it might be marginally better than what we had before but I'm still really unhappy with how local reasoning techniques can be applied.

What do you mean under "local reasoning techniques"? What property/invariant would you want to check/understand locally?

>  I'll admit that I don't really have the bandwidth to propose constructive feedback for alternatives. I''m sure you have considered some but in case you didn't then:
> 
> How could we ensure at compile-time that these global-like variables are kept in sync across the handlers?

"kept in sync" with what?
- Are you speaking about keeping these global-like variables in sync with other objects that "know" the Block / LocationContext (e.g. the `ExplodedNode`s have a `LocationContext`) ?
- Or are you speaking about keeping the different "handlers" (the "Handle" methods?) in sync with each other?

(Excuse me for my lack of understanding :sweat_smile:)

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


More information about the cfe-commits mailing list