diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp b/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp index eddc52b63a9..71e5e4084d9 100644 --- a/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp +++ b/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp @@ -90,13 +90,14 @@ void FasterStringFindCheck::check(const MatchFinder::MatchResult &Result) { if (!Replacement) return; - diag(Literal->getLocStart(), "%0 called with a string literal consisting of " + diag(Literal->getBeginLoc(), "%0 called with a string literal consisting of " "a single character; consider using the more " "effective overload accepting a character") - << FindFunc << FixItHint::CreateReplacement( - CharSourceRange::getTokenRange(Literal->getLocStart(), - Literal->getLocEnd()), - *Replacement); + << FindFunc + << FixItHint::CreateReplacement( + CharSourceRange::getTokenRange(Literal->getBeginLoc(), + Literal->getLocEnd()), + *Replacement); } } // namespace performance |

