From ada13aa038abf107c9ef297c8ea0d3c3795823e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20Gunne=20Lindstr=C3=B6m?= Date: Sun, 8 Mar 2026 12:43:12 +0100 Subject: [PATCH 1/2] Add test --- test/testother.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/testother.cpp b/test/testother.cpp index 0c6828a0b63..9ad57103b8f 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -4787,6 +4787,12 @@ class TestOther : public TestFixture { " return h(s ? s->gnc() : 1);\n" "}\n"); ASSERT_EQUALS("[test.cpp:5:11]: (style) Parameter 's' can be declared as pointer to const [constParameterPointer]\n", errout_str()); + + check("using IntPtr = int *;\n" + "int* foo(IntPtr bar) {\n" + " return bar = 0;\n" + "}\n"); + ASSERT_EQUALS("", errout_str()); } void constArray() { From b643d8f1dc3cfaf8aa1f8f91ec9d00ea550e7c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20Gunne=20Lindstr=C3=B6m?= Date: Sun, 8 Mar 2026 12:38:51 +0100 Subject: [PATCH 2/2] Fix #14539 --- lib/tokenize.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 7bdba656374..0973d7c1731 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -3013,6 +3013,9 @@ bool Tokenizer::simplifyUsing() if (!usingEnd) continue; + for (Token *typeTok = start; typeTok != usingEnd; typeTok = typeTok->next()) + typeTok->isSimplifiedTypedef(true); + // Move struct defined in using out of using. // using T = struct t { }; => struct t { }; using T = struct t; // fixme: this doesn't handle attributes