[llvm-branch-commits] [clang] 1784fe7 - [Clang] Fix signed-unsigned comparison warning that breaks the ppc64 build.

Martin Boehme via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jun 15 01:53:58 PDT 2022


Author: Martin Boehme
Date: 2022-06-15T10:53:14+02:00
New Revision: 1784fe7be782ce34bf4a06529a89f47d1ec0e6f4

URL: https://github.com/llvm/llvm-project/commit/1784fe7be782ce34bf4a06529a89f47d1ec0e6f4
DIFF: https://github.com/llvm/llvm-project/commit/1784fe7be782ce34bf4a06529a89f47d1ec0e6f4.diff

LOG: [Clang] Fix signed-unsigned comparison warning that breaks the ppc64 build.

Added: 
    

Modified: 
    clang/unittests/AST/AttrTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/AST/AttrTest.cpp b/clang/unittests/AST/AttrTest.cpp
index d9ea1ae061f0..518f995ed104 100644
--- a/clang/unittests/AST/AttrTest.cpp
+++ b/clang/unittests/AST/AttrTest.cpp
@@ -102,13 +102,13 @@ TEST(Attr, AnnotateType) {
     AssertAnnotatedAs(PointerTL.getPointeeLoc(), "foo", PointerPointerTL,
                       &Annotate);
 
-    EXPECT_EQ(Annotate->args_size(), 2);
+    EXPECT_EQ(Annotate->args_size(), 2u);
     const auto *StringLit = selectFirst<StringLiteral>(
         "str", match(constantExpr(hasDescendant(stringLiteral().bind("str"))),
                      *Annotate->args_begin()[0], AST->getASTContext()));
     ASSERT_NE(StringLit, nullptr);
     EXPECT_EQ(StringLit->getString(), "arg1");
-    EXPECT_EQ(match(constantExpr(has(integerLiteral(equals(2)).bind("int"))),
+    EXPECT_EQ(match(constantExpr(has(integerLiteral(equals(2u)).bind("int"))),
                     *Annotate->args_begin()[1], AST->getASTContext())
                   .size(),
               1);


        


More information about the llvm-branch-commits mailing list