[all-commits] [llvm/llvm-project] 35537a: [Modules][Test][NFC] Fix -Wsign-compare in clang/u...

Jie Fu via All-commits all-commits at lists.llvm.org
Thu Feb 9 18:51:54 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 35537aea1228df29c4e32049e4750029c5f0693b
      https://github.com/llvm/llvm-project/commit/35537aea1228df29c4e32049e4750029c5f0693b
  Author: Jie Fu <jiefu at tencent.com>
  Date:   2023-02-10 (Fri, 10 Feb 2023)

  Changed paths:
    M clang/unittests/Lex/ModuleDeclStateTest.cpp

  Log Message:
  -----------
  [Modules][Test][NFC] Fix -Wsign-compare in clang/unittests/Lex/ModuleDeclStateTest.cpp

In file included from /data/jiefu/llvm-project/clang/unittests/Lex/ModuleDeclStateTest.cpp:22:
/data/jiefu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: error: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
/data/jiefu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1553:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
/data/jiefu/llvm-project/clang/unittests/Lex/ModuleDeclStateTest.cpp:124:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here
  EXPECT_EQ(Callback->importNamedModuleNum(), 0);
  ^
/data/jiefu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2027:54: note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
1 error generated.




More information about the All-commits mailing list