================
@@ -437,3 +437,22 @@ namespace GH97009 {
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
[modernize-use-using]
// CHECK-FIXES: using Function = bool (*)(PointType, PointType);
}
+
+namespace GH173732 {
+ // reference to array
+ typedef char (&refarray)[2];
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
[modernize-use-using]
+ // CHECK-FIXES: using refarray = char (&)[2];
+ typedef char &ref;
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use 'using' instead of 'typedef'
[modernize-use-using]
+ // CHECK-FIXES: using ref = char &;
+
+
----------------
zeyi2 wrote:
Nit: Could we add tests that look like:
```c++
typedef char (&refArray)[2], (*ptrArray)[2];
```
(Although generating the correct `CHECK-FIXES` for this may be out of scope for
this PR...)
https://github.com/llvm/llvm-project/pull/173751
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits