[PATCH] D127400: [pseudo] Add xfail tests for a simple-declaration/function-definition ambiguity
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 23 06:52:14 PDT 2022
sammccall marked 2 inline comments as done.
sammccall added inline comments.
================
Comment at: clang-tools-extra/pseudo/test/cxx/declarator-var.cpp:10
+void (*s)(){};
+// CHECK-NOT: function-definition
+// CHECK: init-declarator := declarator initializer
----------------
hokein wrote:
> 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)?
Right, we want to forbid function-definition whether it's first or second.
In a more complicated example I might use -implicit-check-not but I think this is clearer: hiding assertions in the FileCheck invocation is non-obvious.
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