• Home
  • Raw
  • Download

Lines Matching full:using

1 // RUN: %check_clang_tidy %s modernize-use-using %t -- -- -I %S/Inputs/modernize-use-using/
4 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
5 // CHECK-FIXES: using Type = int;
8 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
9 // CHECK-FIXES: using LL = long;
12 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
13 // CHECK-FIXES: using Bla = int;
16 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
17 // CHECK-FIXES: using Bla2 = Bla;
20 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
21 // CHECK-FIXES: using type = void (*)(int, int);
24 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
25 // CHECK-FIXES: using type2 = void (*)();
29 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
30 // CHECK-FIXES: using Type = long long;
34 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
35 // CHECK-FIXES: using MyPtrType = void (Class::*)(Bla)[[ATTR:( __attribute__\(\(thiscall\)\))?]] co…
45 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
46 // CHECK-FIXES: using Iter = typename T::iterator;
49 using balba = long long;
54 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
55 // CHECK-FIXES: using PtrType = void (A::*)(int, int)[[ATTR]] const;
58 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
59 // CHECK-FIXES: using some_class = Class;
62 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
63 // CHECK-FIXES: using Cclass = Class;
66 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
67 // CHECK-FIXES: using cclass2 = Cclass;
72 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
73 // CHECK-FIXES: using MyPtrType3 = void (cclass::*)(Bla)[[ATTR]];
75 using my_class = int;
78 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
79 // CHECK-FIXES: using another = Test<my_class *>;
82 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
83 // CHECK-FIXES: using PInt = int *;
86 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
87 // CHECK-MESSAGES: :[[@LINE-2]]:17: warning: use 'using' instead of 'typedef'
88 // CHECK-MESSAGES: :[[@LINE-3]]:23: warning: use 'using' instead of 'typedef'
89 // CHECK-FIXES: using bla1 = int;
90 // CHECK-FIXES-NEXT: using bla2 = int;
91 // CHECK-FIXES-NEXT: using bla3 = int;
102 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
104 // CHECK-FIXES: using Baz = Foo;
113 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
115 // CHECK-FIXES: using Bam = Foo;
118 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
119 // CHECK-FIXES: using Bap = struct Foo;
122 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
123 // CHECK-FIXES: using Bap2 = struct Foo;
126 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
127 // CHECK-FIXES: using Bap3 = Foo;
130 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
131 // CHECK-FIXES: using Baq = struct Unknown;
134 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
135 // CHECK-FIXES: using Baw = struct Unknown2;
138 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
139 // CHECK-FIXES: using Bax = int;
142 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
143 // CHECK-FIXES: using S1 = struct Q1 { int a; };
145 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
146 // CHECK-FIXES: using S2 = struct { int b; };
148 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
149 // CHECK-FIXES: using S3 = struct Q2 { int c; };
151 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
152 // CHECK-FIXES: using S4 = struct { int d; };
157 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
158 // CHECK-FIXES: using FuncType = my_cclass;
163 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
167 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
168 // CHECK-FIXES: using fun_type = void (*)();
175 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
176 // CHECK-FIXES: using super = C<T>;
194 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
195 // CHECK-FIXES: using self = TwoArgTemplate<T1, T2>;
202 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
203 // CHECK-MESSAGES: :[[@LINE-2]]:28: warning: use 'using' instead of 'typedef'
204 // CHECK-FIXES: using S_t = S<(0 > 0), int>;
205 // CHECK-FIXES-NEXT: using S_p = S_t*;
208 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
209 // CHECK-MESSAGES: :[[@LINE-2]]:29: warning: use 'using' instead of 'typedef'
210 // CHECK-FIXES: using S2_t = S<(0 < 0), int>;
211 // CHECK-FIXES-NEXT: using S2_p = S2_t*;
214 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
215 // CHECK-FIXES: using S3_t = S<(0 > 0 && (3 > 1) && (1 < 1)), int>;
223 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
224 // CHECK-MESSAGES: :[[@LINE-2]]:24: warning: use 'using' instead of 'typedef'
225 // CHECK-FIXES: using Q_t = Q<b[0 < 0]>;
226 // CHECK-FIXES-NEXT: using Q_p = Q_t*;
229 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
230 // CHECK-FIXES: using Q2_t = Q<b[0 < 0]>;
239 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
240 // CHECK-MESSAGES: :[[@LINE-2]]:27: warning: use 'using' instead of 'typedef'
241 // CHECK-FIXES: using Q3_t = Q<T{0 < 0}.b>;
242 // CHECK-FIXES-NEXT: using Q3_p = Q3_t*;
245 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
246 // CHECK-FIXES: using Q3_t = Q<T{0 < 0}.b>;
249 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
250 // CHECK-FIXES: using Nested_t = TwoArgTemplate<TwoArgTemplate<int, Q<T{0 < 0}.b>>, S<(0 < 0), Q<b[…
255 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
256 // CHECK-FIXES: using d = typename a::template b<>;
259 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
260 // CHECK-FIXES: using d2 = typename a::template b<>::c;
267 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
268 // CHECK-FIXES: using Variadic_t = Variadic<Variadic<int, bool, Q<T{0 < 0}.b>>, S<(0 < 0), Variadic…
271 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
272 // CHECK-MESSAGES: :[[@LINE-2]]:103: warning: use 'using' instead of 'typedef'
273 // CHECK-FIXES: using Variadic_t = Variadic<Variadic<int, bool, Q<T{0 < 0}.b>>, S<(0 < 0), Variadic…
274 // CHECK-FIXES-NEXT: using Variadic_p = Variadic_t*;
277 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
278 // CHECK-MESSAGES: :[[@LINE-2]]:30: warning: use 'using' instead of 'typedef'
279 // CHECK-FIXES: using R_t = struct { int a; };
280 // CHECK-FIXES-NEXT: using R_p = R_t*;
283 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
284 // CHECK-FIXES: using EnumT1 = enum { ea1, eb1 };
286 #include "modernize-use-using.h"
289 // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use 'using' instead of 'typedef'
290 // CHECK-FIXES: using EnumT2_CheckTypedefImpactFromAnotherFile = enum { ea2, eb2 };
295 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
296 // CHECK-FIXES: using b = InjectedClassName;
302 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
303 // CHECK-FIXES: using b = InjectedClassNameWithUnnamedArgument;