@@ -98,21 +98,23 @@ typedef int bla1, bla2, bla3;
98
98
// CHECK-FIXES-NEXT: using bla2 = bla1;
99
99
// CHECK-FIXES-NEXT: using bla3 = bla1;
100
100
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 )();
102
102
// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
103
103
// CHECK-MESSAGES: :[[@LINE-2]]:14: warning: use 'using' instead of 'typedef'
104
104
// CHECK-MESSAGES: :[[@LINE-3]]:21: warning: use 'using' instead of 'typedef'
105
105
// CHECK-MESSAGES: :[[@LINE-4]]:29: warning: use 'using' instead of 'typedef'
106
106
// CHECK-MESSAGES: :[[@LINE-5]]:35: warning: use 'using' instead of 'typedef'
107
107
// CHECK-MESSAGES: :[[@LINE-6]]:52: warning: use 'using' instead of 'typedef'
108
108
// CHECK-MESSAGES: :[[@LINE-7]]:61: warning: use 'using' instead of 'typedef'
109
+ // CHECK-MESSAGES: :[[@LINE-7]]:69: warning: use 'using' instead of 'typedef'
109
110
// CHECK-FIXES: using I = int;
110
111
// CHECK-FIXES-NEXT: using LVal = I &;
111
112
// CHECK-FIXES-NEXT: using RVal = I &&;
112
113
// CHECK-FIXES-NEXT: using Ptr = I *;
113
114
// CHECK-FIXES-NEXT: using ConstPtr = I *const;
114
115
// 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 (*)();
116
118
117
119
#define CODE typedef int INT
118
120
@@ -406,6 +408,13 @@ namespace ISSUE_72179
406
408
// CHECK-FIXES: const auto foo4 = [](int a){using d = int;};
407
409
}
408
410
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
+
409
418
#ifndef SpecialMode
410
419
#define SomeMacro (x ) x
411
420
#else
0 commit comments