[PATCH] D67091: Fix for headers having the same name as a directory

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 14:12:17 PDT 2019


arphaman added a comment.

Thanks for fixing this! Could you add a test case which verifies that the assertion no longer happens? Let me know if you need help coming up with a test.



================
Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:196
+      return llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>(std::make_error_code(std::errc::is_a_directory));
+    }
+  }
----------------
This change dropped the createFile call, and didn't fix the issue where the same could happen at the end of the function. Could you please perform this check and return inside of `createFile` instead? This would ensure that both uses are fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67091





More information about the cfe-commits mailing list