1// RUN: %check_clang_tidy %s modernize-use-using %t -- \
2// RUN: -config="{CheckOptions: {modernize-use-using.IgnoreMacros: false}}"
3
4#define CODE typedef int INT
5
6CODE;
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
11struct Foo;
12#define Bar Baz
13typedef 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
19TYPEDEF 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

source code of clang-tools-extra/test/clang-tidy/checkers/modernize/use-using-macros.cpp