File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,35 @@ typedef void(SomeMacro(GH33760)::* FunctionType)(float, int);
405405
406406#define CDECL __attribute ((cdecl))
407407
408+ // GH37846 & GH41685
408409typedef void (CDECL *GH37846)(int );
409410// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
410411// CHECK-FIXES: using GH37846 = void (CDECL *)(int);
411412
413+ typedef void (__attribute((cdecl)) *GH41685)(int );
414+ // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
415+ // CHECK-FIXES: using GH41685 = void (__attribute((cdecl)) *)(int);
416+
417+ namespace GH83568 {
418+ typedef int (*name)(int arg1, int arg2);
419+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef' [modernize-use-using]
420+ // CHECK-FIXES: using name = int(*)(int arg1, int arg2);
421+ }
422+
423+ #ifdef FOO
424+ #define GH95716 float
425+ #else
426+ #define GH95716 double
427+ #endif
428+
429+ typedef GH95716 foo;
430+ // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
431+ // CHECK-FIXES: using foo = GH95716;
432+
433+ namespace GH97009 {
434+ typedef double PointType[3 ];
435+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef' [modernize-use-using]
436+ typedef bool (*Function)(PointType, PointType);
437+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef' [modernize-use-using]
438+ // CHECK-FIXES: using Function = bool (*)(PointType, PointType);
439+ }
You can’t perform that action at this time.
0 commit comments