[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-28 Thread Ben Langmuir via cfe-commits
@@ -175,8 +192,19 @@ static void sanitizeDiagOpts(DiagnosticOptions ) { DiagOpts.ShowCarets = false; // Don't write out diagnostic file. DiagOpts.DiagnosticSerializationFile.clear(); - // Don't emit warnings as errors (and all other warnings too). -

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-28 Thread Michael Spencer via cfe-commits
@@ -175,8 +192,19 @@ static void sanitizeDiagOpts(DiagnosticOptions ) { DiagOpts.ShowCarets = false; // Don't write out diagnostic file. DiagOpts.DiagnosticSerializationFile.clear(); - // Don't emit warnings as errors (and all other warnings too). -

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-28 Thread Ben Langmuir via cfe-commits
@@ -175,8 +192,19 @@ static void sanitizeDiagOpts(DiagnosticOptions ) { DiagOpts.ShowCarets = false; // Don't write out diagnostic file. DiagOpts.DiagnosticSerializationFile.clear(); - // Don't emit warnings as errors (and all other warnings too). -

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-23 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/82294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-23 Thread Michael Spencer via cfe-commits
Bigcheese wrote: CI failure is a preexisting Flang test failure and a preexisting trailing whitespace issue. https://github.com/llvm/llvm-project/pull/82294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-23 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/82294 >From 45852f569575d0735c686376ad30753fe791db26 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Thu, 15 Feb 2024 16:44:45 -0800 Subject: [PATCH] [clang][ScanDeps] Allow PCHs to have different VFS overlays

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-22 Thread Jan Svoboda via cfe-commits
@@ -65,11 +66,25 @@ static void optimizeHeaderSearchOpts(HeaderSearchOptions , llvm::DenseSet Visited; std::function VisitMF = [&](const serialization::ModuleFile *MF) { - VFSUsage |= MF->VFSUsage; Visited.insert(MF); - for (const

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/82294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Michael Spencer via cfe-commits
@@ -67,7 +68,7 @@ static bool checkHeaderSearchPaths(const HeaderSearchOptions , if (LangOpts.Modules) { if (HSOpts.VFSOverlayFiles != ExistingHSOpts.VFSOverlayFiles) { if (Diags) { -Diags->Report(diag::err_pch_vfsoverlay_mismatch); +

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > Just to clarify, this patch doesn't attempt to solve the case where Clang can > crash when the VFS overlay files are different between the PCH and the TU, > since that's existing behavior. Correct? Yep, this patch still allows that to happen in cases where it would today.

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Michael Spencer via cfe-commits
@@ -65,11 +66,25 @@ static void optimizeHeaderSearchOpts(HeaderSearchOptions , llvm::DenseSet Visited; std::function VisitMF = [&](const serialization::ModuleFile *MF) { - VFSUsage |= MF->VFSUsage; Visited.insert(MF); - for (const

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Jan Svoboda via cfe-commits
@@ -67,7 +68,7 @@ static bool checkHeaderSearchPaths(const HeaderSearchOptions , if (LangOpts.Modules) { if (HSOpts.VFSOverlayFiles != ExistingHSOpts.VFSOverlayFiles) { if (Diags) { -Diags->Report(diag::err_pch_vfsoverlay_mismatch); +

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/82294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/82294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 commented: Just to clarify, this patch doesn't attempt to solve the case where the Clang can crash when the VFS overlay files are different between the PCH and the TU, since that's existing behavior. Correct? https://github.com/llvm/llvm-project/pull/82294

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-20 Thread Jan Svoboda via cfe-commits
@@ -65,11 +66,25 @@ static void optimizeHeaderSearchOpts(HeaderSearchOptions , llvm::DenseSet Visited; std::function VisitMF = [&](const serialization::ModuleFile *MF) { - VFSUsage |= MF->VFSUsage; Visited.insert(MF); - for (const

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-adt Author: Michael Spencer (Bigcheese) Changes It turns out it's not that uncommon for real code to pass a different set of VFSs while building a PCH than while using the PCH. This can cause problems as seen in

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-19 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/82294 It turns out it's not that uncommon for real code to pass a different set of VFSs while building a PCH than while using the PCH. This can cause problems as seen in `test/ClangScanDeps/optimize-vfs-pch.m`. If