Files
clang-p2996/clang-tools-extra/pseudo/test/cxx/declator-member-function.cpp
Haojian Wu 1828c75d5f [pseudo] Apply the function-declarator to member functions.
A followup patch of d489b3807f, but for
member functions, this will eliminate a false parse of member
declaration.

Differential Revision: https://reviews.llvm.org/D131720
2022-08-12 13:49:01 +02:00

10 lines
425 B
C++

// RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
// Similiar to declarator-function.cpp, but for member functions.
class Foo {
void foo() {};
// CHECK-NOT: member-declarator := declarator brace-or-equal-initializer
// CHECK: member-declaration~function-definition := decl-specifier-seq function-declarator function-body
// CHECK-NOT: member-declarator := declarator brace-or-equal-initializer
};