<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thank you very much, Sam!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Tianle<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Sam McCall [mailto:sammccall@google.com]
<br>
<b>Sent:</b> Saturday, April 20, 2019 7:55 PM<br>
<b>To:</b> reviews+D60779+public+1dfc1c5f591db94d@reviews.llvm.org<br>
<b>Cc:</b> Ilya Biryukov <ibiryukov@google.com>; gribozavr@gmail.com; Liu, Tianle L <tianle.l.liu@intel.com>; Jan Korous <jkorous@apple.com>; Duncan P. N. Exon Smith <dexonsmith@apple.com>; notstina@gmail.com; llvm-commits <llvm-commits@lists.llvm.org><br>
<b>Subject:</b> Re: [PATCH] D60779: [ADT] llvm::bsearch, binary search for mere mortals<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Should be fixed by r358811<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Sat, Apr 20, 2019 at 11:55 AM Sam McCall <<a href="mailto:sammccall@google.com">sammccall@google.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Ah sorry, i wasn't building with this warning on.<o:p></o:p></p>
<div>
<p class="MsoNormal">It's noise here, but i can change the example so it doesn't fire.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Will land that patch later today once i find a computer.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Sat, Apr 20, 2019, 05:18 Tianle Liu via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt">liutianle added a comment.<br>
<br>
hi sammccall, when I run "check-all", some waring/error print out in STLExtrasTest.cpp as follow. My version is llvm:0ee120077 and clang:d87ee8e678. Could you please fix it or guide me how to fix it?<br>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp: In lambda function:<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp:475:58: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]<br>
<br>
  EXPECT_EQ(5u, bsearch(5, 10, [](unsigned X) { return X >= 0; }));<br>
                                                         ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro 'GTEST_ASSERT_'<br>
<br>
  if (const ::testing::AssertionResult gtest_ar = (expression)) \<br>
                                                   ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h:162:3: note: in expansion of macro 'GTEST_PRED_FORMAT2_'<br>
<br>
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)<br>
  ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest.h:1923:3: note: in expansion of macro 'EXPECT_PRED_FORMAT2'<br>
<br>
  EXPECT_PRED_FORMAT2(::testing::internal:: \<br>
  ^<br>
<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp:475:3: note: in expansion of macro 'EXPECT_EQ'<br>
<br>
  EXPECT_EQ(5u, bsearch(5, 10, [](unsigned X) { return X >= 0; }));<br>
  ^<br>
<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp: In lambda function:<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp:483:67: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]<br>
<br>
  bsearch(V.begin(), V.end(), [](unsigned X) { return X >= 0; }));<br>
                                                        ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro 'GTEST_ASSERT_'<br>
<br>
  if (const ::testing::AssertionResult gtest_ar = (expression)) \<br>
                                                      ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h:162:3: note: in expansion of macro 'GTEST_PRED_FORMAT2_'<br>
<br>
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)<br>
  ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest.h:1923:3: note: in expansion of macro 'EXPECT_PRED_FORMAT2'<br>
<br>
  EXPECT_PRED_FORMAT2(::testing::internal:: \<br>
  ^<br>
<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp:482:3: note: in expansion of macro 'EXPECT_EQ'<br>
<br>
  EXPECT_EQ(V.begin(),<br>
  ^<br>
<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp: In lambda function:<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp:489:61: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]<br>
<br>
  EXPECT_EQ(V.begin(), bsearch(V, [](unsigned X) { return X >= 0; }));<br>
                                                            ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro 'GTEST_ASSERT_'<br>
<br>
  if (const ::testing::AssertionResult gtest_ar = (expression)) \<br>
                                                   ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h:162:3: note: in expansion of macro 'GTEST_PRED_FORMAT2_'<br>
<br>
  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)<br>
  ^<br>
<br>
myLLVM/llvm/utils/unittest/googletest/include/gtest/gtest.h:1923:3: note: in expansion of macro 'EXPECT_PRED_FORMAT2'<br>
<br>
  EXPECT_PRED_FORMAT2(::testing::internal:: \<br>
  ^<br>
<br>
myLLVM/llvm/unittests/ADT/STLExtrasTest.cpp:489:3: note: in expansion of macro 'EXPECT_EQ'<br>
<br>
  EXPECT_EQ(V.begin(), bsearch(V, [](unsigned X) { return X >= 0; }));<br>
  ^<br>
<br>
-----------------------------------------------------------------------------------------------------------------------------<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D60779/new/" target="_blank">https://reviews.llvm.org/D60779/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D60779" target="_blank">https://reviews.llvm.org/D60779</a><br>
<br>
<br>
<o:p></o:p></p>
</blockquote>
</div>
</blockquote>
</div>
</div>
</body>
</html>