@@ -98,21 +98,23 @@ typedef int bla1, bla2, bla3;
9898// CHECK-FIXES-NEXT: using bla2 = bla1;
9999// CHECK-FIXES-NEXT: using bla3 = bla1;
100100
101- typedef int I, &LVal, &&RVal, *Ptr, *const ConstPtr, Vec3[3 ], (*Fn )();
101+ typedef int I, &LVal, &&RVal, *Ptr, *const ConstPtr, Vec3[3 ], (Fn)(), (*FnPtr )();
102102// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
103103// CHECK-MESSAGES: :[[@LINE-2]]:14: warning: use 'using' instead of 'typedef'
104104// CHECK-MESSAGES: :[[@LINE-3]]:21: warning: use 'using' instead of 'typedef'
105105// CHECK-MESSAGES: :[[@LINE-4]]:29: warning: use 'using' instead of 'typedef'
106106// CHECK-MESSAGES: :[[@LINE-5]]:35: warning: use 'using' instead of 'typedef'
107107// CHECK-MESSAGES: :[[@LINE-6]]:52: warning: use 'using' instead of 'typedef'
108108// CHECK-MESSAGES: :[[@LINE-7]]:61: warning: use 'using' instead of 'typedef'
109+ // CHECK-MESSAGES: :[[@LINE-7]]:69: warning: use 'using' instead of 'typedef'
109110// CHECK-FIXES: using I = int;
110111// CHECK-FIXES-NEXT: using LVal = I &;
111112// CHECK-FIXES-NEXT: using RVal = I &&;
112113// CHECK-FIXES-NEXT: using Ptr = I *;
113114// CHECK-FIXES-NEXT: using ConstPtr = I *const;
114115// CHECK-FIXES-NEXT: using Vec3 = I[3];
115- // CHECK-FIXES-NEXT: using Fn = I (*)();
116+ // CHECK-FIXES-NEXT: using Fn = I ()();
117+ // CHECK-FIXES-NEXT: using FnPtr = I (*)();
116118
117119#define CODE typedef int INT
118120
@@ -406,6 +408,13 @@ namespace ISSUE_72179
406408 // CHECK-FIXES: const auto foo4 = [](int a){using d = int;};
407409}
408410
411+ typedef int * IntPtr, *AlsoIntPtr;
412+ // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
413+ // CHECK-MESSAGES: :[[@LINE-2]]:20: warning: use 'using' instead of 'typedef' [modernize-use-using]
414+ // CHECK-FIXES: using IntPtr = int*;
415+ // CHECK-FIXES-NEXT: using AlsoIntPtr = IntPtr *;
416+ // FIXME: the second fixit is wrong. This is issue #150276.
417+
409418#ifndef SpecialMode
410419#define SomeMacro (x ) x
411420#else
0 commit comments