r202635 - [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Benjamin Kramer
benny.kra at googlemail.com
Sun Mar 2 04:20:24 PST 2014
Author: d0k
Date: Sun Mar 2 06:20:24 2014
New Revision: 202635
URL: http://llvm.org/viewvc/llvm-project?rev=202635&view=rev
Log:
[C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Modified:
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
cfe/trunk/lib/Sema/SemaLookup.cpp
cfe/trunk/lib/Sema/SemaOpenMP.cpp
cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=202635&r1=202634&r2=202635&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Sun Mar 2 06:20:24 2014
@@ -2246,7 +2246,7 @@ Value *ScalarExprEmitter::EmitOverflowCh
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);
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=202635&r1=202634&r2=202635&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Sun Mar 2 06:20:24 2014
@@ -3504,7 +3504,7 @@ void TypoCorrectionConsumer::addCorrecti
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
Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=202635&r1=202634&r2=202635&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Sun Mar 2 06:20:24 2014
@@ -203,8 +203,8 @@ DSAStackTy::DSAVarData DSAStackTy::getDS
// 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::getDS
// 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::getTo
// 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::getTo
}
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);
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=202635&r1=202634&r2=202635&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Sun Mar 2 06:20:24 2014
@@ -265,7 +265,7 @@ static void removeEdgesToDefaultInitiali
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)) {
Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=202635&r1=202634&r2=202635&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Sun Mar 2 06:20:24 2014
@@ -1192,7 +1192,7 @@ SpellingNamesAreCommon(const std::vector
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;
More information about the cfe-commits
mailing list