aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorNicolas van Kempen <nvankemp@gmail.com>2024-04-23 17:35:05 -0400
committerGitHub <noreply@github.com>2024-04-23 23:35:05 +0200
commitef5906989ae2004100ff56dc5ab59be2be9d5c99 (patch)
tree29b90b8cfc5806cb67321b6c534665bfbee8e727 /clang/lib/CodeGen/CodeGenModule.cpp
parent5ac744d72ad2a8d04e0ae869c4e30558dd8058e3 (diff)
downloadllvm-ef5906989ae2004100ff56dc5ab59be2be9d5c99.zip
llvm-ef5906989ae2004100ff56dc5ab59be2be9d5c99.tar.gz
llvm-ef5906989ae2004100ff56dc5ab59be2be9d5c99.tar.bz2
[clang-tidy][modernize-use-starts-ends-with] Add support for compare() (#89530)
Using `compare` is the next most common roundabout way to express `starts_with` before it was added to the standard. In this case, using `starts_with` is a readability improvement. Extend existing `modernize-use-starts-ends-with` to cover this case. ``` // The following will now be replaced by starts_with(). string.compare(0, strlen("prefix"), "prefix") == 0; string.compare(0, 6, "prefix") == 0; string.compare(0, prefix.length(), prefix) == 0; string.compare(0, prefix.size(), prefix) == 0; ```
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions