================
@@ -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 &;
+
+
----------------
flovent wrote:

Added, this check can generate two warnings for this code, but it can't get a 
correct fix-it due to `this fix will not be applied because it overlaps with 
another fix`.

Same things happens for multi function typedef too:
```
   typedef int(*name)(int arg1, int arg2), (*aname)();
```

https://github.com/llvm/llvm-project/pull/173751
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to