r217569 - Fix a couple of -Wsign-compare warnings introduced in r217556
Justin Bogner
mail at justinbogner.com
Wed Sep 10 20:37:43 PDT 2014
Author: bogner
Date: Wed Sep 10 22:37:42 2014
New Revision: 217569
URL: http://llvm.org/viewvc/llvm-project?rev=217569&view=rev
Log:
Fix a couple of -Wsign-compare warnings introduced in r217556
Modified:
cfe/trunk/lib/Analysis/ThreadSafetyTIL.cpp
Modified: cfe/trunk/lib/Analysis/ThreadSafetyTIL.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ThreadSafetyTIL.cpp?rev=217569&r1=217568&r2=217569&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/ThreadSafetyTIL.cpp (original)
+++ cfe/trunk/lib/Analysis/ThreadSafetyTIL.cpp Wed Sep 10 22:37:42 2014
@@ -200,7 +200,7 @@ int BasicBlock::topologicalFinalSort(Sim
ID = DominatorNode.Parent->topologicalFinalSort(Blocks, ID);
for (auto *Pred : Predecessors)
ID = Pred->topologicalFinalSort(Blocks, ID);
- assert(ID < Blocks.size());
+ assert(static_cast<size_t>(ID) < Blocks.size());
BlockID = ID++;
Blocks[BlockID] = this;
return ID;
@@ -314,7 +314,7 @@ void SCFG::computeNormalForm() {
// Once dominators have been computed, the final sort may be performed.
int NumBlocks = Exit->topologicalFinalSort(Blocks, 0);
- assert(NumBlocks == Blocks.size());
+ assert(static_cast<size_t>(NumBlocks) == Blocks.size());
(void) NumBlocks;
// Renumber the instructions now that we have a final sort.
@@ -341,4 +341,3 @@ void SCFG::computeNormalForm() {
} // end namespace til
} // end namespace threadSafety
} // end namespace clang
-
More information about the cfe-commits
mailing list