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


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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to