[libcxx-commits] [PATCH] D98442: [libcxx] [test] Use GetWindowsInaccessibleDir() instead of dirs with perms::none in fs.op.is_*

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 6 11:34:41 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp:84
     permissions(dir, perms::none);
+#endif
 
----------------
The general approach looks great to me, but I do think it'd make more sense to pull `scoped_test_env env;` up to the top of main regardless of `_WIN32`. Even if that "scope guard" is redundant on Windows, it feels sketchy to declare a "scope guard" variable inside an ifdef when its lifetime extends outside the ifdef.
(If you do this, obviously, do it consistently everywhere.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98442/new/

https://reviews.llvm.org/D98442



More information about the libcxx-commits mailing list