[libcxx-commits] [PATCH] D105932: [libcxx][modules] protects users from relying on libc++ detail headers (1/n)

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 15 05:23:53 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/utils/generate_private_header_tests.py:40-50
+    paths = sorted(
+        filter(
+            lambda path: '__support' not in path,
+            filter(
+                lambda path: path not in still_public,
+                map(
+                    lambda path: path.as_posix()[len('include/'):],
----------------
FWIW, I'd find this easier to read as
```
def is_still_public(p):
    return p.startswith('__support/') or p in [
        ...
    ]

paths = [p[10:] for p in Path('include').rglob('*') if p.as_posix().startswith('include/__') and not p.is_dir()]
private_paths = [p for p in paths if not is_still_public(p)]
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105932



More information about the libcxx-commits mailing list