aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.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/modernize/UseNullptrCheck.cpp
parentd54b7f059290102b0ff007843ecf0668e833c118 (diff)
downloadllvm-43465bf3fd6cca715187ee7286c881cb210fc3c4.zip
llvm-43465bf3fd6cca715187ee7286c881cb210fc3c4.tar.gz
llvm-43465bf3fd6cca715187ee7286c881cb210fc3c4.tar.bz2
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/modernize/UseNullptrCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
index 476c549..5f5ee71 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
@@ -125,7 +125,7 @@ public:
}
bool VisitStmt(Stmt *S) {
- if (SM.getFileLoc(S->getLocStart()) != CastLoc)
+ if (SM.getFileLoc(S->getBeginLoc()) != CastLoc)
return true;
Visited = true;
@@ -214,7 +214,7 @@ public:
return true;
}
- SourceLocation StartLoc = FirstSubExpr->getLocStart();
+ SourceLocation StartLoc = FirstSubExpr->getBeginLoc();
SourceLocation EndLoc = FirstSubExpr->getLocEnd();
// If the location comes from a macro arg expansion, *all* uses of that
@@ -269,7 +269,7 @@ private:
/// \brief Tests that all expansions of a macro arg, one of which expands to
/// result in \p CE, yield NullTo(Member)Pointer casts.
bool allArgUsesValid(const CastExpr *CE) {
- SourceLocation CastLoc = CE->getLocStart();
+ SourceLocation CastLoc = CE->getBeginLoc();
// Step 1: Get location of macro arg and location of the macro the arg was
// provided to.
@@ -437,9 +437,9 @@ private:
SourceLocation Loc;
if (const auto *D = Parent.get<Decl>())
- Loc = D->getLocStart();
+ Loc = D->getBeginLoc();
else if (const auto *S = Parent.get<Stmt>())
- Loc = S->getLocStart();
+ Loc = S->getBeginLoc();
// TypeLoc and NestedNameSpecifierLoc are members of the parent map. Skip
// them and keep going up.