[clang-tools-extra] 075449d - [pseudo] Fix a sign-compare warning in debug build, NFC.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 9 02:19:01 PDT 2022


Author: Haojian Wu
Date: 2022-06-09T11:18:03+02:00
New Revision: 075449da80d37bcf3e40ee584753ae0d7ae5afa5

URL: https://github.com/llvm/llvm-project/commit/075449da80d37bcf3e40ee584753ae0d7ae5afa5
DIFF: https://github.com/llvm/llvm-project/commit/075449da80d37bcf3e40ee584753ae0d7ae5afa5.diff

LOG: [pseudo] Fix a sign-compare warning in debug build, NFC.

Added: 
    

Modified: 
    clang-tools-extra/pseudo/lib/grammar/LRTable.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/pseudo/lib/grammar/LRTable.cpp b/clang-tools-extra/pseudo/lib/grammar/LRTable.cpp
index 16c4029eec08b..28e2bf5b136ac 100644
--- a/clang-tools-extra/pseudo/lib/grammar/LRTable.cpp
+++ b/clang-tools-extra/pseudo/lib/grammar/LRTable.cpp
@@ -91,7 +91,7 @@ LRTable::StateID LRTable::getGoToState(StateID State,
 }
 
 llvm::ArrayRef<LRTable::Action> LRTable::find(StateID Src, SymbolID ID) const {
-  assert(Src + 1 < StateOffset.size());
+  assert(Src + 1u < StateOffset.size());
   std::pair<size_t, size_t> Range =
       std::make_pair(StateOffset[Src], StateOffset[Src + 1]);
   auto SymbolRange = llvm::makeArrayRef(Symbols.data() + Range.first,


        


More information about the cfe-commits mailing list