[pseudo] Use the prebuilt cxx grammar for the lit tests, NFC.

Differential Revision: https://reviews.llvm.org/D129074
This commit is contained in:
Haojian Wu 2022-07-04 14:15:51 +02:00
parent 4696a33dfa
commit 70c0d92930
10 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
// We loosely allow capture defaults in any position/multiple times.
auto lambda = [&, &foo, bar(x), =]{};
// CHECK: lambda-introducer := [ capture-list ]

View File

@ -4,7 +4,7 @@
// FIXME: eliminate this false parse.
// XFAIL: *
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
void s(){};
// CHECK-NOT: simple-declaration
// CHECK: function-definition := decl-specifier-seq declarator

View File

@ -4,7 +4,7 @@
// FIXME: eliminate this false parse.
// XFAIL: *
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
void (*s)(){};
// CHECK-NOT: function-definition
// CHECK: init-declarator := declarator initializer

View File

@ -1,4 +1,4 @@
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
class Foo {
public:
};

View File

@ -1,4 +1,4 @@
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
bool operator<();
// CHECK: translation-unit~simple-declaration := decl-specifier-seq init-declarator-list ;
// CHECK-NEXT: ├─decl-specifier-seq~BOOL

View File

@ -1,4 +1,4 @@
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
// FIXME: tighten CHECK to CHECK-NEXT once numeric literals are unambiguous.
auto x = { 1, .f = 2, [c]{3} };
// CHECK: initializer-clause~braced-init-list

View File

@ -1,4 +1,4 @@
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
void foo2(int, ...);
// CHECK: translation-unit~simple-declaration := decl-specifier-seq init-declarator-list ;
// CHECK-NEXT: ├─decl-specifier-seq~VOID :=

View File

@ -1,4 +1,4 @@
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
void s() {
__func__;
// CHECK: expression~__FUNC__ := tok[5]

View File

@ -1,3 +1,3 @@
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
template <typename> struct MatchParents;
// CHECK: template-parameter-list~TYPENAME := tok[2]

View File

@ -1,4 +1,4 @@
// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
void s(int[]);
// CHECK: parameter-declaration-clause~parameter-declaration := decl-specifier-seq abstract-declarator
// CHECK-NEXT: ├─decl-specifier-seq~INT := tok[3]