Skip to content

Commit 34ebdaf

Browse files
authored
[clang][analyzer] Use the VFS to check model files (#160950)
This PR uses the VFS to check `.model` files in the Clang static analyzer to match the compiler's behavior for other input files.
1 parent 1aefabe commit 34ebdaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void ModelInjector::onBodySynthesis(const NamedDecl *D) {
6565
else
6666
fileName = llvm::StringRef(D->getName().str() + ".model");
6767

68-
if (!llvm::sys::fs::exists(fileName.str())) {
68+
if (!CI.getVirtualFileSystem().exists(fileName)) {
6969
Bodies[D->getName()] = nullptr;
7070
return;
7171
}

0 commit comments

Comments
 (0)