[PATCH] D27971: Make FormatStyle.GetStyleOfFile test work on MSVC

Antonio Maiorano via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 20 07:00:55 PST 2016


amaiorano added a comment.

In https://reviews.llvm.org/D27971#627543, @klimek wrote:

> Why isn't the right solution to make getStyle() use vfs::FileSystem? Generally, everything in clang-format (well, in clang) should use vfs::FileSystem for file access.


You're absolutely right, this is the right solution. I was under the false impression that llvm::fs was preferred. What threw me off was that vfs::FileSystem::status() returns llvm::fs::file_type::* values.

I already made the change locally to getStyle() to use vfs::FileSystem and it works great. Will update the patch asap. Thanks!


https://reviews.llvm.org/D27971





More information about the cfe-commits mailing list