flovent wrote:

> Thanks for the detailed PR summary. It makes sense. I had to think about it 
> carefully but I agree with the motivation. When I looked at the code it 
> looked really complicated. Probably more than I expected it to be.

`CStringChecker` is a very complicated checker indeed, it may took me more time 
to decide how to change this file than finding the cause of this problem, 
finally i added this parameter with default value to reduce the modifications 
required because `invalidateDestinationBufferBySize` is used in model to other 
functions like `memset`, `memcpy` too.

> I think adding another bool parameter to the already crowded function is not 
> ideal. We should look for some other way, maybe a different overload, or 
> restructuring the code in other ways.

I just find out there are three member functions whose name start with 
`invalidateDestinationBuffer`, seems 
`invalidateDestinationBufferNeverOverflows` should be the right call when 
`CouldAccessOutOfBound == false`.

https://github.com/llvm/llvm-project/pull/146212
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to