[PATCH] D127400: [pseudo] Add xfail tests for a simple-declaration/function-definition ambiguity

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 9 05:49:37 PDT 2022


hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/pseudo/test/cxx/declarator-function.cpp:12
+// CHECK:          function-definition := decl-specifier-seq declarator
+// function-body CHECK-NOT:      simple-declaration
----------------
nit: the line seems to be broken by the clang-format.


================
Comment at: clang-tools-extra/pseudo/test/cxx/declarator-var.cpp:10
+void (*s)(){};
+// CHECK-NOT:      function-definition
+// CHECK:          init-declarator := declarator initializer
----------------
why we need two lines for `function-definition`?
because of the undeterministic order of the ambiguous results (we don't know whether function-def comes first or the var-decl comes first)? 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127400/new/

https://reviews.llvm.org/D127400



More information about the cfe-commits mailing list