[PATCH] D57672: Fix format string in bindings/go/llvm/ir_test.go (PR40561)
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 01:25:56 PST 2019
hans created this revision.
hans added a reviewer: pcc.
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.
https://reviews.llvm.org/D57672
Files:
llvm/bindings/go/llvm/ir_test.go
Index: llvm/bindings/go/llvm/ir_test.go
===================================================================
--- llvm/bindings/go/llvm/ir_test.go
+++ llvm/bindings/go/llvm/ir_test.go
@@ -30,7 +30,7 @@
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()
@@ -41,7 +41,7 @@
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)
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57672.185004.patch
Type: text/x-patch
Size: 688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190204/5988b5ac/attachment.bin>
More information about the llvm-commits
mailing list