[clang] [clang] Add source range to 'use of undeclared identifier' diagnostics (PR #117671)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 17 23:51:32 PDT 2025


Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/117671 at github.com>


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` running on `as-builder-9` while building `clang` at step 16 "test-check-lldb-api".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/7799

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 16 (test-check-lldb-api) failure: Test just built components: check-lldb-api completed (failure)
******************** TEST 'lldb-api :: commands/expression/diagnostics/TestExprDiagnostics.py' FAILED ********************
Script:
--
/usr/bin/python3.12 /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --libcxx-include-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/c++/v1 --libcxx-include-target-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/aarch64-unknown-linux-gnu/c++/v1 --libcxx-library-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib/aarch64-unknown-linux-gnu --arch aarch64 --build-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/lldb --compiler /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang --dsymutil /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --lldb-obj-root /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb --lldb-libs-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --platform-url connect://jetson-agx-2198.lab.llvm.org:1234 --platform-working-dir /home/ubuntu/lldb-tests --sysroot /mnt/fs/jetson-agx-ubuntu --env ARCH_CFLAGS=-mcpu=cortex-a78 --platform-name remote-linux --skip-category=lldb-server /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/commands/expression/diagnostics -p TestExprDiagnostics.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision cc7fc9978fc8c9b8e1da2e283026feaf85807ea5)
  clang revision cc7fc9978fc8c9b8e1da2e283026feaf85807ea5
  llvm revision cc7fc9978fc8c9b8e1da2e283026feaf85807ea5
Setting up remote platform 'remote-linux'
Connecting to remote platform 'remote-linux' at 'connect://jetson-agx-2198.lab.llvm.org:1234'...
Connected.
Setting remote platform working directory to '/home/ubuntu/lldb-tests'...
Skipping the following test categories: ['lldb-server', 'dsym', 'gmodules', 'debugserver', 'objc', 'lldb-dap']

--
Command Output (stderr):
--
WARNING:root:Custom libc++ is not supported for remote runs: ignoring --libcxx arguments
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_command_expr_sbdata_dsym (TestExprDiagnostics.ExprDiagnosticsTestCase.test_command_expr_sbdata_dsym) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_command_expr_sbdata_dwarf (TestExprDiagnostics.ExprDiagnosticsTestCase.test_command_expr_sbdata_dwarf)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_command_expr_sbdata_dwo (TestExprDiagnostics.ExprDiagnosticsTestCase.test_command_expr_sbdata_dwo)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_error_type_dsym (TestExprDiagnostics.ExprDiagnosticsTestCase.test_error_type_dsym) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_error_type_dwarf (TestExprDiagnostics.ExprDiagnosticsTestCase.test_error_type_dwarf)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_error_type_dwo (TestExprDiagnostics.ExprDiagnosticsTestCase.test_error_type_dwo)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_source_and_caret_printing_dsym (TestExprDiagnostics.ExprDiagnosticsTestCase.test_source_and_caret_printing_dsym) (test case does not fall in any category of interest for this run) 
FAIL: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_source_and_caret_printing_dwarf (TestExprDiagnostics.ExprDiagnosticsTestCase.test_source_and_caret_printing_dwarf)
FAIL: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_source_and_caret_printing_dwo (TestExprDiagnostics.ExprDiagnosticsTestCase.test_source_and_caret_printing_dwo)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_source_locations_from_objc_modules_dsym (TestExprDiagnostics.ExprDiagnosticsTestCase.test_source_locations_from_objc_modules_dsym) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_source_locations_from_objc_modules_dwarf (TestExprDiagnostics.ExprDiagnosticsTestCase.test_source_locations_from_objc_modules_dwarf) (test case does not fall in any category of interest for this run) 
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_source_locations_from_objc_modules_dwo (TestExprDiagnostics.ExprDiagnosticsTestCase.test_source_locations_from_objc_modules_dwo) (test case does not fall in any category of interest for this run) 
======================================================================
FAIL: test_source_and_caret_printing_dwarf (TestExprDiagnostics.ExprDiagnosticsTestCase.test_source_and_caret_printing_dwarf)
    Test that the source and caret positions LLDB prints are correct
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1804, in test_method
    return attrvalue(self)
           ^^^^^^^^^^^^^^^
  File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py", line 33, in test_source_and_caret_printing
    self.assertIn(
AssertionError: '\n    1 | unknown_identifier\n      | ^\n' not found in "error: <user expression 0>:1:1: use of undeclared identifier 'unknown_identifier'\n    1 | unknown_identifier\n      | ^~~~~~~~~~~~~~~~~~\n"
Config=aarch64-/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang
======================================================================
FAIL: test_source_and_caret_printing_dwo (TestExprDiagnostics.ExprDiagnosticsTestCase.test_source_and_caret_printing_dwo)
    Test that the source and caret positions LLDB prints are correct
----------------------------------------------------------------------
...

```

</details>

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


More information about the cfe-commits mailing list