diff options
author | Martin Storsjö <martin@martin.st> | 2023-04-02 01:45:07 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2023-04-19 13:35:37 +0300 |
commit | f3ee6695e0f6232fee96e2e6ccd96e85ed682998 (patch) | |
tree | 71dbe17daa7c15ebb2553327b4bb260409d2eddf | |
parent | 692518d04b2d170b1ae10c50843e7c497c4a9922 (diff) | |
download | llvm-f3ee6695e0f6232fee96e2e6ccd96e85ed682998.zip llvm-f3ee6695e0f6232fee96e2e6ccd96e85ed682998.tar.gz llvm-f3ee6695e0f6232fee96e2e6ccd96e85ed682998.tar.bz2 |
[libcxxabi] [test] Avoid mingw warnings about missing a return statement
With current versions of mingw-w64 headers, code following
assert(false) isn't considered unreachable - thus add a dummy
"return nullptr;", to avoid warnings (treated as errors) for a
missing return statement.
The root cause does get fixed further upstream in mingw-w64 in
https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe
though.
Differential Revision: https://reviews.llvm.org/D147860
-rw-r--r-- | libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp b/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp index 16239e7..a4a2bbd 100644 --- a/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp +++ b/libcxxabi/test/cxa_vec_new_overflow_PR41395.pass.cpp @@ -18,7 +18,7 @@ void dummy_ctor(void*) { assert(false && "should not be called"); } void dummy_dtor(void*) { assert(false && "should not be called"); } -void *dummy_alloc(size_t) { assert(false && "should not be called"); } +void *dummy_alloc(size_t) { assert(false && "should not be called"); return nullptr; } void dummy_dealloc(void*) { assert(false && "should not be called"); } void dummy_dealloc_sized(void*, size_t) { assert(false && "should not be called"); } |