[clang] [clang-tools-extra] [clang-query] Allow for trailing comma in matchers (PR #148018)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 15 05:01:47 PDT 2025


AaronBallman wrote:

It looks like precommit CI found a relevant failure:
```
******************** TEST 'Clang Tools :: clang-query/trailing-comma.c' FAILED ********************
  Exit Code: 1
  
  Command Output (stdout):
  --
  # shell parser error on RUN: at line 14: clang-query -c "$(echo "match functionDecl( hasName( \"foo\" , ) , )" | sed "s/ /\n/g")" C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-query\trailing-comma.c    | FileCheck --check-prefix=CHECK-OK C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-query\trailing-comma.c
  
  --
  
  ********************
```
I think the use of `sed` is fine, Maybe it's tripping up on `$()` ?

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


More information about the cfe-commits mailing list