diff options
author | Stephen Kelly <steveire@gmail.com> | 2018-08-09 21:09:38 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2018-08-09 21:09:38 +0000 |
commit | 1c301dcbc4e590d6706c5201892ed971a5be8945 (patch) | |
tree | 696062f06ef2f808547a028590cefaf9d5235cc5 /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | f2ceec4811c3587056344dd5ef8d819261e256ad (diff) | |
download | bcm5719-llvm-1c301dcbc4e590d6706c5201892ed971a5be8945.tar.gz bcm5719-llvm-1c301dcbc4e590d6706c5201892ed971a5be8945.zip |
Port getLocEnd -> getEndLoc
Reviewers: teemperor!
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50351
llvm-svn: 339386
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index a7753c51ef2..3d8da1f797b 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -3650,7 +3650,7 @@ void Sema::ActOnFinishCXXInClassMemberInitializer(Decl *D, FD->getInClassInitStyle() == ICIS_ListInit ? InitializationKind::CreateDirectList(InitExpr->getBeginLoc(), InitExpr->getBeginLoc(), - InitExpr->getLocEnd()) + InitExpr->getEndLoc()) : InitializationKind::CreateCopy(InitExpr->getBeginLoc(), InitLoc); InitializationSequence Seq(*this, Entity, Kind, InitExpr); Init = Seq.Perform(*this, Entity, Kind, InitExpr); @@ -3998,7 +3998,7 @@ Sema::BuildMemberInitializer(ValueDecl *Member, Expr *Init, nullptr); InitializationKind Kind = InitList ? InitializationKind::CreateDirectList( - IdLoc, Init->getBeginLoc(), Init->getLocEnd()) + IdLoc, Init->getBeginLoc(), Init->getEndLoc()) : InitializationKind::CreateDirect(IdLoc, InitRange.getBegin(), InitRange.getEnd()); @@ -4051,7 +4051,7 @@ Sema::BuildDelegatingInitializer(TypeSourceInfo *TInfo, Expr *Init, QualType(ClassDecl->getTypeForDecl(), 0)); InitializationKind Kind = InitList ? InitializationKind::CreateDirectList( - NameLoc, Init->getBeginLoc(), Init->getLocEnd()) + NameLoc, Init->getBeginLoc(), Init->getEndLoc()) : InitializationKind::CreateDirect(NameLoc, InitRange.getBegin(), InitRange.getEnd()); InitializationSequence InitSeq(*this, DelegationEntity, Kind, Args); @@ -8444,7 +8444,7 @@ void Sema::CheckConversionDeclarator(Declarator &D, QualType &R, // If we can provide a correct fix-it hint, do so. if (After.isInvalid() && ConvTSI) { SourceLocation InsertLoc = - getLocForEndOfToken(ConvTSI->getTypeLoc().getLocEnd()); + getLocForEndOfToken(ConvTSI->getTypeLoc().getEndLoc()); DB << FixItHint::CreateInsertion(InsertLoc, " ") << FixItHint::CreateInsertionFromRange( InsertLoc, CharSourceRange::getTokenRange(Before)) @@ -10237,8 +10237,7 @@ bool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, " = "); } else { // Convert 'using X::Y;' to 'typedef X::Y Y;'. - SourceLocation InsertLoc = - getLocForEndOfToken(NameInfo.getLocEnd()); + SourceLocation InsertLoc = getLocForEndOfToken(NameInfo.getEndLoc()); Diag(InsertLoc, diag::note_using_decl_class_member_workaround) << 1 // typedef declaration << FixItHint::CreateReplacement(UsingLoc, "typedef") @@ -10873,8 +10872,8 @@ void Sema::DefineImplicitDefaultConstructor(SourceLocation CurrentLocation, return; } - SourceLocation Loc = Constructor->getLocEnd().isValid() - ? Constructor->getLocEnd() + SourceLocation Loc = Constructor->getEndLoc().isValid() + ? Constructor->getEndLoc() : Constructor->getLocation(); Constructor->setBody(new (Context) CompoundStmt(Loc)); Constructor->markUsed(Context); @@ -11156,8 +11155,8 @@ void Sema::DefineImplicitDestructor(SourceLocation CurrentLocation, return; } - SourceLocation Loc = Destructor->getLocEnd().isValid() - ? Destructor->getLocEnd() + SourceLocation Loc = Destructor->getEndLoc().isValid() + ? Destructor->getEndLoc() : Destructor->getLocation(); Destructor->setBody(new (Context) CompoundStmt(Loc)); Destructor->markUsed(Context); @@ -11828,8 +11827,8 @@ void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, } // Our location for everything implicitly-generated. - SourceLocation Loc = CopyAssignOperator->getLocEnd().isValid() - ? CopyAssignOperator->getLocEnd() + SourceLocation Loc = CopyAssignOperator->getEndLoc().isValid() + ? CopyAssignOperator->getEndLoc() : CopyAssignOperator->getLocation(); // Builds a DeclRefExpr for the "other" object. @@ -12184,8 +12183,8 @@ void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation, "Bad argument type of defaulted move assignment"); // Our location for everything implicitly-generated. - SourceLocation Loc = MoveAssignOperator->getLocEnd().isValid() - ? MoveAssignOperator->getLocEnd() + SourceLocation Loc = MoveAssignOperator->getEndLoc().isValid() + ? MoveAssignOperator->getEndLoc() : MoveAssignOperator->getLocation(); // Builds a reference to the "other" object. @@ -12469,8 +12468,8 @@ void Sema::DefineImplicitCopyConstructor(SourceLocation CurrentLocation, if (SetCtorInitializers(CopyConstructor, /*AnyErrors=*/false)) { CopyConstructor->setInvalidDecl(); } else { - SourceLocation Loc = CopyConstructor->getLocEnd().isValid() - ? CopyConstructor->getLocEnd() + SourceLocation Loc = CopyConstructor->getEndLoc().isValid() + ? CopyConstructor->getEndLoc() : CopyConstructor->getLocation(); Sema::CompoundScopeRAII CompoundScope(*this); CopyConstructor->setBody( @@ -12592,8 +12591,8 @@ void Sema::DefineImplicitMoveConstructor(SourceLocation CurrentLocation, if (SetCtorInitializers(MoveConstructor, /*AnyErrors=*/false)) { MoveConstructor->setInvalidDecl(); } else { - SourceLocation Loc = MoveConstructor->getLocEnd().isValid() - ? MoveConstructor->getLocEnd() + SourceLocation Loc = MoveConstructor->getEndLoc().isValid() + ? MoveConstructor->getEndLoc() : MoveConstructor->getLocation(); Sema::CompoundScopeRAII CompoundScope(*this); MoveConstructor->setBody(ActOnCompoundStmt( @@ -12896,7 +12895,7 @@ ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { RecordDecl *OutermostClass = ParentRD->getOuterLexicalRecordContext(); Diag(Loc, diag::err_in_class_initializer_not_yet_parsed) << OutermostClass << Field; - Diag(Field->getLocEnd(), diag::note_in_class_initializer_not_yet_parsed); + Diag(Field->getEndLoc(), diag::note_in_class_initializer_not_yet_parsed); // Recover by marking the field invalid, unless we're in a SFINAE context. if (!isSFINAEContext()) Field->setInvalidDecl(); |