forked from OSchip/llvm-project
Specify -fno-builtin when testing to make sure that certain stdlib
functions are not treated as [[nodiscard]]. The compiler might choose to treat them as [[nodiscard]] without the involvement of libc++ if we allow it to recognize them as builtins.
This commit is contained in:
parent
acfc025a72
commit
c105bcbf98
|
@ -16,6 +16,10 @@
|
|||
// be tested here and in nodiscard_extensions.fail.cpp. They should also
|
||||
// be listed in `UsingLibcxx.rst` in the documentation for the extension.
|
||||
|
||||
// Disable any builtin recognition of std::* in the compiler, that might also
|
||||
// trigger -Wunused-value warnings.
|
||||
// ADDITIONAL_COMPILE_FLAGS: -fno-builtin
|
||||
|
||||
#include <algorithm>
|
||||
#include <bit> // bit_cast
|
||||
#include <cstddef> // to_integer
|
||||
|
|
Loading…
Reference in New Issue