Skip to content

Commit 35f4f2f

Browse files
committed
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
1 parent 30ce79e commit 35f4f2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/bindings/go/llvm/ir_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func testAttribute(t *testing.T, name string) {
3131
fn.AddFunctionAttr(attr)
3232
newattr := fn.GetEnumFunctionAttribute(kind)
3333
if attr != newattr {
34-
t.Errorf("got attribute mask %d, want %d", newattr, attr)
34+
t.Errorf("got attribute %p, want %p", newattr.C, attr.C)
3535
}
3636

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

0 commit comments

Comments
 (0)