ChenMiaoi wrote:

> I think this fixes goes in the wrong direction. If I use a wrong limit, say 
> `limit(-1)`, I'd expect the source range to be used in diagnostics.

Ya, I did consider whether removing this would lose information needed for 
diagnostics. It looked like we could use `ParamStartLoc` directly when 
diagnosing errors here, so I chose to remove the stored range. Also, if I 
remember correctly, invalid arguments such as `limit(-1)` are rejected before 
the parameter object is constructed?

That said, I’m also fine with keeping it. I don’t have a strong preference 
either way.

https://github.com/llvm/llvm-project/pull/240235
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to