Index: include/llvm/CodeGen/MachineInstrBundle.h =================================================================== --- include/llvm/CodeGen/MachineInstrBundle.h +++ include/llvm/CodeGen/MachineInstrBundle.h @@ -61,7 +61,8 @@ MachineBasicBlock::instr_iterator I) { while (I->isBundledWithSucc()) ++I; - return ++I; + ++I; + return I; } /// Returns an iterator pointing beyond the bundle containing \p I. @@ -69,7 +70,8 @@ MachineBasicBlock::const_instr_iterator I) { while (I->isBundledWithSucc()) ++I; - return ++I; + ++I; + return I; } //===----------------------------------------------------------------------===// Index: include/llvm/Support/BranchProbability.h =================================================================== --- include/llvm/Support/BranchProbability.h +++ include/llvm/Support/BranchProbability.h @@ -128,27 +128,32 @@ BranchProbability operator+(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob += RHS; + Prob += RHS; + return Prob; } BranchProbability operator-(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob -= RHS; + Prob -= RHS; + return Prob; } BranchProbability operator*(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob *= RHS; + Prob *= RHS; + return Prob; } BranchProbability operator*(uint32_t RHS) const { BranchProbability Prob(*this); - return Prob *= RHS; + Prob *= RHS; + return Prob; } BranchProbability operator/(uint32_t RHS) const { BranchProbability Prob(*this); - return Prob /= RHS; + Prob /= RHS; + return Prob; } bool operator==(BranchProbability RHS) const { return N == RHS.N; } Index: lib/Support/Path.cpp =================================================================== --- lib/Support/Path.cpp +++ lib/Support/Path.cpp @@ -297,7 +297,8 @@ I.Path = Path; I.Position = Path.size(); I.S = style; - return ++I; + ++I; + return I; } reverse_iterator rend(StringRef Path) { Index: lib/Target/X86/X86MCInstLower.cpp =================================================================== --- lib/Target/X86/X86MCInstLower.cpp +++ lib/Target/X86/X86MCInstLower.cpp @@ -1364,7 +1364,8 @@ MBB = MBB->getPrevNode(); MBBI = MBB->end(); } - return --MBBI; + --MBBI; + return MBBI; } static const Constant *getConstantFromPool(const MachineInstr &MI, Index: lib/Transforms/Instrumentation/Instrumentation.cpp =================================================================== --- lib/Transforms/Instrumentation/Instrumentation.cpp +++ lib/Transforms/Instrumentation/Instrumentation.cpp @@ -24,10 +24,12 @@ /// Moves I before IP. Returns new insert point. static BasicBlock::iterator moveBeforeInsertPoint(BasicBlock::iterator I, BasicBlock::iterator IP) { // If I is IP, move the insert point down. - if (I == IP) - return ++IP; - // Otherwise, move I before IP and return IP. - I->moveBefore(&*IP); + if (I == IP) { + ++IP; + } else { + // Otherwise, move I before IP and return IP. + I->moveBefore(&*IP); + } return IP; }