[clang] [clang-format] Fix a misannotation of redundant r_paren as CastRParen (PR #105921)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 24 19:43:38 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference:
```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-Wthread-safety', '-Wthread-safety-reference', '-Wthread-safety-beta', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 5862 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80
FAIL: SanitizerCommon-lsan-x86_64-Linux :: Linux/soft_rss_limit_mb_test.cpp (4900 of 5862)
******************** TEST 'SanitizerCommon-lsan-x86_64-Linux :: Linux/soft_rss_limit_mb_test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux/build/build_default/bin/clang  --driver-mode=g++ -gline-tables-only -fsanitize=leak  -m64 -funwind-tables -nobuiltininc -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include -idirafter /home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include -resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build -Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux  -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test -ldl -O2 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp -o /home/b/sanitizer-x86_64-linux/build/compiler_rt_build/test/sanitizer_common/lsan-x86_64-Linux/Linux/Output/soft_rss_limit_mb_test.cpp.tmp
+ /home/b/sanitizer-x86_64-linux/build/build_default/bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=leak -m64 -funwind-tables -nobuiltininc -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include -idirafter /home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include -resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build -Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test -ldl -O2 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp -o /home/b/sanitizer-x86_64-linux/build/compiler_rt_build/test/sanitizer_common/lsan-x86_64-Linux/Linux/Output/soft_rss_limit_mb_test.cpp.tmp
RUN: at line 5: env LSAN_OPTIONS=soft_rss_limit_mb=220:quarantine_size=1:allocator_may_return_null=1      /home/b/sanitizer-x86_64-linux/build/compiler_rt_build/test/sanitizer_common/lsan-x86_64-Linux/Linux/Output/soft_rss_limit_mb_test.cpp.tmp 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp -check-prefix=CHECK_MAY_RETURN_1
+ env LSAN_OPTIONS=soft_rss_limit_mb=220:quarantine_size=1:allocator_may_return_null=1 /home/b/sanitizer-x86_64-linux/build/compiler_rt_build/test/sanitizer_common/lsan-x86_64-Linux/Linux/Output/soft_rss_limit_mb_test.cpp.tmp
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp -check-prefix=CHECK_MAY_RETURN_1
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp:68:24: error: CHECK_MAY_RETURN_1: expected string not found in input
// CHECK_MAY_RETURN_1: allocating 512 times
                       ^
<stdin>:52:44: note: scanning from here
Some of the malloc calls returned non-null: 256
                                           ^
<stdin>:53:14: note: possible intended match here
==3632483==LeakSanitizer: soft rss limit unexhausted (220Mb vs 2Mb)
             ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           47:  [256] 
           48:  [320] 
           49:  [384] 
           50:  [448] 
           51: Some of the malloc calls returned null: 256 
           52: Some of the malloc calls returned non-null: 256 
check:68'0                                                X~~~~ error: no match found
           53: ==3632483==LeakSanitizer: soft rss limit unexhausted (220Mb vs 2Mb) 
Step 16 (test standalone compiler-rt) failure: test standalone compiler-rt (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-Wthread-safety', '-Wthread-safety-reference', '-Wthread-safety-beta', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/x86_64-unknown-linux-gnu". This path was found by running ['/home/b/sanitizer-x86_64-linux/build/build_default/bin/clang', '--target=x86_64-unknown-linux-gnu', '-m64', '-nobuiltininc', '-I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include', '-idirafter', '/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include', '-resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build', '-Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 5862 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80
FAIL: SanitizerCommon-lsan-x86_64-Linux :: Linux/soft_rss_limit_mb_test.cpp (4900 of 5862)
******************** TEST 'SanitizerCommon-lsan-x86_64-Linux :: Linux/soft_rss_limit_mb_test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/b/sanitizer-x86_64-linux/build/build_default/bin/clang  --driver-mode=g++ -gline-tables-only -fsanitize=leak  -m64 -funwind-tables -nobuiltininc -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include -idirafter /home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include -resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build -Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux  -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test -ldl -O2 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp -o /home/b/sanitizer-x86_64-linux/build/compiler_rt_build/test/sanitizer_common/lsan-x86_64-Linux/Linux/Output/soft_rss_limit_mb_test.cpp.tmp
+ /home/b/sanitizer-x86_64-linux/build/build_default/bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=leak -m64 -funwind-tables -nobuiltininc -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/include -idirafter /home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/20/include -resource-dir=/home/b/sanitizer-x86_64-linux/build/compiler_rt_build -Wl,-rpath,/home/b/sanitizer-x86_64-linux/build/compiler_rt_build/lib/linux -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test -ldl -O2 /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp -o /home/b/sanitizer-x86_64-linux/build/compiler_rt_build/test/sanitizer_common/lsan-x86_64-Linux/Linux/Output/soft_rss_limit_mb_test.cpp.tmp
RUN: at line 5: env LSAN_OPTIONS=soft_rss_limit_mb=220:quarantine_size=1:allocator_may_return_null=1      /home/b/sanitizer-x86_64-linux/build/compiler_rt_build/test/sanitizer_common/lsan-x86_64-Linux/Linux/Output/soft_rss_limit_mb_test.cpp.tmp 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp -check-prefix=CHECK_MAY_RETURN_1
+ env LSAN_OPTIONS=soft_rss_limit_mb=220:quarantine_size=1:allocator_may_return_null=1 /home/b/sanitizer-x86_64-linux/build/compiler_rt_build/test/sanitizer_common/lsan-x86_64-Linux/Linux/Output/soft_rss_limit_mb_test.cpp.tmp
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp -check-prefix=CHECK_MAY_RETURN_1
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp:68:24: error: CHECK_MAY_RETURN_1: expected string not found in input
// CHECK_MAY_RETURN_1: allocating 512 times
                       ^
<stdin>:52:44: note: scanning from here
Some of the malloc calls returned non-null: 256
                                           ^
<stdin>:53:14: note: possible intended match here
==3632483==LeakSanitizer: soft rss limit unexhausted (220Mb vs 2Mb)
             ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            .
            .
            .
           47:  [256] 
           48:  [320] 
           49:  [384] 
           50:  [448] 
           51: Some of the malloc calls returned null: 256 
           52: Some of the malloc calls returned non-null: 256 
check:68'0                                                X~~~~ error: no match found
           53: ==3632483==LeakSanitizer: soft rss limit unexhausted (220Mb vs 2Mb) 

```

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


More information about the cfe-commits mailing list