1 // RUN: %check_clang_tidy %s modernize-use-using %t -- \ 2 // RUN: -config="{CheckOptions: [{key: modernize-use-using.IgnoreMacros, value: 0}]}" 3 4 #define CODE typedef int INT 5 6 CODE; 7 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' 8 // CHECK-FIXES: #define CODE typedef int INT 9 // CHECK-FIXES: CODE; 10 11 struct Foo; 12 #define Bar Baz 13 typedef Foo Bar; 14 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' 15 // CHECK-FIXES: #define Bar Baz 16 // CHECK-FIXES: using Baz = Foo; 17 18 #define TYPEDEF typedef 19 TYPEDEF Foo Bak; 20 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' 21 // CHECK-FIXES: #define TYPEDEF typedef 22 // CHECK-FIXES: TYPEDEF Foo Bak; 23