[clang] [clang] On-demand parsing for templated and internal-linkage functions (PR #210893)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 21 00:54:26 PDT 2026


github-actions[bot] wrote:

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

* 55771 tests passed
* 1407 tests skipped
* 3 tests failed

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

### Clang
<details>
<summary>Clang.AST/ast-dump-deleted-defaulted-range.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
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 -ast-dump C:\_work\llvm-project\llvm-project\clang\test\AST\ast-dump-deleted-defaulted-range.cpp | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\AST\ast-dump-deleted-defaulted-range.cpp
# 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 -ast-dump 'C:\_work\llvm-project\llvm-project\clang\test\AST\ast-dump-deleted-defaulted-range.cpp'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\AST\ast-dump-deleted-defaulted-range.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\AST\ast-dump-deleted-defaulted-range.cpp:4:11: error: CHECK: expected string not found in input
# | // CHECK: FunctionDecl{{.*}} <{{.*}}[[@LINE-1]]:1, col:18> col:6 delfunc 'void ()' delete
# |           ^
# | <stdin>:1:1: note: scanning from here
# | TranslationUnitDecl 0x23031e98f30 <<invalid sloc>> <invalid sloc>
# | ^
# | <stdin>:1:1: note: with "@LINE-1" equal to "3"
# | TranslationUnitDecl 0x23031e98f30 <<invalid sloc>> <invalid sloc>
# | ^
# | <stdin>:15:99: note: possible intended match here
# | |-FunctionDecl 0x23031e99db0 <C:\_work\llvm-project\llvm-project\clang\test\AST\ast-dump-deleted-defaulted-range.cpp:3:1, col:14> col:6 delfunc 'void ()' delete implicit-inline external-linkage
# |                                                                                                   ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\AST\ast-dump-deleted-defaulted-range.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            1: TranslationUnitDecl 0x23031e98f30 <<invalid sloc>> <invalid sloc> 
# | check:4'0    {                                                                    search range start (exclusive)
# | check:4'1                                                                         error: no match found in search range
# | check:4'2                                                                         with "@LINE-1" equal to "3"
# |            2: |-TypedefDecl 0x23031e998d8 <<invalid sloc>> <invalid sloc> implicit __int128_t '__int128' 
# |            3: | `-BuiltinType 0x23031e99500 '__int128' 
# |            4: |-TypedefDecl 0x23031e99948 <<invalid sloc>> <invalid sloc> implicit __uint128_t 'unsigned __int128' 
# |            5: | `-BuiltinType 0x23031e99520 'unsigned __int128' 
# |            6: |-TypedefDecl 0x23031e99d08 <<invalid sloc>> <invalid sloc> implicit __NSConstantString '__NSConstantString_tag' 
# |            7: | `-RecordType 0x23031e99cc0 '__NSConstantString_tag' canonical 
# |            8: | `-CXXRecord 0x23031e999a0 '__NSConstantString_tag' 
# |            9: |-TypedefDecl 0x23031e997f8 <<invalid sloc>> <invalid sloc> implicit __builtin_ms_va_list 'char *' 
# |           10: | `-PointerType 0x23031e997b0 'char *' 
# |           11: | `-BuiltinType 0x23031e98fe0 'char' 
# |           12: |-TypedefDecl 0x23031e99868 <<invalid sloc>> <invalid sloc> implicit __builtin_va_list 'char *' 
# |           13: | `-PointerType 0x23031e997b0 'char *' 
# |           14: | `-BuiltinType 0x23031e98fe0 'char' 
# |           15: |-FunctionDecl 0x23031e99db0 <C:\_work\llvm-project\llvm-project\clang\test\AST\ast-dump-deleted-defaulted-range.cpp:3:1, col:14> col:6 delfunc 'void ()' delete implicit-inline external-linkage 
# | check:4'3                                                                                                       ?                                                                                                 possible intended match
# |           16: |-CXXRecordDecl 0x2303220deb8 <line:6:1, line:8:1> line:6:8 referenced struct S definition external-linkage 
# |           17: | |-DefinitionData pass_in_registers empty standard_layout trivially_copyable has_user_declared_ctor can_const_default_init 
# |           18: | | |-DefaultConstructor exists non_trivial user_provided defaulted_is_constexpr 
# |           19: | | |-CopyConstructor simple trivial has_const_param implicit_has_const_param 
# |           20: | | |-MoveConstructor exists simple trivial 
# |            .
# |            .
# |            .
# |           70:  | |-CopyAssignment simple trivial has_const_param needs_implicit implicit_has_const_param 
# |           71:  | |-MoveAssignment exists simple trivial needs_implicit 
# |           72:  | `-Destructor simple irrelevant trivial needs_implicit 
# |           73:  |-CXXRecordDecl 0x23032225818 <col:1, col:8> col:8 implicit struct w 
# |           74:  `-CXXMethodDecl 0x23032225930 <line:32:3, col:29> col:8 g 'void ()' delete implicit-inline external-linkage 
# |           75:  `-delete message: StringLiteral 0x230322259d8 <col:21> 'NULL TYPE' lvalue "reason" 
# | check:4'4                                                                                         } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.CoverageMapping/default-method.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
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 -mllvm -emptyline-comment-coverage=false -triple x86_64-pc-windows-gnu -std=c++17 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name default-method.cpp -w C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\default-method.cpp | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\default-method.cpp -implicit-check-not="->"
# 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 -mllvm -emptyline-comment-coverage=false -triple x86_64-pc-windows-gnu -std=c++17 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name default-method.cpp -w 'C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\default-method.cpp'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\default-method.cpp' '-implicit-check-not=->'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\default-method.cpp:14:17: error: CHECK-NEXT: expected string not found in input
# |  // CHECK-NEXT: File 0, [[@LINE+1]]:32 -> [[@LINE+1]]:39 = #0
# |                 ^
# | <stdin>:1:24: note: scanning from here
# | _ZN7PR398223fooaSERS0_:
# |                        ^
# | <stdin>:1:24: note: with "@LINE+1" equal to "15"
# | _ZN7PR398223fooaSERS0_:
# |                        ^
# | <stdin>:1:24: note: with "@LINE+1" equal to "15"
# | _ZN7PR398223fooaSERS0_:
# |                        ^
# | <stdin>:2:2: note: possible intended match here
# |  File 0, 15:28 -> 15:29 = #0
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CoverageMapping\default-method.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            1: _ZN7PR398223fooaSERS0_: 
# | next:14'0                           {   search range start (exclusive)
# | next:14'1                               error: no match found in search range
# | next:14'2                               with "@LINE+1" equal to "15"
# | next:14'3                               with "@LINE+1" equal to "15"
# |            2:  File 0, 15:28 -> 15:29 = #0 
# | next:14'4      ?                             possible intended match
# | next:14'5                                  } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

### Clang-Unit
<details>
<summary>Clang-Unit._/AllClangUnitTests_exe/RecursiveASTVisitor/CXXMethodDeclNoDefaultBodyVisited</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\clang\unittests\.\AllClangUnitTests.exe --gtest_filter=RecursiveASTVisitor.CXXMethodDeclNoDefaultBodyVisited
--
C:\_work\llvm-project\llvm-project\clang\unittests\Tooling\TestVisitor.h:232
Expected equality of these values:
  TimesExpected
    Which is: 1
  TimesSeen
    Which is: 0
Expected "declref" at 8:32, partial match: "declref" at input.cc:8:28


```
</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/210893


More information about the cfe-commits mailing list