[clang] [clang][CrossTU] Indicate weak link attribute in ExternalDefMap. (PR #204188)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 16 09:16:48 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions c,cpp -- clang/test/Analysis/ctu/test-weak-sym-1.c clang/test/Analysis/ctu/test-weak-sym-2.c clang/lib/CrossTU/CrossTranslationUnit.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CrossTU/CrossTranslationUnit.cpp b/clang/lib/CrossTU/CrossTranslationUnit.cpp
index 1a0af60f7..9b6f80dc2 100644
--- a/clang/lib/CrossTU/CrossTranslationUnit.cpp
+++ b/clang/lib/CrossTU/CrossTranslationUnit.cpp
@@ -185,8 +185,8 @@ std::error_code IndexError::convertToErrorCode() const {
/// @param[out] LookupName The lookup name in format "<USR-Length>:<USR>". The
/// optional '-' is removed from it.
/// @param[out] FilePath The file path "<File-Path>".
-static bool parseCrossTUIndexItem(StringRef LineRef, bool &IsWeak, StringRef &LookupName,
- StringRef &FilePath) {
+static bool parseCrossTUIndexItem(StringRef LineRef, bool &IsWeak,
+ StringRef &LookupName, StringRef &FilePath) {
// `LineRef` is "<USR-Length>:<USR> <File-Path>" now.
size_t USRLength = 0;
``````````
</details>
https://github.com/llvm/llvm-project/pull/204188
More information about the cfe-commits
mailing list