[libcxx-commits] [libcxx] 81b6aa0 - [libc++] Fix tests failing with Clang after removing GCC warnings

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 30 11:56:58 PDT 2020


Author: Louis Dionne
Date: 2020-10-30T14:56:12-04:00
New Revision: 81b6aa0e27abc3037c84d1ff2065bf60207f9b8b

URL: https://github.com/llvm/llvm-project/commit/81b6aa0e27abc3037c84d1ff2065bf60207f9b8b
DIFF: https://github.com/llvm/llvm-project/commit/81b6aa0e27abc3037c84d1ff2065bf60207f9b8b.diff

LOG: [libc++] Fix tests failing with Clang after removing GCC warnings

Added: 
    

Modified: 
    libcxx/src/filesystem/filesystem_common.h
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
    libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/src/filesystem/filesystem_common.h b/libcxx/src/filesystem/filesystem_common.h
index a7828ef38632..dc55f93da70c 100644
--- a/libcxx/src/filesystem/filesystem_common.h
+++ b/libcxx/src/filesystem/filesystem_common.h
@@ -198,7 +198,7 @@ struct ErrorHandler {
 using chrono::duration;
 using chrono::duration_cast;
 
-using TimeSpec = std::timespec;
+using TimeSpec = timespec;
 using StatT = struct stat;
 
 template <class FileTimeT, class TimeT,

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
index f4a9210a1376..c3b6c9af9598 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
@@ -33,7 +33,7 @@
 
 using namespace fs;
 
-using TimeSpec = std::timespec;
+using TimeSpec = timespec;
 using StatT = struct stat;
 
 using Sec = std::chrono::duration<file_time_type::rep>;

diff  --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
index 35abfa9cbeae..c9123fe18881 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
@@ -19,8 +19,8 @@
 
 // Ignore warnings about volatile in parameters being deprecated.
 // We know it is, but we still have to test it.
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wvolatile"
+#if defined(__GNUC__) && !defined(__clang__)
+#   pragma GCC diagnostic ignored "-Wvolatile"
 #endif
 
 struct wat


        


More information about the libcxx-commits mailing list