acoster added a comment.

In D140968#4029072 <https://reviews.llvm.org/D140968#4029072>, @njames93 wrote:

> I don't see the appear of this check as its a situation that I doubt ever 
> appears in code bases. If there are open source code bases where this is a 
> known problem can you please provide links to them as well as running the 
> run_clang_tidy script over them to verify the changes are good.

After a look at some projects, it seems like the pattern does arise, but often 
it's intended (eg a string buffer is set to a large size, a legacy function 
taking a char* writes to it, and then the string is resized to 
strlen(foo.c_str())). As such, I'll drop this patch, as it can introduce bugs 
in these cases.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140968/new/

https://reviews.llvm.org/D140968

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to