[all-commits] [llvm/llvm-project] 5f2b9d: Re-land "[-Wunterminated-string-initialization] Ha...
Ziqing Luo via All-commits
all-commits at lists.llvm.org
Fri Jun 27 02:42:06 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5f2b9dd90dccf0ede5c0b10f2879a4f5429b1fa1
https://github.com/llvm/llvm-project/commit/5f2b9dd90dccf0ede5c0b10f2879a4f5429b1fa1
Author: Ziqing Luo <ziqing at udel.edu>
Date: 2025-06-27 (Fri, 27 Jun 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaInit.cpp
A clang/test/Sema/attr-nonstring_safe.c
Log Message:
-----------
Re-land "[-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
This reland disables the test for linux so that it will not block the
buildbot: https://lab.llvm.org/buildbot/#/builders/144/builds/28591.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list