This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5b95d17da1f0: [clang-tidy] `performance-faster-string-find`
generates incorrect fixes for… (authored by fwolff).
Repository:
rG LLVM Github
PiotrZSL accepted this revision.
PiotrZSL added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157436/new/
https://reviews.llvm.org/D157436
fwolff updated this revision to Diff 548347.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157436/new/
https://reviews.llvm.org/D157436
Files:
clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
PiotrZSL added inline comments.
Comment at:
clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp:40
+ // "'" is OK, but ''' is not, so add a backslash
+ if (ClosePos - OpenPos == 2 && Result[OpenPos + 1] == '\'')
+Result.replace(OpenPos + 1, 1, "\\'");
fwolff created this revision.
fwolff added reviewers: PiotrZSL, carlosgalvezp.
fwolff added a project: clang-tools-extra.
Herald added a subscriber: xazax.hun.
Herald added a reviewer: njames93.
Herald added a project: All.
fwolff requested review of this revision.
Herald added a subscriber: