[clang] [clang][tools] Handle weak (and duplicate) symbols in clang-extdef-mapping (PR #222010)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 03:09:41 PDT 2026


=?utf-8?q?Balázs_Kéri?= <balazs.keri at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/222010 at github.com>


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 56438 tests passed
* 1565 tests skipped
* 4 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.Analysis/ctu/test-strong-weak-sym.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 2
mkdir -p C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp
# executed command: mkdir -p 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 3
split-file C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-strong-weak-sym.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp
# executed command: split-file 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-strong-weak-sym.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/a.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/a.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/a.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/a.c'
# note: command had no output on stdout or stderr
# RUN: at line 6
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/b.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/b.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/b.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/b.c'
# note: command had no output on stdout or stderr
# RUN: at line 8
c:\_work\llvm-project\llvm-project\build\bin\clang-extdef-mapping.exe C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/a.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/b.c -- -c -x c > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/externalDefMap.tmp1.txt
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang-extdef-mapping.exe' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/a.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/b.c' -- -c -x c
# .---command stderr------------
# | [1/2] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp\a.c.
# | [2/2] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp\b.c.
# `-----------------------------
# RUN: at line 9
sed -e 's|\.c$|.c.ast|g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/externalDefMap.tmp1.txt > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/externalDefMap.tmp2.txt
# executed command: sed -e 's|\.c$|.c.ast|g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/externalDefMap.tmp1.txt'
# note: command had no output on stdout or stderr
# RUN: at line 10
sed -e 's|C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp\/||g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/externalDefMap.tmp2.txt > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/externalDefMap.txt
# executed command: sed -e 's|C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp\/||g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/externalDefMap.tmp2.txt'
# note: command had no output on stdout or stderr
# RUN: at line 12
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -analyze -triple x86_64-pc-linux-gnu    -analyzer-checker=core    -analyzer-config experimental-enable-naive-ctu-analysis=true    -analyzer-config display-ctu-progress=true    -analyzer-config ctu-dir=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp    -verify C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/main.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-strong-weak-sym.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -analyze -triple x86_64-pc-linux-gnu -analyzer-checker=core -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config display-ctu-progress=true -analyzer-config 'ctu-dir=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp' -verify 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/main.c'
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-strong-weak-sym.c'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-strong-weak-sym.c:22:11: error: CHECK: expected string not found in input
# | // CHECK: CTU loaded AST file: a.c.ast
# |           ^
# | <stdin>:1:1: note: scanning from here
# | error: unable to load precompiled file
# | ^
# | <stdin>:2:1: note: possible intended match here
# | CTU loaded AST file: C:/_work/llvm-project/llvm-project/build/tools/clang/test/Analysis/ctu/Output/test-strong-weak-sym.c.tmp/a.c.ast
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-strong-weak-sym.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: error: unable to load precompiled file 
# | check:22'0    {                                         search range start (exclusive)
# | check:22'1                                              error: no match found in search range
# |             2: CTU loaded AST file: C:/_work/llvm-project/llvm-project/build/tools/clang/test/Analysis/ctu/Output/test-strong-weak-sym.c.tmp/a.c.ast 
# | check:22'2     ?                                                                                                                                       possible intended match
# |             3: error: 'expected-error' diagnostics seen but not expected:  
# |             4:  File C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-strong-weak-sym.c.tmp/main.c Line 8: import of an external symbol for CTU failed: Failed to load external AST source. 
# |             5: 1 error generated. 
# | check:22'3                        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.Analysis/ctu/test-weak-strong-sym.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 2
mkdir -p C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp
# executed command: mkdir -p 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 3
split-file C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-sym.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp
# executed command: split-file 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-sym.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/a.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/a.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/a.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/a.c'
# note: command had no output on stdout or stderr
# RUN: at line 6
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/b.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/b.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/b.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/b.c'
# note: command had no output on stdout or stderr
# RUN: at line 8
c:\_work\llvm-project\llvm-project\build\bin\clang-extdef-mapping.exe C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/a.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/b.c -- -c -x c > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/externalDefMap.tmp1.txt
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang-extdef-mapping.exe' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/a.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/b.c' -- -c -x c
# .---command stderr------------
# | [1/2] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp\a.c.
# | [2/2] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp\b.c.
# `-----------------------------
# RUN: at line 9
sed -e 's|\.c$|.c.ast|g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/externalDefMap.tmp1.txt > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/externalDefMap.tmp2.txt
# executed command: sed -e 's|\.c$|.c.ast|g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/externalDefMap.tmp1.txt'
# note: command had no output on stdout or stderr
# RUN: at line 10
sed -e 's|C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp\/||g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/externalDefMap.tmp2.txt > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/externalDefMap.txt
# executed command: sed -e 's|C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp\/||g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/externalDefMap.tmp2.txt'
# note: command had no output on stdout or stderr
# RUN: at line 12
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -analyze -triple x86_64-pc-linux-gnu    -analyzer-checker=core    -analyzer-config experimental-enable-naive-ctu-analysis=true    -analyzer-config display-ctu-progress=true    -analyzer-config ctu-dir=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp    -verify C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/main.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-sym.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -analyze -triple x86_64-pc-linux-gnu -analyzer-checker=core -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config display-ctu-progress=true -analyzer-config 'ctu-dir=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp' -verify 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/main.c'
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-sym.c'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-sym.c:22:11: error: CHECK: expected string not found in input
# | // CHECK: CTU loaded AST file: b.c.ast
# |           ^
# | <stdin>:1:1: note: scanning from here
# | error: unable to load precompiled file
# | ^
# | <stdin>:2:1: note: possible intended match here
# | CTU loaded AST file: C:/_work/llvm-project/llvm-project/build/tools/clang/test/Analysis/ctu/Output/test-weak-strong-sym.c.tmp/b.c.ast
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-sym.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: error: unable to load precompiled file 
# | check:22'0    {                                         search range start (exclusive)
# | check:22'1                                              error: no match found in search range
# |             2: CTU loaded AST file: C:/_work/llvm-project/llvm-project/build/tools/clang/test/Analysis/ctu/Output/test-weak-strong-sym.c.tmp/b.c.ast 
# | check:22'2     ?                                                                                                                                       possible intended match
# |             3: error: 'expected-error' diagnostics seen but not expected:  
# |             4:  File C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-sym.c.tmp/main.c Line 8: import of an external symbol for CTU failed: Failed to load external AST source. 
# |             5: 1 error generated. 
# | check:22'3                        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.Analysis/ctu/test-weak-strong-weak-sym.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 2
mkdir -p C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp
# executed command: mkdir -p 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 3
split-file C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-weak-sym.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp
# executed command: split-file 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-weak-sym.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/a.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/a.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/a.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/a.c'
# note: command had no output on stdout or stderr
# RUN: at line 6
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/b.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/b.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/b.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/b.c'
# note: command had no output on stdout or stderr
# RUN: at line 7
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/c.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/c.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/c.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/c.c'
# note: command had no output on stdout or stderr
# RUN: at line 9
c:\_work\llvm-project\llvm-project\build\bin\clang-extdef-mapping.exe C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/a.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/b.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/c.c -- -c -x c > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/externalDefMap.tmp1.txt
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang-extdef-mapping.exe' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/a.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/b.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/c.c' -- -c -x c
# .---command stderr------------
# | [1/3] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp\a.c.
# | [2/3] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp\b.c.
# | [3/3] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp\c.c.
# `-----------------------------
# RUN: at line 10
sed -e 's|\.c$|.c.ast|g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/externalDefMap.tmp1.txt > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/externalDefMap.tmp2.txt
# executed command: sed -e 's|\.c$|.c.ast|g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/externalDefMap.tmp1.txt'
# note: command had no output on stdout or stderr
# RUN: at line 11
sed -e 's|C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp\/||g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/externalDefMap.tmp2.txt > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/externalDefMap.txt
# executed command: sed -e 's|C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp\/||g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/externalDefMap.tmp2.txt'
# note: command had no output on stdout or stderr
# RUN: at line 13
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -analyze -triple x86_64-pc-linux-gnu    -analyzer-checker=core    -analyzer-config experimental-enable-naive-ctu-analysis=true    -analyzer-config display-ctu-progress=true    -analyzer-config ctu-dir=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp    -verify C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/main.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-weak-sym.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -analyze -triple x86_64-pc-linux-gnu -analyzer-checker=core -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config display-ctu-progress=true -analyzer-config 'ctu-dir=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp' -verify 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/main.c'
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-weak-sym.c'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-weak-sym.c:23:11: error: CHECK: expected string not found in input
# | // CHECK: CTU loaded AST file: b.c.ast
# |           ^
# | <stdin>:1:1: note: scanning from here
# | error: unable to load precompiled file
# | ^
# | <stdin>:2:1: note: possible intended match here
# | CTU loaded AST file: C:/_work/llvm-project/llvm-project/build/tools/clang/test/Analysis/ctu/Output/test-weak-strong-weak-sym.c.tmp/b.c.ast
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-strong-weak-sym.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: error: unable to load precompiled file 
# | check:23'0    {                                         search range start (exclusive)
# | check:23'1                                              error: no match found in search range
# |             2: CTU loaded AST file: C:/_work/llvm-project/llvm-project/build/tools/clang/test/Analysis/ctu/Output/test-weak-strong-weak-sym.c.tmp/b.c.ast 
# | check:23'2     ?                                                                                                                                            possible intended match
# |             3: error: 'expected-error' diagnostics seen but not expected:  
# |             4:  File C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-strong-weak-sym.c.tmp/main.c Line 8: import of an external symbol for CTU failed: Failed to load external AST source. 
# |             5: 1 error generated. 
# | check:23'3                        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.Analysis/ctu/test-weak-weak-sym.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 2
mkdir -p C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp
# executed command: mkdir -p 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 3
split-file C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-weak-sym.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp
# executed command: split-file 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-weak-sym.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp'
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/a.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/a.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/a.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/a.c'
# note: command had no output on stdout or stderr
# RUN: at line 6
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -x c -emit-pch -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/b.c.ast C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/b.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -x c -emit-pch -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/b.c.ast' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/b.c'
# note: command had no output on stdout or stderr
# RUN: at line 8
c:\_work\llvm-project\llvm-project\build\bin\clang-extdef-mapping.exe C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/a.c C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/b.c -- -c -x c > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/externalDefMap.tmp1.txt
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang-extdef-mapping.exe' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/a.c' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/b.c' -- -c -x c
# .---command stderr------------
# | [1/2] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp\a.c.
# | [2/2] Processing file C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp\b.c.
# `-----------------------------
# RUN: at line 9
sed -e 's|\.c$|.c.ast|g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/externalDefMap.tmp1.txt > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/externalDefMap.tmp2.txt
# executed command: sed -e 's|\.c$|.c.ast|g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/externalDefMap.tmp1.txt'
# note: command had no output on stdout or stderr
# RUN: at line 10
sed -e 's|C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp\/||g' C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/externalDefMap.tmp2.txt > C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/externalDefMap.txt
# executed command: sed -e 's|C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp\/||g' 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/externalDefMap.tmp2.txt'
# note: command had no output on stdout or stderr
# RUN: at line 12
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -analyze -triple x86_64-pc-linux-gnu    -analyzer-checker=core    -analyzer-config experimental-enable-naive-ctu-analysis=true    -analyzer-config display-ctu-progress=true    -analyzer-config ctu-dir=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp    -verify C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/main.c 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-weak-sym.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -analyze -triple x86_64-pc-linux-gnu -analyzer-checker=core -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config display-ctu-progress=true -analyzer-config 'ctu-dir=C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp' -verify 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/main.c'
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-weak-sym.c'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-weak-sym.c:22:11: error: CHECK: expected string not found in input
# | // CHECK: CTU loaded AST file: a.c.ast
# |           ^
# | <stdin>:1:1: note: scanning from here
# | error: unable to load precompiled file
# | ^
# | <stdin>:2:1: note: possible intended match here
# | CTU loaded AST file: C:/_work/llvm-project/llvm-project/build/tools/clang/test/Analysis/ctu/Output/test-weak-weak-sym.c.tmp/a.c.ast
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Analysis\ctu\test-weak-weak-sym.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: error: unable to load precompiled file 
# | check:22'0    {                                         search range start (exclusive)
# | check:22'1                                              error: no match found in search range
# |             2: CTU loaded AST file: C:/_work/llvm-project/llvm-project/build/tools/clang/test/Analysis/ctu/Output/test-weak-weak-sym.c.tmp/a.c.ast 
# | check:22'2     ?                                                                                                                                     possible intended match
# |             3: error: 'expected-error' diagnostics seen but not expected:  
# |             4:  File C:\_work\llvm-project\llvm-project\build\tools\clang\test\Analysis\ctu\Output\test-weak-weak-sym.c.tmp/main.c Line 8: import of an external symbol for CTU failed: Failed to load external AST source. 
# |             5: 1 error generated. 
# | check:22'3                        } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/222010


More information about the cfe-commits mailing list