diff options
author | Kim Grasman <kim.grasman@gmail.com> | 2018-09-12 07:10:59 +0200 |
---|---|---|
committer | Kim Grasman <kim.grasman@gmail.com> | 2018-09-12 07:10:59 +0200 |
commit | 0dc480dba39191113e5af7ebc32c67934eb139bb (patch) | |
tree | 7fddc8cbd11b5b7e0e97415662e38281fd7cbce9 | |
parent | 2e1e0e16dbcbce4ec9aa21d996db3cc9ed79d1ab (diff) |
Update for Clang r341573
Clang finally made the leap and harmonized all the Loc methods:
* getLocStart, getStartLoc -> getBeginLoc
* getLocEnd -> getEndLoc
r341573 removes the deprecated names, so update the few uses we had.
-rw-r--r-- | iwyu_location_util.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/iwyu_location_util.cc b/iwyu_location_util.cc index aa00ac7..31374ad 100644 --- a/iwyu_location_util.cc +++ b/iwyu_location_util.cc @@ -82,14 +82,14 @@ SourceLocation GetLocation(const clang::Decl* decl) { // return the member loc. Otherwise, we have to guess if the entire // member-expression (all of 'b.m') is in a macro or not. We look at // getMemberLoc(), the start of the member ('m') , and -// getBase()->getLocEnd(), the end of the base ('b'). If they're both +// getBase()->getEndLoc(), the end of the base ('b'). If they're both // on the same line of the same file, then the . or -> must be there // too, and return that as the location. Otherwise, we assume that // one or the other is in a macro, but the . or -> is not, and use the // instantiation (not spelling) location of the macro. static SourceLocation GetMemberExprLocation(const MemberExpr* member_expr) { const SourceLocation member_start = member_expr->getMemberLoc(); - const SourceLocation base_end = member_expr->getBase()->getLocEnd(); + const SourceLocation base_end = member_expr->getBase()->getEndLoc(); if (member_expr->isImplicitAccess() || base_end.isInvalid()) return member_start; @@ -148,7 +148,7 @@ SourceLocation GetLocation(const clang::Stmt* stmt) { stmt = unary_op->getSubExpr()->IgnoreParenImpCasts(); } - return stmt->getLocStart(); + return stmt->getBeginLoc(); } SourceLocation GetLocation(const clang::TypeLoc* typeloc) { |