Skip to content

Commit eb83b55

Browse files
committed
Fix mysterious failure of SupportTests FileCheckTest.Binop
The test would fail in no-asserts release builds using MSVC for 64-bit Windows: Unexpected error message: TestBuffer:1:1: error: implicit format conflict between 'FOO' (%u) and '18\0' (%x), need an explicit format specifier Error message(s) not found: {implicit format conflict between 'FOO' (%u) and 'BAZ' (%x), need an explicit format specifier} It seems a string from a previous test case is finding its way into the latter one. This doesn't reproduce on master anymore after 998709b, so let's just hack around it here for the branch.
1 parent 2939249 commit eb83b55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/unittests/Support/FileCheckTest.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ TEST_F(FileCheckTest, Binop) {
714714
Value = Binop.eval();
715715
expectUndefErrors({"FOO", "BAR"}, Value.takeError());
716716

717+
{
717718
// Literal + Variable has format of variable.
718719
ExprStr = bufferize(SM, "FOO+18");
719720
FooStr = ExprStr.take_front(3);
@@ -736,6 +737,7 @@ TEST_F(FileCheckTest, Binop) {
736737
ImplicitFormat = Binop.getImplicitFormat(SM);
737738
ASSERT_THAT_EXPECTED(ImplicitFormat, Succeeded());
738739
EXPECT_EQ(*ImplicitFormat, ExpressionFormat::Kind::Unsigned);
740+
}
739741

740742
// Variables with different implicit format conflict.
741743
ExprStr = bufferize(SM, "FOO+BAZ");

0 commit comments

Comments
 (0)