aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/SmallVector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index 99ad5fe3c2..ae258846e7 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -196,7 +196,7 @@ SmallVectorImpl<T>::operator=(const SmallVectorImpl<T> &RHS) {
// If we have to grow to have enough elements, destroy the current elements.
// This allows us to avoid copying them during the grow.
- if (Capacity-Begin < RHSSize) {
+ if (unsigned(Capacity-Begin) < RHSSize) {
// Destroy current elements.
for (iterator I = Begin, E = End; I != E; ++I)
I->~T();