[llvm] r353155 - Fix format string in bindings/go/llvm/ir_test.go (PR40561)
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 6 00:31:10 PST 2019
Merged to 8.0 in r353279.
On Tue, Feb 5, 2019 at 12:01 PM Hans Wennborg via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
> Author: hans
> Date: Tue Feb 5 03:01:54 2019
> New Revision: 353155
>
> URL: http://llvm.org/viewvc/llvm-project?rev=353155&view=rev
> Log:
> 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
>
> Modified:
> llvm/trunk/bindings/go/llvm/ir_test.go
>
> Modified: llvm/trunk/bindings/go/llvm/ir_test.go
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/ir_test.go?rev=353155&r1=353154&r2=353155&view=diff
> ==============================================================================
> --- llvm/trunk/bindings/go/llvm/ir_test.go (original)
> +++ llvm/trunk/bindings/go/llvm/ir_test.go Tue Feb 5 03:01:54 2019
> @@ -30,7 +30,7 @@ func testAttribute(t *testing.T, name st
> 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 st
> 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)
> }
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list