aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata/all.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-06-30 19:34:41 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-06-30 19:34:41 +0200
commit664ef9a3e1016e80fc1fcbbef6e9f66a2ededfe6 (patch)
tree3f5829d9ad2ada25336f3bf98b85a65ec517c22e /pkg/compiler/testdata/all.txt
parent9054fae0162950c1fd961819f64b1ac90e5930b3 (diff)
pkg/compiler: check for unused declarations
Error on unused structs/unions/resources/flags. Finds tons of bugs.
Diffstat (limited to 'pkg/compiler/testdata/all.txt')
-rw-r--r--pkg/compiler/testdata/all.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/all.txt b/pkg/compiler/testdata/all.txt
index 69ad6d181..a5a097de3 100644
--- a/pkg/compiler/testdata/all.txt
+++ b/pkg/compiler/testdata/all.txt
@@ -7,6 +7,7 @@ foo$2(a ptr[out, array[int32]])
foo$3(a union_arg)
foo$4() r0
foo$5(a int8['a':'z'])
+foo$6(a ptr[in, strings])
resource r0[intptr]
@@ -38,6 +39,8 @@ strings {
string_flags1 = "foo", "barbaz"
string_flags2 = ""
int_flags = 0, 1
+_ = 1, 2
+_ = C1, C2
# Proc type.
@@ -45,6 +48,8 @@ proc_struct1 {
f1 proc[C0, 8, int8]
}
+foo$proc1(a ptr[in, proc_struct1])
+
# Len/bytesize types.
type len_templ1[DATA1, DATA2] {
@@ -122,6 +127,8 @@ bitfield0 {
f2 int8:2
}
+foo$bitfield0(a ptr[in, bitfield0])
+
# Type templates.
type type0 int8
@@ -184,6 +191,8 @@ foo$templ3(a ptr[in, templ_struct1[1]], b ptr[in, templ_struct1[2]])
foo$templ4(a ptr[in, templ_struct1[3]])
foo$templ5(a ptr[in, templ_struct1[3]])
foo$templ6(a ptr[in, templ_struct4])
+foo$templ7(a ptr[in, templ_struct5], b ptr[in, templ_struct6], c ptr[in, templ_union], d ptr[in, type3])
+foo$templ8(a ptr[in, templ_templ_use])
# Structs.
@@ -195,8 +204,12 @@ s1 {
f1 int8
} [size[C2]]
+foo$s0(a ptr[in, s0], b ptr[in, s1])
+
# Unions.
u0 [
f1 int32
]
+
+foo$u0(a ptr[in, u0])