brintos

brintos / llvm-project-archived public Read only

0
0
Text · 753 B · 4fc0cb0 Raw
22 lines · c
1void foo(void) {}2// CHECK-OK: trailing-comma.c:1:1: note: "root" binds here3// CHECK-ERR-COMMA: Invalid token <,> found when looking for a value.4 5// RUN: clang-query -c "match \6// RUN:   functionDecl( \7// RUN:     hasName( \8// RUN:       \"foo\", \9// RUN:     ), \10// RUN:   ) \11// RUN: " %s | FileCheck --check-prefix=CHECK-OK %s12 13// Same with \n tokens14// RUN: echo "match functionDecl( hasName( \"foo\" , ) , )" | sed "s/ /\n/g" >%t15// RUN: clang-query -f %t %s | FileCheck --check-prefix=CHECK-OK %s16 17// RUN: not clang-query -c "match functionDecl(hasName(\"foo\"),,)" %s \18// RUN:   | FileCheck --check-prefix=CHECK-ERR-COMMA %s19 20// RUN: not clang-query -c "match functionDecl(,)" %s \21// RUN:   | FileCheck --check-prefix=CHECK-ERR-COMMA %s22