Skip to content

Conversation

@jansvoboda11
Copy link
Contributor

This PR introduces a new mechanism for enforcing a sandbox of filesystem reads from the compiler. A fatal error is raised whenever the llvm::sys::fs APIs get used directly instead of going through the blessed virtual interface of llvm::vfs::FileSystem.

@github-actions
Copy link

github-actions bot commented Oct 15, 2025

⚠️ C/C++ code linter clang-tidy found issues in your code. ⚠️

You can test this locally with the following command:
git diff -U0 origin/main...HEAD -- clang-tools-extra/clang-tidy/llvm/IOSandboxCheck.cpp clang-tools-extra/clang-tidy/llvm/IOSandboxCheck.h clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp |
python3 clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py \
  -path build -p1 -quiet
View the output from clang-tidy here.

clang-tools-extra/clang-tidy/llvm/IOSandboxCheck.h:7:9: warning: header guard does not follow preferred style [llvm-header-guard]
    7 | #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_IOSANDBOXCHECK_H
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         LLVM_IOSANDBOXCHECK_H
    8 | #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_LLVM_IOSANDBOXCHECK_H
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         LLVM_IOSANDBOXCHECK_H

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant