================
@@ -67,7 +77,8 @@ class ClangTidyPluginAction : public PluginASTAction {
         OverrideOptions.Checks = std::string(Arg.substr(strlen("-checks=")));
 
     auto Options = std::make_unique<FileOptionsProvider>(
-        GlobalOptions, DefaultOptions, OverrideOptions);
+        GlobalOptions, DefaultOptions, OverrideOptions,
+        Compiler.getVirtualFileSystemPtr());
----------------
zeyi2 wrote:

Without this argument, the options provider falls back to 
[getRealFileSystem()](https://github.com/llvm/llvm-project/blob/2449bae16b32b994282263be4cf1ece9441032f3/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp#L371-L379),
 which causes an IO sandbox violation when the sandbox is enabled. Reusing the 
compiler's VFS also respects its filesystem overlays.

https://github.com/llvm/llvm-project/pull/221961
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to