[flang] Address comment: make CHECK test more explicit
authorJean Perier <jperier@nvidia.com>
Wed, 24 Jul 2019 09:06:31 +0000 (02:06 -0700)
committerJean Perier <jperier@nvidia.com>
Wed, 24 Jul 2019 09:06:31 +0000 (02:06 -0700)
Original-commit: flang-compiler/f18@a346462676b676d0abe2f98db2a80c8a4af3bd42
Reviewed-on: https://github.com/flang-compiler/f18/pull/600

flang/lib/semantics/resolve-names.cc

index dc8d1e8..2575f6c 100644 (file)
@@ -4441,7 +4441,7 @@ ConstructVisitor::Selector ConstructVisitor::ResolveSelector(
 }
 
 ConstructVisitor::Association &ConstructVisitor::GetCurrentAssociation() {
-  CHECK(associationStack_.size());
+  CHECK(!associationStack_.empty());
   return associationStack_.back();
 }
 
@@ -4450,7 +4450,7 @@ void ConstructVisitor::PushAssociation() {
 }
 
 void ConstructVisitor::PopAssociation() {
-  CHECK(associationStack_.size());
+  CHECK(!associationStack_.empty());
   associationStack_.pop_back();
 }