File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -630,7 +630,7 @@ void TemplateSimplifier::expandTemplate(
630630 std::list<Token *> &templateInstantiations)
631631{
632632 for (const Token *tok3 = tokenlist.front (); tok3; tok3 = tok3->next ()) {
633- if (tok3->str () == " {" || tok3->str () == " (" )
633+ if (tok3->str () == " {" || tok3->str () == " (" || tok3-> str () == " [ " )
634634 tok3 = tok3->link ();
635635
636636 // Start of template..
Original file line number Diff line number Diff line change @@ -1894,6 +1894,7 @@ class TestSimplifyTokens : public TestFixture {
18941894 " {\n "
18951895 " public:\n "
18961896 " static AA<T> create(T* newObject);\n "
1897+ " static int size();\n "
18971898 " };\n "
18981899 " \n "
18991900 " class CC { public: CC(AA<BB>, int) {} };\n "
@@ -1906,7 +1907,9 @@ class TestSimplifyTokens : public TestFixture {
19061907 " \n "
19071908 " XX::XX():\n "
19081909 " y(AA<CC>::create(new CC(AA<BB>(), 0)))\n "
1909- " {}\n " ;
1910+ " {}\n "
1911+ " \n "
1912+ " int yy[AA<CC>::size()];" ;
19101913
19111914 // Just run it and check that there are not assertions.
19121915 tok (code);
You can’t perform that action at this time.
0 commit comments