================
@@ -21,6 +21,6 @@ static_assert(std::__constexpr_wmemcmp(L"Banane", L"Bananf",
6) == -1, "");
constexpr bool test_constexpr_wmemchr() {
const wchar_t str[] = L"Banane";
- return std::__constexpr_wmemchr(str, 'n', 6) == str + 2;
+ return std::__constexpr_wmemchr(str, L'n', 6) == str + 2;
----------------
nuclearcat wrote:
Before commit `[clang][Sema] Add min/max operation size for fortify checks`,
the memcpy/memmove/mempcpy fortify case in SemaChecking.cpp only computed
DestinationSize and checked destination overflow.
After this commit, it also sets SourceSize = ComputeSizeArgument(1), and the
new warn_fortify_destination_over_read diagnostic fires when SourceSize <
MinOperationSize - which exposes the latent type mismatch in this test ('n'
deduces _Up = char, so the internal __builtin_memcpy over-reads the 1-byte
source).
https://github.com/llvm/llvm-project/pull/196499
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits