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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to