================
@@ -111,16 +115,18 @@ void ContainerDataPointerCheck::check(const 
MatchFinder::MatchResult &Result) {
            MemberExpr>(CE))
     ReplacementText = "(" + ReplacementText + ")";
 
-  if (CE->getType()->isPointerType())
-    ReplacementText += "->data()";
-  else
-    ReplacementText += ".data()";
+  ReplacementText += CE->getType()->isPointerType() ? "->" : ".";
+  ReplacementText += CStrMethod ? "c_str()" : "data()";
----------------
5chmidti wrote:

Prefer to use `llvm::Twine` for this concatenation

https://github.com/llvm/llvm-project/pull/71304
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to