[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

Alexandre Ganea via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 9 12:49:21 PDT 2024


================
@@ -270,6 +270,12 @@ DependencyScanningWorkerFilesystem::status(const Twine &Path) {
   return Result->getStatus();
 }
 
+bool
+DependencyScanningWorkerFilesystem::exists(const Twine &Path) {
+  auto Status = status(Path);
----------------
aganea wrote:

The return type is unclear at first sight, I would suggest replacing the `auto` with the concrete type. Please see https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable

https://github.com/llvm/llvm-project/pull/88152


More information about the cfe-commits mailing list