[clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705
Fix the readability-redundant-string-cstr check to correctly replace calls to c_str() via an overloaded operator-> (such as from an iterator.) Previously, the fix for `i->c_str()` would be `*i->`. Using consume_back to remove any trailing `->` results in the correct `*i`. Add some lit check test cases too. Fixes: https://github.com/llvm/llvm-project/issues/56705 Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D145730
Loading
Please sign in to comment