We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TEST_MAYBE_UNUSED
1 parent 6de976a commit bc01ebcCopy full SHA for bc01ebc
libcxx/test/support/test_macros.h
@@ -508,6 +508,16 @@ inline Tp const& DoNotOptimize(Tp const& value) {
508
#define TEST_NO_UNIQUE_ADDRESS
509
#endif
510
511
+#if TEST_STD_VER >= 17 && __has_cpp_attribute(maybe_unused)
512
+# define TEST_MAYBE_UNUSED [[maybe_unused]]
513
+#elif __has_cpp_attribute(__maybe_unused__)
514
+# define TEST_MAYBE_UNUSED [[__maybe_unused__]]
515
+#elif __has_cpp_attribute(gnu::unused)
516
+# define TEST_MAYBE_UNUSED [[gnu::unused]]
517
+#else
518
+# define TEST_MAYBE_UNUSED
519
+#endif
520
+
521
#ifdef _LIBCPP_SHORT_WCHAR
522
# define TEST_SHORT_WCHAR
523
0 commit comments