commit | 6e4244ee86a2d71af4eac791808f2dc50c7484e6 | [log] [tgz] |
---|---|---|
author | Jordy Rose <jediknil@belkadan.com> | Mon May 14 17:58:35 2012 +0000 |
committer | Jordy Rose <jediknil@belkadan.com> | Mon May 14 17:58:35 2012 +0000 |
tree | f6019e37b66b9b3574f4a1b748df1489d8760c58 | |
parent | 2c40835c21cd435f183da3d4754aff6beeaef9f6 [diff] |
[analyzer] strncpy: Special-case a length of 0 to avoid an incorrect warning. We check the address of the last element accessed, but with 0 calculating that address results in element -1. This patch bails out early (and avoids a bunch of other work at that). Fixes PR12807. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156769 91177308-0d34-0410-b5e6-96231b3b80d8