[MemoryLocation] Support strncpy in getForArgument.
authorFlorian Hahn <flo@fhahn.com>
Thu, 2 Dec 2021 14:18:04 +0000 (14:18 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 2 Dec 2021 14:18:05 +0000 (14:18 +0000)
commit639a78a4bf9da0a03dcd12c27f625a134a3ee6cc
tree0ef7bd1ee41e74a2f084836387566e2c4e27af81
parent32568fc95e75b9c6cfaf6964bcf2d8db342f23ad
[MemoryLocation] Support strncpy in getForArgument.

The size argument of strncpy can be used as bound for the size of
its pointer arguments.

strncpy is guaranteed to write N bytes and reads up to N bytes.

Reviewed By: xbolva00

Differential Revision: https://reviews.llvm.org/D114871
llvm/lib/Analysis/MemoryLocation.cpp
llvm/test/Analysis/BasicAA/libfuncs.ll