[lldb] Unbreak test after 931d04be2fc8f3f0505b43e64297f75d526cb42a
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 15 Jan 2023 20:39:31 +0000 (21:39 +0100)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 15 Jan 2023 20:39:31 +0000 (21:39 +0100)
lldb/unittests/Core/SourceLocationSpecTest.cpp

index 0cf1683..0b451f5 100644 (file)
@@ -122,7 +122,7 @@ TEST(SourceLocationSpecTest, Equal) {
 
 TEST(SourceLocationSpecTest, Compare) {
   auto Cmp = [](SourceLocationSpec a, SourceLocationSpec b) {
-    return SourceLocationSpec::Compare(a, b);
+    return std::clamp(SourceLocationSpec::Compare(a, b), -1, 1);
   };
 
   FileSpec fs("/foo/bar", FileSpec::Style::posix);