[clang-tools-extra] [clang-tidy] Enhance container-data-pointer-check to suggest `c_str` for consts (PR #190590)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 08:05:44 PDT 2026


================
@@ -277,6 +277,10 @@ Changes in existing checks
 
   - Do not report explicit call to destructor after move as an invalid use.
 
+- Improved :doc:`container-data-pointer
+  <clang-tidy/checks/readability/container-data-pointer>` check
+  to use ``c_str()`` for const's when available and present on a container.
----------------
EugeneZelenko wrote:

```suggestion
  to use ``c_str()`` for ``const``'s when available and present on a container.
```

https://github.com/llvm/llvm-project/pull/190590


More information about the cfe-commits mailing list