diff options
author | Ziqing Luo <ziqing@udel.edu> | 2025-06-26 17:39:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-26 16:39:09 +0800 |
commit | 9903c1936a5d174cfc7d38f77f40ed460e344db6 (patch) | |
tree | 0ab2e86178ac9e45f01d61c738bd83c880649fcc /llvm/unittests/ADT/ArrayRefTest.cpp | |
parent | 1b914e15cf217797949b01c9b91df1fdfaa6db19 (diff) | |
download | llvm-9903c1936a5d174cfc7d38f77f40ed460e344db6.zip llvm-9903c1936a5d174cfc7d38f77f40ed460e344db6.tar.gz llvm-9903c1936a5d174cfc7d38f77f40ed460e344db6.tar.bz2 |
[-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (#143487)
In C, a char array needs no "nonstring" attribute, if its initializer is
a string literal that 1) explicitly ends with '\0' and 2) fits in the
array after a possible truncation.
For example
`char a[4] = "ABC\0"; // fine, needs no "nonstring" attr`
rdar://152506883
Diffstat (limited to 'llvm/unittests/ADT/ArrayRefTest.cpp')
0 files changed, 0 insertions, 0 deletions