[PATCH] D126998: [pseudo] Fix the type-parameter rule.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 7 01:38:08 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
hokein marked an inline comment as done.
Closed by commit rGecd7ff53b533: [pseudo] Fix the type-parameter rule. (authored by hokein).
Changed prior to commit:
https://reviews.llvm.org/D126998?vs=434120&id=434730#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126998/new/
https://reviews.llvm.org/D126998
Files:
clang-tools-extra/pseudo/lib/cxx.bnf
clang-tools-extra/pseudo/test/cxx/template-empty-type-parameter.cpp
Index: clang-tools-extra/pseudo/test/cxx/template-empty-type-parameter.cpp
===================================================================
--- /dev/null
+++ clang-tools-extra/pseudo/test/cxx/template-empty-type-parameter.cpp
@@ -0,0 +1,3 @@
+// RUN: clang-pseudo -grammar=%cxx-bnf-file -source=%s --print-forest | FileCheck %s
+template <typename> struct MatchParents;
+// CHECK: template-parameter-list~TYPENAME := tok[2]
Index: clang-tools-extra/pseudo/lib/cxx.bnf
===================================================================
--- clang-tools-extra/pseudo/lib/cxx.bnf
+++ clang-tools-extra/pseudo/lib/cxx.bnf
@@ -645,7 +645,7 @@
constraint-logical-and-expression := constraint-logical-and-expression && primary-expression
template-parameter := type-parameter
template-parameter := parameter-declaration
-type-parameter := type-parameter-key ..._opt IDENTIFIER
+type-parameter := type-parameter-key ..._opt IDENTIFIER_opt
type-parameter := type-parameter-key IDENTIFIER_opt = type-id
type-parameter := type-constraint ..._opt IDENTIFIER_opt
type-parameter := type-constraint IDENTIFIER_opt = type-id
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126998.434730.patch
Type: text/x-patch
Size: 1117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220607/9c776321/attachment.bin>
More information about the cfe-commits
mailing list