From 676a2411371525b08ecbd17694e652a95e0e2636 Mon Sep 17 00:00:00 2001 From: Paul Fultz II Date: Sun, 2 Jun 2019 03:23:27 -0500 Subject: [PATCH] Add regression tests for syntax errors (#1866) --- test/testtokenize.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index afd9cabf9..45f1e9779 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -7726,6 +7726,50 @@ private: "using d::c;\n" "template struct e {};\n" "static_assert(sizeof(e<>) == sizeof(e, c, int>), \"\");\n")) + + // #9146 + ASSERT_NO_THROW(tokenizeAndStringify( + "template struct a;\n" + "template using c = typename a::e;\n" + "template struct f;\n" + "template using g = typename f>::e;\n")) + + // #9153 + ASSERT_NO_THROW(tokenizeAndStringify( + "namespace {\n" + "template struct a;\n" + "}\n" + "namespace {\n" + "namespace b {\n" + "template struct B { using B::d; };\n" + "}\n" + "template using e = typename b::B;\n" + "namespace b {\n" + "template struct f;\n" + "}\n" + "template using g = b::f>;\n" + "}\n")) + + // #9154 + ASSERT_NO_THROW(tokenizeAndStringify( + "template using a = int;\n" + "template using aa = a;\n" + "template struct A;\n" + "template struct d;\n" + "template using e = typename d::g;\n" + "template struct h;\n" + "template using i = typename h::g;\n" + "template class j> using k = typename f::g;\n" + "template using l = a, aa>::c>;\n" + "template struct m;\n" + "template using o = typename m::g;\n" + "template struct p;\n" + "template using q = typename p, n>>::g;\n" + "template using c = e, b...>>;\n" + "template struct s;\n" + "template