[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-08-04 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Ping for review. Thank you! https://github.com/llvm/llvm-project/pull/148959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-07-30 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Gentle ping for review. Thanks! https://github.com/llvm/llvm-project/pull/148959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-07-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu ready_for_review https://github.com/llvm/llvm-project/pull/148959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-07-24 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > I think a hard error is a bit too much initially, maybe let's introduce a > warning first and then tighten the screws later? Thanks for the comment! While I agree that having a hard error initially may be harsh, I think we should go with an error for two reasons: 1. I am no

[clang] [clang][Dependency Scanning] Move Module Timestamp Update After Compilation Finishes (PR #151774)

2025-08-06 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Gentle ping for review. Thanks! https://github.com/llvm/llvm-project/pull/151774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][Dependency Scanning] Report What a Module Exports during Scanning (#137421)" (PR #140820)

2025-05-20 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/140820 This reverts commit ea1bfbf3f6399b7d2d840722f0e87542d00f6a35. The commit did not solve the fundamental issue we need to handle and is no longer necessary. rdar://144794793 >From 22c4747a1232756c672691a14ae

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-08-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/148959 >From 0e8a0db8ace8fd1f450cf2364b4c975d418eddc1 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Jul 2025 18:22:27 -0700 Subject: [PATCH 1/6] Initial implementation of modulemap link decl duplication ch

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-08-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/148959 >From 0e8a0db8ace8fd1f450cf2364b4c975d418eddc1 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Jul 2025 18:22:27 -0700 Subject: [PATCH 1/6] Initial implementation of modulemap link decl duplication ch

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-08-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/148959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-08-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/148959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][Modules] Reporting Errors for Duplicating Link Declar… (PR #157154)

2025-09-06 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/157154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][Modules] Reporting Errors for Duplicating Link Declar… (PR #157154)

2025-09-05 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/157154 …ations in `modulemap`s (#148959)" This reverts commit 538e9e8ebd09233b3900ed2dfd23e4e1ca5c9fc0 for two reasons. 1. Link decls in submodules can make sense even if the submodule is not explicit. We need to r

[clang] [clang] Add [system] label to modules from resource headers (PR #156934)

2025-09-06 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu approved this pull request. LGTM! Thanks! https://github.com/llvm/llvm-project/pull/156934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-01 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/156377 >From 0cb749e2ec11cf51d2c97e935727e55aeaf65097 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 1 Sep 2025 16:09:21 -0700 Subject: [PATCH] Permit link decls in submodule declarations. --- clang/include/c

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-01 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/156377 https://github.com/llvm/llvm-project/pull/148959 added two checks that restricts the uses of link declarations. It is later discovered that the Swift project uses link declarations in submodules extensively o

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-08 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Since the original check is reverted (https://github.com/llvm/llvm-project/pull/157154), I am closing this PR. https://github.com/llvm/llvm-project/pull/156377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-08 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/156377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-02 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > For `Wmodule-link-redeclaration` check, what happens if two different modules > have the same `link` declaration? The check is within a module. It does not do any thing in the case when the same link decl shows up in different modules. https://github.com/llvm/llvm-project/

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-03 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/156377 >From 0cb749e2ec11cf51d2c97e935727e55aeaf65097 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 1 Sep 2025 16:09:21 -0700 Subject: [PATCH 1/2] Permit link decls in submodule declarations. --- clang/inclu

[clang] [clang][Modules] Permit Link Declarations in Submodule Declarations in Module Maps (PR #156377)

2025-09-03 Thread Qiongsi Wu via cfe-commits
@@ -915,8 +915,10 @@ def err_mmap_expected_attribute : Error<"expected an attribute name">; def warn_mmap_link_redeclaration : Warning<"redeclaration of link library '%0'">, InGroup>, DefaultError; def note_mmap_prev_link_declaration : Note<"previously declared here">; -def

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-08-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/148959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-08-22 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` > running on `linaro-clang-aarch64-quick` while building `clang` at step 5 > "ninja check 1". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/65/builds/21626 > > Here is

[clang] [ClangScanDeps] Improve getTranslationUnitDependencies (PR #159472)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/159472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Only set non-empty bypass to scan VFS (PR #159605)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu approved this pull request. LGTM! Thanks! https://github.com/llvm/llvm-project/pull/159605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/159620 >From 250d52ddcafee193a987b9dde639ab2cd5aa81e7 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 18 Sep 2025 11:04:37 -0700 Subject: [PATCH 1/2] Making sure the scanning `CompilerInvocation`'s `-D`s are ca

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/159620 >From 250d52ddcafee193a987b9dde639ab2cd5aa81e7 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 18 Sep 2025 11:04:37 -0700 Subject: [PATCH 1/3] Making sure the scanning `CompilerInvocation`'s `-D`s are ca

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > LGTM, thanks! FWIW I think this is easy to test even upstream by scanning two > TUs with different defines that canonicalize to the same thing, and then > checking the number of entries in the module cache. Might be worth doing here. Ah great suggestion! Thanks! A test is no

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/159620 >From 250d52ddcafee193a987b9dde639ab2cd5aa81e7 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 18 Sep 2025 11:04:37 -0700 Subject: [PATCH] Making sure the scanning `CompilerInvocation`'s `-D`s are canoni

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > > Note to reviewers: > > I did not add any tests here since I don't think there are visible behavior > > change observable without CAS. I am testing this work using > > https://github.com/swiftlang/swift and its llvm fork. Please let me know if > > there are things I can tes

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/159620 >From 72ca73919d9285cf116a56dee0f7b437cb0b35cd Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 18 Sep 2025 11:04:37 -0700 Subject: [PATCH] Making sure the scanning `CompilerInvocation`'s `-D`s are canoni

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
@@ -393,8 +393,6 @@ class DependencyScanningAction { DiagnosticConsumer *DiagConsumer) { // Make a deep copy of the original Clang invocation. CompilerInvocation OriginalInvocation(*Invocation); -if (any(Service.getOptimizeArgs() & ScanningOptim

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/159620 Before this patch, we only perform `-D` canonicalization on the deep copy of the `CompilerInvocation` instance, since the canonicalization should have no impact on scanning. However, in the presence of CAS,

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Note to reviewers: I did not add any tests here since I don't think there are visible behavior change observable without CAS. I am testing this work using https://github.com/swiftlang/swift and its llvm fork. Please let me know if there are things I can test against and I wil

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/159620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Canonicalize Defines of a Compiler Invocation As Early As Possible (PR #159620)

2025-09-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/159620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Implementing `CompilerInstanceWithContext` to Speedup By Name Scans (PR #160207)

2025-09-23 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,250 @@ +//===- CompilerInstanceWithContext.cpp - clang scanning compiler instance -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Dependency Scanning] Implementing `CompilerInstanceWithContext` to Speedup By Name Scans (PR #160207)

2025-09-23 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,250 @@ +//===- CompilerInstanceWithContext.cpp - clang scanning compiler instance -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Dependency Scanning] Implementing `CompilerInstanceWithContext` to Speedup By Name Scans (PR #160207)

2025-09-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/160207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Implementing `CompilerInstanceWithContext` to Speedup By Name Scans (PR #160207)

2025-09-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > I'd prefer if we didn't duplicate all the existing logic. Would it be > possible to fit CompilerInstanceWithContext into the current tool/worker > APIs? I'm thinking that maybe getModuleDependencies() and other top-level > APIs could accept a flag that would control whether

[clang] [clang][Dependency Scanning][NFC] Move `DependencyScanningAction` to its own header and source files (PR #160795)

2025-09-26 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/160795 >From 584a2f9c07192972b36921448cb67984b0d5264f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 25 Sep 2025 16:36:15 -0700 Subject: [PATCH 1/2] Moving DependencyScanningAction to its own header and source

[clang] [clang][Dependency Scanning][NFC] Move `DependencyScanningAction` to its own header and source files (PR #160795)

2025-09-26 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/160795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Implementing `CompilerInstanceWithContext` to Speedup By Name Scans (PR #160207)

2025-09-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/160207 >From b4d2b6ddd19c04d7347a24a840b8a36c76a4eec0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 22 Sep 2025 09:36:21 -0700 Subject: [PATCH 1/5] Initial commit, adding CompilerInstanceWithContext header an

[clang] [clang][Dependency Scanning][NFC] Move `DependencyScanningAction` to its own header and source files (PR #160795)

2025-09-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/160795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning][NFC] Move `DependencyScanningAction` to its own header and source files (PR #160795)

2025-09-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/160795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning][NFC] Move `DependencyScanningAction` to its own header and source files (PR #160795)

2025-09-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/160795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning][NFC] Move `DependencyScanningAction` to its own header and source files (PR #160795)

2025-09-26 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Thanks so much for the prompt review! The latest commit: 1. Reordered the private/helper functions to keep the original order as much as possible (and processed with clang-format). `sanitizeDiagOpts` is the outstanding one since it is used in two different files and I kept its

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-02 Thread Qiongsi Wu via cfe-commits
@@ -453,24 +580,41 @@ bool DependencyScanningAction::runInvocation( ScanInstance.getPreprocessorOpts().ImplicitPCHInclude, ScanInstance, ScanInstance.getHeaderSearchOpts().PrebuiltModuleFiles, PrebuiltModulesASTMap, ScanInstance.getDiagnosti

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-02 Thread Qiongsi Wu via cfe-commits
@@ -453,24 +580,41 @@ bool DependencyScanningAction::runInvocation( ScanInstance.getPreprocessorOpts().ImplicitPCHInclude, ScanInstance, ScanInstance.getHeaderSearchOpts().PrebuiltModuleFiles, PrebuiltModulesASTMap, ScanInstance.getDiagnosti

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-02 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/161300 >From 554613b511baa2772e0f1871008fd124bdc48700 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 29 Sep 2025 16:46:02 -0700 Subject: [PATCH 1/4] Extract dependency scanning compiler instance initialization

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-02 Thread Qiongsi Wu via cfe-commits
@@ -480,26 +624,63 @@ bool DependencyScanningAction::runInvocation( case ScanningOutputFormat::P1689: case ScanningOutputFormat::Full: MDC = std::make_shared( -Service, std::move(Opts), ScanInstance, Consumer, Controller, -OriginalInvocation, std::move(P

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-02 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/161300 >From 554613b511baa2772e0f1871008fd124bdc48700 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 29 Sep 2025 16:46:02 -0700 Subject: [PATCH 1/5] Extract dependency scanning compiler instance initialization

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-02 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/161300 >From 554613b511baa2772e0f1871008fd124bdc48700 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 29 Sep 2025 16:46:02 -0700 Subject: [PATCH 1/4] Extract dependency scanning compiler instance initialization

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-01 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/161300 >From 554613b511baa2772e0f1871008fd124bdc48700 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 29 Sep 2025 16:46:02 -0700 Subject: [PATCH 1/3] Extract dependency scanning compiler instance initialization

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-01 Thread Qiongsi Wu via cfe-commits
@@ -434,14 +535,39 @@ bool DependencyScanningAction::runInvocation( ScanInstance.createSourceManager(*FileMgr); + // Consider different header search and diagnostic options to create + // different modules. This avoids the unsound aliasing of module PCMs. + // + // TODO

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-01 Thread Qiongsi Wu via cfe-commits
@@ -72,9 +74,77 @@ class DependencyScanningAction { bool DiagConsumerFinished = false; }; -// Helper functions -void sanitizeDiagOpts(DiagnosticOptions &DiagOpts); +// Helper functions and data types. +std::unique_ptr +createDiagOptions(const std::vector &CommandLine); -

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-01 Thread Qiongsi Wu via cfe-commits
@@ -72,9 +74,77 @@ class DependencyScanningAction { bool DiagConsumerFinished = false; }; -// Helper functions -void sanitizeDiagOpts(DiagnosticOptions &DiagOpts); +// Helper functions and data types. +std::unique_ptr +createDiagOptions(const std::vector &CommandLine); +st

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-01 Thread Qiongsi Wu via cfe-commits
@@ -453,8 +583,18 @@ bool DependencyScanningAction::runInvocation( ScanInstance.getPreprocessorOpts().ImplicitPCHInclude, ScanInstance, ScanInstance.getHeaderSearchOpts().PrebuiltModuleFiles, PrebuiltModulesASTMap, ScanInstance.getDiagnostic

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-02 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/161300 >From 554613b511baa2772e0f1871008fd124bdc48700 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 29 Sep 2025 16:46:02 -0700 Subject: [PATCH 1/3] Extract dependency scanning compiler instance initialization

[clang] [clang][Dependency Scanning] Refactor Scanning Compiler Instance Initialization (PR #161300)

2025-10-02 Thread Qiongsi Wu via cfe-commits
@@ -355,44 +355,149 @@ void clang::tooling::dependencies::sanitizeDiagOpts( .Default(true); }); } +} // namespace -bool DependencyScanningAction::runInvocation( -std::shared_ptr Invocation, -IntrusiveRefCntPtr FS, -std::shared_ptr PCHContainerOps, -D

<    1   2   3   4