summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2018-08-09 22:42:26 +0000
committerStephen Kelly <steveire@gmail.com>2018-08-09 22:42:26 +0000
commit43465bf3fd6cca715187ee7286c881cb210fc3c4 (patch)
treec2aad6e9cadd0b7164c476722704660c4b84b5e5 /clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp
parentd54b7f059290102b0ff007843ecf0668e833c118 (diff)
downloadbcm5719-llvm-43465bf3fd6cca715187ee7286c881cb210fc3c4.tar.gz
bcm5719-llvm-43465bf3fd6cca715187ee7286c881cb210fc3c4.zip
Port getLocStart -> getBeginLoc
Reviewers: javed.absar Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50354 llvm-svn: 339400
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp b/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp
index e75e80bb211..38ac43f2da5 100644
--- a/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/StringCompareCheck.cpp
@@ -51,7 +51,7 @@ void StringCompareCheck::registerMatchers(MatchFinder *Finder) {
void StringCompareCheck::check(const MatchFinder::MatchResult &Result) {
if (const auto *Matched = Result.Nodes.getNodeAs<Stmt>("match1")) {
- diag(Matched->getLocStart(), CompareMessage);
+ diag(Matched->getBeginLoc(), CompareMessage);
return;
}
@@ -63,10 +63,10 @@ void StringCompareCheck::check(const MatchFinder::MatchResult &Result) {
const auto *Str2 = Result.Nodes.getNodeAs<Stmt>("str2");
const auto *Compare = Result.Nodes.getNodeAs<Stmt>("compare");
- auto Diag = diag(Matched->getLocStart(), CompareMessage);
+ auto Diag = diag(Matched->getBeginLoc(), CompareMessage);
if (Str1->isArrow())
- Diag << FixItHint::CreateInsertion(Str1->getLocStart(), "*");
+ Diag << FixItHint::CreateInsertion(Str1->getBeginLoc(), "*");
Diag << tooling::fixit::createReplacement(*Zero, *Str2, Ctx)
<< tooling::fixit::createReplacement(*Compare, *Str1->getBase(),
OpenPOWER on IntegriCloud