aaron.ballman added inline comments.
================
Comment at: clang-tidy/abseil/StrCatAppendCheck.cpp:91-92
+ diag(Op->getBeginLoc(),
+ "please use absl::StrAppend instead of absl::StrCat when appending to "
+ "an existing string")
+ << FixItHint::CreateReplacement(
----------------
aaron.ballman wrote:
> This wins the award for "kindest diagnostic message". :-D How about: `call
> 'absl::StrAppend' instead of 'absl::StrCat' when appending to a string`?
>
> That said, the diagnostic doesn't say *why* the code is wrong in the first
> place. The documentation doesn't really go into it either. Is it a
> correctness issue, a performance issue, something else?
So this is a performance concern, not a correctness concern? In that case, how
about: `call 'absl::StrAppend' instead of 'absl::StrCat' to avoid a performance
penalty when appending to a string`?
https://reviews.llvm.org/D51061
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits