diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-02-05 11:01:54 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-02-05 11:01:54 +0000 |
commit | 72798954544f46111a106c44b26e5ad8b77bbd05 (patch) | |
tree | a95d94eef10ab566b0342167527bdfa60ab402bd /llvm/bindings/go | |
parent | 9e595e366348ea340746cf0849b5f4cae42e1ff5 (diff) | |
download | bcm5719-llvm-72798954544f46111a106c44b26e5ad8b77bbd05.tar.gz bcm5719-llvm-72798954544f46111a106c44b26e5ad8b77bbd05.zip |
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: 353155
Diffstat (limited to 'llvm/bindings/go')
-rw-r--r-- | llvm/bindings/go/llvm/ir_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/bindings/go/llvm/ir_test.go b/llvm/bindings/go/llvm/ir_test.go index d7097a33346..5dd0598c012 100644 --- a/llvm/bindings/go/llvm/ir_test.go +++ b/llvm/bindings/go/llvm/ir_test.go @@ -30,7 +30,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() @@ -41,7 +41,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) } } |