[PATCH] D65986: Allow setting the VFS to 'real' mode instead of default 'physical'

Jonas Devlieghere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 22:08:39 PDT 2019


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

Two small suggestions for the test, but this change LGTM.



================
Comment at: clang/test/Driver/vfsmode.py:33
+    new_name_len = target_len - len(absolute) - 1
+    new_name_len = new_name_len if new_name_len < name_max else name_max
+    absolute = os.path.join(absolute, 'x' * new_name_len)
----------------
I like the Pythonic approach, but I wonder if `new_name_len = min(target_len - len(absolute) - 1, name_max)` wouldn't be easier to read.  


================
Comment at: clang/test/Driver/vfsmode.py:48
+# exceed PATH_MAX.
+assert os.path.exists(file_relative_path)
+
----------------
Should we add an `assert not os.path.exists(absolute)` for good measure?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65986





More information about the cfe-commits mailing list