================
@@ -102,6 +103,17 @@ void StringFind() {
   Str.contains("a");
   // CHECK-MESSAGES: [[@LINE-1]]:16: warning: 'contains' called with a
   // CHECK-FIXES: Str.contains('a');
+  Str += "a";
+  // CHECK-MESSAGES: [[@LINE-1]]:10: warning: 'operator+=' called with a
+  // CHECK-FIXES: Str += 'a';
+  ((Str += "a") += "b") += "c";
+  // CHECK-MESSAGES: [[@LINE-1]]:12: warning: 'operator+=' called with a
+  // CHECK-MESSAGES: [[@LINE-2]]:20: warning: 'operator+=' called with a
+  // CHECK-MESSAGES: [[@LINE-3]]:28: warning: 'operator+=' called with a
+  // CHECK-FIXES: ((Str += 'a') += 'b') += 'c';
+  Str.operator+=("a");
----------------
localspook wrote:

Not sure who's using this call syntax, but it's very easy to support :shrug:

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

Reply via email to