[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-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] 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] 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][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] 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-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-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] 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] [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-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] [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][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] [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][Modules] Reporting Errors for Duplicating Link Declarations in `modulemap`s (PR #148959)

2025-07-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/5] Initial implementation of modulemap link decl duplication ch

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

2025-07-16 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/3] Initial implementation of modulemap link decl duplication ch

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

2025-07-15 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-07-15 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/148959 This PR teaches the modulemap parsing logic to report errors if the parsing logic sees duplicating link declarations in the same module. Specifically, duplicating link declarations means multiple link declara

[clang] [clang][Dependency Scanning] Report only Regular File Size Changes When Computing Out-of-Date File System Cache Entries (PR #148082)

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

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/144105 >From 2187de3d30045a02c03ca009f2497608ab6bc6a4 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 12 Jun 2025 16:05:32 -0700 Subject: [PATCH 1/5] Enhancing DependencyScanningFilesystemSharedCache's API that

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

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

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-24 Thread Qiongsi Wu via cfe-commits
@@ -220,13 +221,34 @@ class DependencyScanningFilesystemSharedCache { CacheShard &getShardForFilename(StringRef Filename) const; CacheShard &getShardForUID(llvm::sys::fs::UniqueID UID) const; - /// Visits all cached entries and re-stat an entry using FS if - /// it is ne

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/144105 >From 2187de3d30045a02c03ca009f2497608ab6bc6a4 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 12 Jun 2025 16:05:32 -0700 Subject: [PATCH 1/3] Enhancing DependencyScanningFilesystemSharedCache's API that

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/144105 >From 2187de3d30045a02c03ca009f2497608ab6bc6a4 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 12 Jun 2025 16:05:32 -0700 Subject: [PATCH 1/4] Enhancing DependencyScanningFilesystemSharedCache's API that

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-23 Thread Qiongsi Wu via cfe-commits
@@ -220,13 +220,41 @@ class DependencyScanningFilesystemSharedCache { CacheShard &getShardForFilename(StringRef Filename) const; CacheShard &getShardForUID(llvm::sys::fs::UniqueID UID) const; - /// Visits all cached entries and re-stat an entry using FS if - /// it is ne

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/144105 >From 2187de3d30045a02c03ca009f2497608ab6bc6a4 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 12 Jun 2025 16:05:32 -0700 Subject: [PATCH 1/2] Enhancing DependencyScanningFilesystemSharedCache's API that

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/144105 >From 2187de3d30045a02c03ca009f2497608ab6bc6a4 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 12 Jun 2025 16:05:32 -0700 Subject: [PATCH 1/2] Enhancing DependencyScanningFilesystemSharedCache's API that

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

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

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/144105 >From 2187de3d30045a02c03ca009f2497608ab6bc6a4 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Thu, 12 Jun 2025 16:05:32 -0700 Subject: [PATCH 1/3] Enhancing DependencyScanningFilesystemSharedCache's API that

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

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

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-23 Thread Qiongsi Wu via cfe-commits
@@ -220,13 +220,41 @@ class DependencyScanningFilesystemSharedCache { CacheShard &getShardForFilename(StringRef Filename) const; CacheShard &getShardForUID(llvm::sys::fs::UniqueID UID) const; - /// Visits all cached entries and re-stat an entry using FS if - /// it is ne

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-23 Thread Qiongsi Wu via cfe-commits
@@ -107,31 +107,39 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } -std::vector -DependencyScanningFilesystemSharedCache::getInvalidNegativeStatCachedPaths( +std::vector +DependencyScanningFilesystemSharedCache::getInvalidE

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

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

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-13 Thread Qiongsi Wu via cfe-commits
@@ -107,31 +107,39 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } -std::vector -DependencyScanningFilesystemSharedCache::getInvalidNegativeStatCachedPaths( +std::vector +DependencyScanningFilesystemSharedCache::getInvalidE

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

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

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-13 Thread Qiongsi Wu via cfe-commits
@@ -220,13 +220,41 @@ class DependencyScanningFilesystemSharedCache { CacheShard &getShardForFilename(StringRef Filename) const; CacheShard &getShardForUID(llvm::sys::fs::UniqueID UID) const; - /// Visits all cached entries and re-stat an entry using FS if - /// it is ne

[clang] [clang Dependency Scanning] Enhance File Caching Diagnostics (PR #144105)

2025-06-13 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/144105 `DependencyScanningFileSystemSharedCache` can currently report invalid negative stat cached paths. This PR enhances the reporting with two modifications. 1. The reported path are now null terminated char arr

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

2025-05-29 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/140820 ___ 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][Unit Test] Updating Negative Stat Caching Diagnostic Unit Test (PR #138955)

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

[clang] [clang][Unit Test] Updating Negative Stat Caching Diagnostic Unit Test (PR #138955)

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

[clang] [clang][Unit Test] Updating Negative Stat Caching Diagnostic Unit Test (PR #138955)

2025-05-07 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/138955 This PR makes a minor modification to make it more stable. The only change is adding a suffix to the path under test. >From 1078b4a257ed1ed8d955b2041df73977fa45e3ed Mon Sep 17 00:00:00 2001 From: Qiongsi Wu

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

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

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

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

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

2025-04-30 Thread Qiongsi Wu via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { qiongsiwu wrote: Oh I see what you meant. Thanks for the clarification. I agree using the STL as much as possible is a good idea. In our case here, I prefer the structure for the follo

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

2025-04-30 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/137421 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

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

2025-04-30 Thread Qiongsi Wu via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { qiongsiwu wrote: Hmmm I think I am misunderstanding something. Is this what we are proposing? Instead of ``` std::vector ClangModuleDeps; ``` we have ``` std::vector> ClangModule

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

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

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
@@ -183,7 +192,7 @@ struct ModuleDeps { /// /// This may include modules with a different context hash when it can be /// determined that the differences are benign for this compilation. - std::vector ClangModuleDeps; + std::vector ClangModuleDeps; qion

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/137421 >From 0093c2f13aad26b49ff6584ac56184549dcaca84 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 25 Apr 2025 15:51:07 -0700 Subject: [PATCH 1/5] Adding an API to report exported modules and update existing

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
@@ -183,7 +192,7 @@ struct ModuleDeps { /// /// This may include modules with a different context hash when it can be /// determined that the differences are benign for this compilation. - std::vector ClangModuleDeps; + std::vector ClangModuleDeps; qion

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
@@ -115,6 +115,15 @@ struct ModuleID { } }; +struct ExtendedModuleID { qiongsiwu wrote: The structure is renamed and its definition is moved into `struct ModuleDeps` for better context. > why not use a std::pair? It comes with operator overloads. What i

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,164 @@ +// Test correctly reporting what a module exports during dependency scanning. +// Module A depends on modules B, C and D, but only exports B and C. +// Module E depends on modules B, C and D, and exports all of them. + +// RUN: rm -rf %t +// RUN: split-file %s %

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/137421 >From 0093c2f13aad26b49ff6584ac56184549dcaca84 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 25 Apr 2025 15:51:07 -0700 Subject: [PATCH 1/4] Adding an API to report exported modules and update existing

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-29 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/137421 >From 0093c2f13aad26b49ff6584ac56184549dcaca84 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 25 Apr 2025 15:51:07 -0700 Subject: [PATCH 1/3] Adding an API to report exported modules and update existing

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

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

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

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

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Note to reviewers: `clang/test/ClangScanDeps/export.c` is the new test. The rest of the test changes are updates. https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

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

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/137421 We would like to report, for a module, what modules it exports during dependency scanning. This PR implements this reporting by augmenting `ModuleDep`'s `ClangModuleDeps` variable. `ClangModuleDeps` now conta

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-24 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Closing this PR since we will have the changes in https://github.com/swiftlang/llvm-project/pull/10524. https://github.com/llvm/llvm-project/pull/136773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

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

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-24 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > If the only use is in a downstream of Clang, do we need to upstream the > changes at all? We could always upstream once there's an in-tree need for the > functionality. No, we don't _need_ to upstream. I don't have a strong feeling - I am upstreaming it because functionally

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Hi @AaronBallman ! Again I appreciate your suggestion. I ran into some complexities when adding a test. It is precisely that this is a very internal API that is giving me some trouble. Since `clang/tools/libclang/CXString.h` is not an exposed header, I cannot really even add i

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > Where is this new API expected to be used? An intended use can be found here https://github.com/swiftlang/llvm-project/pull/10524, where we try to pass up a collection of strings to the user, and we try not to create copies of the strings. https://github.com/llvm/llvm-pro

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > > > Where is this new API expected to be used? > > > > > > An intended use can be found here > > [swiftlang#10524](https://github.com/swiftlang/llvm-project/pull/10524), > > where we try to pass up a collection of strings to the user, and we try not > > to create copies of

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector &Strings) { +template +static CXStringSet *createSetImpl(ArrayRef Strings) { qiongsiwu wrote: Ah yes this is good to keep in mind. I r

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector &Strings) { +template +static CXStringSet *createSetImpl(ArrayRef Strings) { CXStringSet *Set = new CXStringSet; Set->Count = Strings.size(); S

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/136773 >From 7f39ebcc34fe3f40c2554ff7fa93baca5b4634a0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 22 Apr 2025 14:17:15 -0700 Subject: [PATCH 1/5] Adding CXStringSet *createSet that takes a vector of StringR

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/136773 >From 7f39ebcc34fe3f40c2554ff7fa93baca5b4634a0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 22 Apr 2025 14:17:15 -0700 Subject: [PATCH 1/4] Adding CXStringSet *createSet that takes a vector of StringR

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/136773 >From 7f39ebcc34fe3f40c2554ff7fa93baca5b4634a0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 22 Apr 2025 14:17:15 -0700 Subject: [PATCH 1/3] Adding CXStringSet *createSet that takes a vector of StringR

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-22 Thread Qiongsi Wu via cfe-commits
@@ -116,6 +117,13 @@ CXStringSet *createSet(const std::vector &Strings) { return Set; } +CXStringSet *createSet(const std::vector &Strings) { + return createSetImpl(Strings); +} + +CXStringSet *createSet(const std::vector &Strings) { + return createSetImpl(Strings); -

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/136773 >From 7f39ebcc34fe3f40c2554ff7fa93baca5b4634a0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 22 Apr 2025 14:17:15 -0700 Subject: [PATCH 1/2] Adding CXStringSet *createSet that takes a vector of StringR

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/136773 The newly added API avoids converting `StringRef`s to `std::strings` when the input is a vector of `StringRef`. >From 7f39ebcc34fe3f40c2554ff7fa93baca5b4634a0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date:

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

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

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-18 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Thanks @jansvoboda11 ! The API is updated so that the end result is a vector of paths (strings), so the caller can create the diagnostics. I will add the C-API to https://github.com/swiftlang/llvm-project after this PR lands. https://github.com/llvm/llvm-project/pull/135703

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/135703 >From d4b1210c16b4fccc6faa9445bee457a1e330a025 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Apr 2025 16:49:07 -0700 Subject: [PATCH 1/4] Initial commit. --- .../DependencyScanningFilesystem.h

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-18 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache:: +diagnoseInvalidNegativeStatCachedPaths( +std::vector &InvalidPaths, +llvm::vfs::FileSyst

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-18 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache:: +diagnoseInvalidNegativeStatCachedPaths( +std::vector &InvalidPaths, qiongsiwu w

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/135703 >From d4b1210c16b4fccc6faa9445bee457a1e330a025 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Apr 2025 16:49:07 -0700 Subject: [PATCH 1/5] Initial commit. --- .../DependencyScanningFilesystem.h

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-17 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,33 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +std::vector +DependencyScanningFilesystemSharedCache::getInvalidNegativeStatCachedPaths( +llvm::vfs::FileSystem &UnderlyingFS) const { + // Iterate thr

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/135703 >From d4b1210c16b4fccc6faa9445bee457a1e330a025 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Apr 2025 16:49:07 -0700 Subject: [PATCH 1/6] Initial commit. --- .../DependencyScanningFilesystem.h

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-17 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache:: +diagnoseInvalidNegativeStatCachedPaths( qiongsiwu wrote: Good point! Fixed. https://

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-16 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > On a second thought, what's the current intent for build system integration? > I'm curious why we're emitting a diagnostic here rather than just passing the > list of paths back to the build system and letting it decide how to report > these. This is a good point. Additiona

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,31 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths( +llvm::raw_ostream &OS, llvm::vfs::FileSystem &UnderlyingFS) const { + /

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/135703 >From d4b1210c16b4fccc6faa9445bee457a1e330a025 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Apr 2025 16:49:07 -0700 Subject: [PATCH 1/3] Initial commit. --- .../DependencyScanningFilesystem.h

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

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

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths( +llvm::raw_ostream &OS, llvm::vfs::FileSystem &UnderlyingFS) const { + /

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths( qiongsiwu wrote: Yes good catch! This should have a lock.

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths( +llvm::raw_ostream &OS, llvm::vfs::FileSystem &UnderlyingFS) const { + /

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/135703 >From d4b1210c16b4fccc6faa9445bee457a1e330a025 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Apr 2025 16:49:07 -0700 Subject: [PATCH 1/2] Initial commit. --- .../DependencyScanningFilesystem.h

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

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

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Note to reviewers: I am not quite sure if passing in the underlying VFS is a good design. If I understand correctly, the underlying VFS is a dependency scanning worker property, so on the surface it seems that we will need this diagnostic per worker, instead of per scanning se

  1   2   3   4   >