[clang] [clang-tools-extra] [clang][AST] Fix StmtProfile handling of GCCAsmStmt asm strings and clobbers (PR #201481)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 4 01:44:22 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 54106 tests passed
* 1289 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/checkers/bugprone/branch-clone-inline-asm.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
C:/Python312/python.exe C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\bugprone\branch-clone-inline-asm.cpp bugprone-branch-clone C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp --
# executed command: C:/Python312/python.exe 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py' 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\bugprone\branch-clone-inline-asm.cpp' bugprone-branch-clone 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp' --
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', 'C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\bugprone\\Output\\branch-clone-inline-asm.cpp.tmp.cpp', '-fix', '--checks=-*,bugprone-branch-clone', '--config={}', '--', '-std=c++11', '-nostdinc++', '-isystem', 'C:\\_work\\llvm-project\\llvm-project\\clang-tools-extra\\test\\clang-tidy\\checkers\\Inputs\\Headers\\std']...
# | clang-tidy --experimental-custom-checks C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp -fix --checks=-*,bugprone-branch-clone --config={} -- -std=c++11 -nostdinc++ -isystem C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\Inputs\Headers\std failed:
# | 2 warnings and 4 errors generated.
# |
# | Error while processing C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp.
# |
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp:4:3: warning: if with identical then and else branches [bugprone-branch-clone]
# | 4 | if (argc > 1) {
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp:10:5: note: else branch starts here
# | 10 | } else {
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp:37:3: warning: if with identical then and else branches [bugprone-branch-clone]
# | 37 | if (argc > 1) {
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp:45:5: note: else branch starts here
# | 45 | } else {
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp:43:9: error: unknown register name 'w0' in asm [clang-diagnostic-error]
# | 43 | : "w0"
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp:51:9: error: unknown register name 'w0' in asm [clang-diagnostic-error]
# | 51 | : "w0"
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp:64:9: error: unknown register name 'w0' in asm [clang-diagnostic-error]
# | 64 | : "w0"
# | | ^
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\bugprone\Output\branch-clone-inline-asm.cpp.tmp.cpp:71:9: error: unknown register name 'w1' in asm [clang-diagnostic-error]
# | 71 | : "w1"
# | | ^
# | Found compiler errors, but -fix-errors was not specified.
# |
# | Fixes have NOT been applied.
# |
# |
# |
# | Found compiler error(s).
# |
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 558, in <module>
# | main()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 554, in main
# | CheckRunner(args, extra_args).run()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 426, in run
# | clang_tidy_output = self.run_clang_tidy()
# | ^^^^^^^^^^^^^^^^^^^^^
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 289, in run_clang_tidy
# | clang_tidy_output = try_run(args)
# | ^^^^^^^^^^^^^
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 64, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "c:\python312\Lib\subprocess.py", line 466, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# | File "c:\python312\Lib\subprocess.py", line 571, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['clang-tidy', '--experimental-custom-checks', 'C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\bugprone\\Output\\branch-clone-inline-asm.cpp.tmp.cpp', '-fix', '--checks=-*,bugprone-branch-clone', '--config={}', '--', '-std=c++11', '-nostdinc++', '-isystem', 'C:\\_work\\llvm-project\\llvm-project\\clang-tools-extra\\test\\clang-tidy\\checkers\\Inputs\\Headers\\std']' returned non-zero exit status 1.
# `-----------------------------
# 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/201481
More information about the cfe-commits
mailing list