aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src/filesystem/filesystem_common.h
diff options
context:
space:
mode:
authorNikolas Klauser <nikolasklauser@berlin.de>2022-03-14 14:30:24 +0100
committerNikolas Klauser <nikolasklauser@berlin.de>2022-03-17 00:11:20 +0100
commit14324fa4285f5cd1e421a6cebdceb05d6c49a8dc (patch)
tree4f1222624fc297020fa953964cb47b6e7bab6915 /libcxx/src/filesystem/filesystem_common.h
parentfb99266401960afd99845890720b4d9b3ecd63d2 (diff)
downloadllvm-14324fa4285f5cd1e421a6cebdceb05d6c49a8dc.zip
llvm-14324fa4285f5cd1e421a6cebdceb05d6c49a8dc.tar.gz
llvm-14324fa4285f5cd1e421a6cebdceb05d6c49a8dc.tar.bz2
[libc++] Add warning pragma macros in the test suite
Reviewed By: ldionne, #libc, EricWF Spies: EricWF, libcxx-commits Differential Revision: https://reviews.llvm.org/D121552
Diffstat (limited to 'libcxx/src/filesystem/filesystem_common.h')
-rw-r--r--libcxx/src/filesystem/filesystem_common.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/libcxx/src/filesystem/filesystem_common.h b/libcxx/src/filesystem/filesystem_common.h
index c98d144..c9bc9980 100644
--- a/libcxx/src/filesystem/filesystem_common.h
+++ b/libcxx/src/filesystem/filesystem_common.h
@@ -25,16 +25,14 @@
# define WIN32_LEAN_AND_MEAN
# define NOMINMAX
# include <windows.h>
-#endif
-
-#if !defined(_LIBCPP_WIN32API)
+#else
# include <dirent.h> // for DIR & friends
# include <fcntl.h> /* values for fchmodat */
# include <sys/stat.h>
# include <sys/statvfs.h>
# include <sys/time.h> // for ::utimes as used in __last_write_time
# include <unistd.h>
-#endif
+#endif // defined(_LIBCPP_WIN32API)
#include "../include/apple_availability.h"
@@ -46,10 +44,9 @@
#endif
#endif
-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-function"
-#endif
+_LIBCPP_DIAGNOSTIC_PUSH
+_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wunused-function")
+_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-function")
#if defined(_LIBCPP_WIN32API)
#define PS(x) (L##x)
@@ -611,4 +608,6 @@ static file_time_type get_write_time(const WIN32_FIND_DATAW& data) {
_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCPP_DIAGNOSTIC_POP
+
#endif // FILESYSTEM_COMMON_H