File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3013,6 +3013,9 @@ bool Tokenizer::simplifyUsing()
30133013 if (!usingEnd)
30143014 continue ;
30153015
3016+ for (Token *typeTok = start; typeTok != usingEnd; typeTok = typeTok->next ())
3017+ typeTok->isSimplifiedTypedef (true );
3018+
30163019 // Move struct defined in using out of using.
30173020 // using T = struct t { }; => struct t { }; using T = struct t;
30183021 // fixme: this doesn't handle attributes
Original file line number Diff line number Diff line change @@ -4789,6 +4789,12 @@ class TestOther : public TestFixture {
47894789 " return h(s ? s->gnc() : 1);\n"
47904790 "}\n");
47914791 ASSERT_EQUALS("[test.cpp:5:11]: (style) Parameter 's' can be declared as pointer to const [constParameterPointer]\n", errout_str());
4792+
4793+ check("using IntPtr = int *;\n"
4794+ "int* foo(IntPtr bar) {\n"
4795+ " return bar = 0;\n"
4796+ "}\n");
4797+ ASSERT_EQUALS("", errout_str());
47924798 }
47934799
47944800 void constArray() {
You can’t perform that action at this time.
0 commit comments