[all-commits] [llvm/llvm-project] d725f1: [clang-tidy] Use vfs::FileSystem when getting config

Nathan James via All-commits all-commits at lists.llvm.org
Sat Nov 7 11:18:22 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d725f1ce5318f8aca12632d3b7cfb3a5968e5d37
      https://github.com/llvm/llvm-project/commit/d725f1ce5318f8aca12632d3b7cfb3a5968e5d37
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2020-11-07 (Sat, 07 Nov 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
    M clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
    A clang-tools-extra/unittests/clang-tidy/OptionsProviderTest.cpp

  Log Message:
  -----------
  [clang-tidy] Use vfs::FileSystem when getting config

The config providers that look for configuration files currently take a pointer to a FileSystem in the constructor.
For some reason this isn't actually used when trying to read those configuration files, Essentially it just follows the behaviour of the real filesystem.
Using clang-tidy standalone this doesn't cause any issue.
But if its used as a library and the user wishes to use say an `InMemoryFileSystem` it will try to read the files from the disc instead.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D90992




More information about the All-commits mailing list