[clang] [analyzer] Canonicalize _Atomic pointers in makeNullWithType (PR #190131)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 10:46:24 PDT 2026
NagyDonat wrote:
Personally I would prefer moving the canonicalization _before_ the assertion and not touching the definition of `isLocType`. I agree that touching `isLocType` is problematic because
> My concern is that `isLocType` would now start accepting Atomic types, while there could be potential callsites not doing this canonicalization.
I have seen the remark that
> Moreover, it seems like that assertion was there to validate a contract on `type` and putting code before the contract type felt like a code-smell, but maybe I'm overthinking that last part.
but I don't think that this is code smell -- in my mind an assertion in the middle of a function is not worse or less valuable than an assertion at the beginning.
https://github.com/llvm/llvm-project/pull/190131
More information about the cfe-commits
mailing list