[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
Mon Jul 14 11:03:09 PDT 2025
================
@@ -0,0 +1,10 @@
+// RUN: clang-query -c "match \
+// RUN: functionDecl( \
+// RUN: hasName( \
+// RUN: \"foo\", \
+// RUN: ), \
+// RUN: ) \
+// RUN: " %s -- | FileCheck %s
+
+// CHECK: trailing-comma.c:10:1: note: "root" binds here
----------------
AaronBallman wrote:
I'd appreciate another test that has two trailing commas, just to be sure we properly diagnose that case. e.g., `\"foo\",, \`
https://github.com/llvm/llvm-project/pull/148018
More information about the cfe-commits
mailing list