[llvm-branch-commits] [llvm-branch] r353279 - Merging r353155:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 6 00:31:23 PST 2019


Author: hans
Date: Wed Feb  6 00:31:22 2019
New Revision: 353279

URL: http://llvm.org/viewvc/llvm-project?rev=353279&view=rev
Log:
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
------------------------------------------------------------------------

Modified:
    llvm/branches/release_80/   (props changed)
    llvm/branches/release_80/bindings/go/llvm/ir_test.go

Propchange: llvm/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb  6 00:31:22 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,351325,351344-351345,351349,351351,351370,351381,351421,351426,351436,351475,351485,351753-351754,351910,351930,351932,352034,352204,352246,352374,352555,352770,352889,352945,353082,353218
+/llvm/trunk:155241,351325,351344-351345,351349,351351,351370,351381,351421,351426,351436,351475,351485,351753-351754,351910,351930,351932,352034,352204,352246,352374,352555,352770,352889,352945,353082,353155,353218

Modified: llvm/branches/release_80/bindings/go/llvm/ir_test.go
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_80/bindings/go/llvm/ir_test.go?rev=353279&r1=353278&r2=353279&view=diff
==============================================================================
--- llvm/branches/release_80/bindings/go/llvm/ir_test.go (original)
+++ llvm/branches/release_80/bindings/go/llvm/ir_test.go Wed Feb  6 00:31:22 2019
@@ -31,7 +31,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()
@@ -42,7 +42,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)
 	}
 }
 




More information about the llvm-branch-commits mailing list