Bigcheese added inline comments.
================ Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:272-291 +enum class Enable { Yes, No }; +enum class ScanFile { Yes, No }; +enum class CacheStatFailure { Yes, No }; + +struct PathPolicy { + unsigned Enable : 1; // Implies caching of all open and stat results. + unsigned ScanFile : 1; ---------------- Alternative that gets rid of the asserts as you just can't construct it incorrectly. I didn't compile this locally, but this should make it so you can't use `{}` to construct one externally, and you either use: `PathPolicy::cache(ScanFile::Yes, CacheStatFailure::No)` or `PathPolicy::bypassCache()` when constructing them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146328/new/ https://reviews.llvm.org/D146328 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits