[clang] [llvm] [Clang] Show inlining hints for __attribute__((warning/error)) (PR #174892)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 8 17:48:20 PST 2026


github-actions[bot] wrote:

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

* 129269 tests passed
* 2852 tests skipped
* 1 test failed

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

### Clang
<details>
<summary>Clang.Frontend/backend-attribute-inlining-debug-vs-heuristic.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\22\include -nostdsysteminc -O2 -emit-obj -fdiagnostics-show-inlining-chain C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp -o /dev/null 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp --check-prefix=HEURISTIC
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\22\include' -nostdsysteminc -O2 -emit-obj -fdiagnostics-show-inlining-chain 'C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp' -o /dev/null
# 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\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp' --check-prefix=HEURISTIC
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp:27:15: error: HEURISTIC: expected string not found in input
# | // HEURISTIC: :16:{{.*}}: warning: call to 'dangerous()'
# |               ^
# | <stdin>:1:1: note: scanning from here
# | C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp:16:5: warning: call to 'void __cdecl dangerous(void)' declared with 'warning' attribute: dangerous function [-Wattribute-warning]
# | ^
# | <stdin>:1:104: note: possible intended match here
# | C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp:16:5: warning: call to 'void __cdecl dangerous(void)' declared with 'warning' attribute: dangerous function [-Wattribute-warning]
# |                                                                                                        ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp:16:5: warning: call to 'void __cdecl dangerous(void)' declared with 'warning' attribute: dangerous function [-Wattribute-warning] 
# | check:27'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:27'1                                                                                                            ?                                                                                                                                    possible intended match
# |             2:  16 | dangerous(); 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~
# |             3:  | ^ 
# | check:27'0     ~~~~~
# |             4: C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp:16:5: warning: call to 'void __cdecl dangerous(void)' declared with 'warning' attribute: dangerous function [-Wattribute-warning] 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             5: C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp:16:5: note: called by function 'void __cdecl wrapper(void)' 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             6: C:\_work\llvm-project\llvm-project\clang\test\Frontend\backend-attribute-inlining-debug-vs-heuristic.cpp:16:5: note: inlined by function 'void __cdecl middle(void)' 
# | check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/174892


More information about the cfe-commits mailing list