[all-commits] [llvm/llvm-project] 18b501: [clang-tidy] rewrite matchers in modernize-use-sta...
Julian Schmidt via All-commits
all-commits at lists.llvm.org
Fri Oct 18 00:07:42 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 18b50189a749a39d1ac61a72af1d103f68fefc6b
https://github.com/llvm/llvm-project/commit/18b50189a749a39d1ac61a72af1d103f68fefc6b
Author: Julian Schmidt <git.julian.schmidt at gmail.com>
Date: 2024-10-18 (Fri, 18 Oct 2024)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/UseStartsEndsWithCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/modernize/use-starts-ends-with.cpp
Log Message:
-----------
[clang-tidy] rewrite matchers in modernize-use-starts-ends-with (#112101)
Rewrite the AST matchers for slightly more composability.
Furthermore, check that the `starts_with` and `ends_with`
functions return a `bool`.
There is one behavioral change, in that the methods of a class (and
transitive classes) are searched once for a matching
`starts_with`/`ends_with` function, picking the first it can find.
Previously, the matchers would try to find `starts_with`, then
`startsWith`, and finally, `startswith`. Now, the first of the three
that
is encountered will be the matched method.
---------
Co-authored-by: Nicolas van Kempen <nvankemp at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list