diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 78bd037e83d8b79e01ce29460065c1adb1971f0f..653b5a2bd4f33a80ae97beeca1cbab7b4e0fa936 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -2246,7 +2246,7 @@ Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo &Ops) { llvm::BasicBlock *initialBB = Builder.GetInsertBlock(); llvm::Function::iterator insertPt = initialBB; llvm::BasicBlock *continueBB = CGF.createBasicBlock("nooverflow", CGF.CurFn, - llvm::next(insertPt)); + std::next(insertPt)); llvm::BasicBlock *overflowBB = CGF.createBasicBlock("overflow", CGF.CurFn); Builder.CreateCondBr(overflow, overflowBB, continueBB); diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 5df0a43621e15a5b2a26ae8edaabb7eb785e581a..f975aa0a7bf2b64a60b914e17330a6818a481fda 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -3504,7 +3504,7 @@ void TypoCorrectionConsumer::addCorrection(TypoCorrection Correction) { CList.push_back(Correction); while (CorrectionResults.size() > MaxTypoDistanceResultSets) - erase(llvm::prior(CorrectionResults.end())); + erase(std::prev(CorrectionResults.end())); } // Fill the supplied vector with the IdentifierInfo pointers for each piece of diff --git a/lib/Sema/SemaOpenMP.cpp b/lib/Sema/SemaOpenMP.cpp index 63b64801fe3a65a92cfe9aad20a3c03187fa84e6..9ee89a3169ac883ea22b7859dee6ed0888aa2c24 100644 --- a/lib/Sema/SemaOpenMP.cpp +++ b/lib/Sema/SemaOpenMP.cpp @@ -203,8 +203,8 @@ DSAStackTy::DSAVarData DSAStackTy::getDSA(StackTy::reverse_iterator Iter, // TODO if (DVar.DKind == OMPD_task) { DSAVarData DVarTemp; - for (StackTy::reverse_iterator I = llvm::next(Iter), - EE = llvm::prior(Stack.rend()); + for (StackTy::reverse_iterator I = std::next(Iter), + EE = std::prev(Stack.rend()); I != EE; ++I) { // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced // in a Construct, implicitly determined, p.6] @@ -231,7 +231,7 @@ DSAStackTy::DSAVarData DSAStackTy::getDSA(StackTy::reverse_iterator Iter, // For constructs other than task, if no default clause is present, these // variables inherit their data-sharing attributes from the enclosing // context. - return getDSA(llvm::next(Iter), D); + return getDSA(std::next(Iter), D); } void DSAStackTy::addDSA(VarDecl *D, DeclRefExpr *E, OpenMPClauseKind A) { @@ -286,7 +286,7 @@ DSAStackTy::DSAVarData DSAStackTy::getTopDSA(VarDecl *D) { // inside the construct are private. OpenMPDirectiveKind Kind = getCurrentDirective(); if (Kind != OMPD_parallel) { - if (isOpenMPLocal(D, llvm::next(Stack.rbegin())) && D->isLocalVarDecl() && + if (isOpenMPLocal(D, std::next(Stack.rbegin())) && D->isLocalVarDecl() && (D->getStorageClass() == SC_Auto || D->getStorageClass() == SC_None)) DVar.CKind = OMPC_private; @@ -351,13 +351,13 @@ DSAStackTy::DSAVarData DSAStackTy::getTopDSA(VarDecl *D) { } DSAStackTy::DSAVarData DSAStackTy::getImplicitDSA(VarDecl *D) { - return getDSA(llvm::next(Stack.rbegin()), D); + return getDSA(std::next(Stack.rbegin()), D); } DSAStackTy::DSAVarData DSAStackTy::hasDSA(VarDecl *D, OpenMPClauseKind CKind, OpenMPDirectiveKind DKind) { - for (StackTy::reverse_iterator I = llvm::next(Stack.rbegin()), - E = llvm::prior(Stack.rend()); + for (StackTy::reverse_iterator I = std::next(Stack.rbegin()), + E = std::prev(Stack.rend()); I != E; ++I) { if (DKind != OMPD_unknown && DKind != I->Directive) continue; DSAVarData DVar = getDSA(I, D); diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index f2c2ab1ae206a3d6ed0bc5149d4ea6d233555cc2..bf750a2227aab182f061f6ee45a0557860181fa3 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -265,7 +265,7 @@ static void removeEdgesToDefaultInitializers(PathPieces &Pieces) { I = Pieces.erase(I); continue; } else if (End && isa<CXXDefaultInitExpr>(End)) { - PathPieces::iterator Next = llvm::next(I); + PathPieces::iterator Next = std::next(I); if (Next != E) { if (PathDiagnosticControlFlowPiece *NextCF = dyn_cast<PathDiagnosticControlFlowPiece>(*Next)) { diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index 3b4955755e1f895c20503bb22593af7f633d6cf7..3bd06b4f09fd9170b9cc548ecf8a61bda44daa15 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -1192,7 +1192,7 @@ SpellingNamesAreCommon(const std::vector<FlattenedSpelling>& Spellings) { std::string FirstName = NormalizeNameForSpellingComparison( Spellings.front().name()); for (std::vector<FlattenedSpelling>::const_iterator - I = llvm::next(Spellings.begin()), E = Spellings.end(); I != E; ++I) { + I = std::next(Spellings.begin()), E = Spellings.end(); I != E; ++I) { std::string Name = NormalizeNameForSpellingComparison(I->name()); if (Name != FirstName) return false;