Commit e604f91
committed
analysis/report: better handling of sourcers with no node
Some IR values do not have a valid Source, most prominently constants.
Don't panic when we can avoid it: when trying to emit related
information, it makes more sense to drop the related information on
the floor than to panic. We still panic for the toplevel diagnostic,
because it makes no sense to print a diagnostic for an unknown
location. It is an explicit panic now, however, so we get a more
helpful message.
Closes gh-9721 parent 08e1523 commit e604f91
1 file changed
+22
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | | - | |
130 | | - | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
134 | | - | |
| 141 | + | |
| 142 | + | |
135 | 143 | | |
136 | | - | |
| 144 | + | |
137 | 145 | | |
138 | 146 | | |
139 | | - | |
| 147 | + | |
| 148 | + | |
140 | 149 | | |
141 | | - | |
| 150 | + | |
142 | 151 | | |
143 | | - | |
| 152 | + | |
144 | 153 | | |
145 | 154 | | |
146 | 155 | | |
| |||
158 | 167 | | |
159 | 168 | | |
160 | 169 | | |
161 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
| |||
0 commit comments