File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -359,4 +359,27 @@ namespace ISSUE_72179
359
359
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use 'using' instead of 'typedef' [modernize-use-using]
360
360
// CHECK-FIXES: using c = struct { int a; union { int b; }; };
361
361
}
362
+
363
+ template <typename T>
364
+ void foo3 ()
365
+ {
366
+ typedef T b;
367
+ // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: use 'using' instead of 'typedef' [modernize-use-using]
368
+ // CHECK-FIXES: using b = T;
369
+ }
370
+
371
+ template <typename T>
372
+ class MyClass
373
+ {
374
+ void foo ()
375
+ {
376
+ typedef MyClass c;
377
+ // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use 'using' instead of 'typedef' [modernize-use-using]
378
+ // CHECK-FIXES: using c = MyClass;
379
+ }
380
+ };
381
+
382
+ const auto foo4 = [](int a){typedef int d;};
383
+ // CHECK-MESSAGES: :[[@LINE-1]]:31: warning: use 'using' instead of 'typedef' [modernize-use-using]
384
+ // CHECK-FIXES: const auto foo4 = [](int a){using d = int;};
362
385
}
You can’t perform that action at this time.
0 commit comments