[all-commits] [llvm/llvm-project] 0ae342: [lldb][test] Fix -Wsign-compare in RegisterFlagsTe...

Jie Fu via All-commits all-commits at lists.llvm.org
Thu Apr 13 18:48:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ae342f45bedd29e34690de087011a9da4db6a65
      https://github.com/llvm/llvm-project/commit/0ae342f45bedd29e34690de087011a9da4db6a65
  Author: Jie Fu <jiefu at tencent.com>
  Date:   2023-04-14 (Fri, 14 Apr 2023)

  Changed paths:
    M lldb/unittests/Target/RegisterFlagsTest.cpp

  Log Message:
  -----------
  [lldb][test] Fix -Wsign-compare in RegisterFlagsTest.cpp (NFC)

/data/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: error: comparison of integers of different signs: 'const unsigned long long' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
/data/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1553:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long long, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
/data/llvm-project/lldb/unittests/Target/RegisterFlagsTest.cpp:128:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long long, int, nullptr>' requested here
  ASSERT_EQ(0x12345678ULL, rf.ReverseFieldOrder(0x12345678));
  ^
/data/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2056:32: note: expanded from macro 'ASSERT_EQ'
                               ^
/data/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2040:54: note: expanded from macro 'GTEST_ASSERT_EQ'
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
1 error generated.




More information about the All-commits mailing list