Debian Codegraph @

clang-tools-extra/pseudo/test/cxx/declarator-var.cpp

raw
1 // The standard grammar allows an function-body to use any declarator, including
2 // a non-function declarator. This creates an ambiguity where a
3 // simple-declaration is misparsed as a function-definition.
4
5 // RUN: clang-pseudo -grammar=cxx -source=%s --print-forest | FileCheck %s
6 void (*s)(){};
7 // CHECK-NOT: function-definition
8 // CHECK: init-declarator := non-function-declarator initializer
9 // CHECK-NOT: function-definition