================ @@ -244,7 +244,10 @@ Changes in existing checks - Improved :doc:`modernize-use-starts-ends-with <clang-tidy/checks/modernize/use-starts-ends-with>` check to handle two cases - that can be replaced with ``ends_with`` + that can be replaced with ``ends_with`` and detect patterns using ``substr`` + that can be replaced with ``starts_with``. Now handles cases like + ``str.substr(0, n) == "literal"``, with support for length determination through + integer literals, ``strlen()``, and ``size()``/``length()`` member functions. ---------------- nicovank wrote:
```suggestion - Improved :doc:`modernize-use-starts-ends-with <clang-tidy/checks/modernize/use-starts-ends-with>` check to handle two new cases from ``rfind`` and ``compare`` to ``ends_with``, and one new case from ``substr`` to ``starts_with``. ``` Details are assumed / in documentation anyway. https://github.com/llvm/llvm-project/pull/116033 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits