Commit bbd60c8
Gabor Horvath
[cxx-interop] Fix circular reference, remove feature flag check
It turns out the query to check the reference semantics of a type had
the side effect of importing some functions/types. This could introduce
circular reference errors with our queries. This PR removes this side
effect from the query and updates the test files. Since we do the same
work later on in another query, the main change is just the wording of
the diagnostics (and we now can also infer immortal references based on
the base types). This PR also reorders some operations, specifically now
we mark base classes as imported before we attempt to import template
arguments.
After these changes it is possible to remove the last feature check for
strict memory safe mode. We want to mark types as @unsafe in both
language modes so we can diagnose redundant unsafe markers even when the
feature is off.1 parent fcc367a commit bbd60c8
File tree
4 files changed
+52
-63
lines changed- lib/ClangImporter
- test/Interop/Cxx/foreign-reference
- Inputs
4 files changed
+52
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7792 | 7792 | | |
7793 | 7793 | | |
7794 | 7794 | | |
7795 | | - | |
| 7795 | + | |
7796 | 7796 | | |
7797 | 7797 | | |
7798 | 7798 | | |
| |||
7801 | 7801 | | |
7802 | 7802 | | |
7803 | 7803 | | |
7804 | | - | |
7805 | | - | |
7806 | | - | |
7807 | | - | |
7808 | | - | |
7809 | | - | |
7810 | | - | |
7811 | | - | |
7812 | | - | |
7813 | | - | |
| 7804 | + | |
| 7805 | + | |
| 7806 | + | |
| 7807 | + | |
7814 | 7808 | | |
7815 | 7809 | | |
7816 | 7810 | | |
| |||
8175 | 8169 | | |
8176 | 8170 | | |
8177 | 8171 | | |
8178 | | - | |
| 8172 | + | |
8179 | 8173 | | |
8180 | 8174 | | |
8181 | 8175 | | |
| |||
8339 | 8333 | | |
8340 | 8334 | | |
8341 | 8335 | | |
8342 | | - | |
| 8336 | + | |
8343 | 8337 | | |
8344 | | - | |
| 8338 | + | |
| 8339 | + | |
8345 | 8340 | | |
8346 | | - | |
8347 | 8341 | | |
8348 | 8342 | | |
8349 | 8343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2197 | 2197 | | |
2198 | 2198 | | |
2199 | 2199 | | |
2200 | | - | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | | - | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
2222 | | - | |
2223 | | - | |
2224 | | - | |
2225 | | - | |
2226 | | - | |
2227 | | - | |
2228 | | - | |
2229 | | - | |
2230 | | - | |
2231 | | - | |
2232 | 2200 | | |
2233 | 2201 | | |
2234 | 2202 | | |
| |||
2238 | 2206 | | |
2239 | 2207 | | |
2240 | 2208 | | |
2241 | | - | |
2242 | | - | |
2243 | | - | |
2244 | | - | |
2245 | | - | |
2246 | | - | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
2251 | 2209 | | |
2252 | 2210 | | |
2253 | 2211 | | |
| |||
2259 | 2217 | | |
2260 | 2218 | | |
2261 | 2219 | | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
2262 | 2258 | | |
2263 | 2259 | | |
2264 | 2260 | | |
| |||
2965 | 2961 | | |
2966 | 2962 | | |
2967 | 2963 | | |
2968 | | - | |
| 2964 | + | |
2969 | 2965 | | |
2970 | 2966 | | |
2971 | 2967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 83 | + | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
| |||
284 | 282 | | |
285 | 283 | | |
286 | 284 | | |
287 | | - | |
| 285 | + | |
| 286 | + | |
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments