Commit 35f4f2f7 authored by Hans Wennborg's avatar Hans Wennborg
Browse files

Merging r353155:

------------------------------------------------------------------------
r353155 | hans | 2019-02-05 12:01:54 +0100 (Tue, 05 Feb 2019) | 11 lines

Fix format string in bindings/go/llvm/ir_test.go (PR40561)

The test started failing for me recently. I don't see any changes around
this code, so maybe it's my local go version that changed or something.

The error seems real to me: we're trying to print an Attribute with %d.
The test talks about "attribute masks" I'm not sure what that refers to,
but I suppose we could print the raw pointer value, since that's
what the test seems to be comparing.

Differential revision: https://reviews.llvm.org/D57672
------------------------------------------------------------------------

llvm-svn: 353279
parent 30ce79ed
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ func testAttribute(t *testing.T, name string) {
	fn.AddFunctionAttr(attr)
	newattr := fn.GetEnumFunctionAttribute(kind)
	if attr != newattr {
		t.Errorf("got attribute mask %d, want %d", newattr, attr)
		t.Errorf("got attribute %p, want %p", newattr.C, attr.C)
	}

	text := mod.String()
@@ -42,7 +42,7 @@ func testAttribute(t *testing.T, name string) {
	fn.RemoveEnumFunctionAttribute(kind)
	newattr = fn.GetEnumFunctionAttribute(kind)
	if !newattr.IsNil() {
		t.Errorf("got attribute mask %d, want 0", newattr)
		t.Errorf("got attribute %p, want 0", newattr.C)
	}
}