Fix failing test under C++14
authorEric Fiselier <eric@efcs.ca>
Wed, 25 Jul 2018 21:53:43 +0000 (21:53 +0000)
committerEric Fiselier <eric@efcs.ca>
Wed, 25 Jul 2018 21:53:43 +0000 (21:53 +0000)
llvm-svn: 337970

libcxx/src/experimental/filesystem/filesystem_common.h

index d330b76..5c18930 100644 (file)
@@ -362,8 +362,8 @@ public:
     // The tv_nsec and tv_usec fields must not be negative so adjust accordingly
     if (subsec_dur.count() < 0) {
       if (sec_dur.count() > min_seconds) {
-        sec_dur -= fs_seconds(1);
-        subsec_dur += fs_seconds(1);
+        sec_dur = sec_dur - fs_seconds(1);
+        subsec_dur = subsec_dur + fs_seconds(1);
       } else {
         subsec_dur = fs_nanoseconds::zero();
       }