]> granicus.if.org Git - clang/commitdiff
Fix a warning. [-Wsign-compare]
authorNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 23 Jun 2015 10:01:20 +0000 (10:01 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 23 Jun 2015 10:01:20 +0000 (10:01 +0000)
FIXME: Should "Level" be unsigned?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240391 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaOpenMP.cpp

index 5028ac5fa7b2d2d4d480a01b356e8351fe530ee6..4e45705ca1decbabbc4d4dd1a4fe2a5991bfd0f6 100644 (file)
@@ -606,7 +606,7 @@ bool DSAStackTy::hasExplicitDSA(
   D = D->getCanonicalDecl();
   auto StartI = Stack.rbegin();
   auto EndI = std::prev(Stack.rend());
-  if (std::distance(StartI, EndI) <= Level)
+  if (std::distance(StartI, EndI) <= (int)Level)
     return false;
   std::advance(StartI, Level);
   return (StartI->SharingMap.count(D) > 0) && StartI->SharingMap[D].RefExpr &&