[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
Fri Jul 11 10:45:01 PDT 2025


https://github.com/AaronBallman commented:

Thanks for the PR! I think we need to think about this a little bit; my concern is that folks often use clang-query to write queries they'll eventually be using in clang-tidy checks. However, the tidy checks are using the C++ DSL which won't support trailing commas (and I don't think could be made to support them). So while it might make things easier in some cases, it may be a surprising difference between the tools. WDYT?

If we go forward with this, we should add a release note to `clang-tools-extra/docs/ReleaseNotes.rst`. We don't currently have any docs for clang-query, but if we had those docs, we should probably note the difference between the C++ DSL and clang-query in them. (That's not something you have to worry about for your patch though.)

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


More information about the cfe-commits mailing list