Commit 36ba535
committed
[cxx-interop] Avoid crashing upon invalid function template instantiation
We were previously not handling cases where the instantiation of the
**declaration** of a function template is valid, but the instantiation
of its **definition** is invalid (e.g., because it contains an invalid
static_cast() or static_assert()). This patch teaches ClangImporter to
correctly diagnose these as compiler errors, rather than simply
crashing.
rdar://1374568971 parent d68ca8d commit 36ba535
File tree
2 files changed
+61
-4
lines changed- lib/ClangImporter
- test/Interop/Cxx/templates
2 files changed
+61
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7300 | 7300 | | |
7301 | 7301 | | |
7302 | 7302 | | |
7303 | | - | |
7304 | | - | |
7305 | | - | |
7306 | | - | |
| 7303 | + | |
| 7304 | + | |
7307 | 7305 | | |
7308 | 7306 | | |
7309 | 7307 | | |
| |||
7315 | 7313 | | |
7316 | 7314 | | |
7317 | 7315 | | |
| 7316 | + | |
| 7317 | + | |
| 7318 | + | |
| 7319 | + | |
| 7320 | + | |
| 7321 | + | |
| 7322 | + | |
7318 | 7323 | | |
7319 | 7324 | | |
| 7325 | + | |
7320 | 7326 | | |
| 7327 | + | |
| 7328 | + | |
| 7329 | + | |
| 7330 | + | |
| 7331 | + | |
| 7332 | + | |
| 7333 | + | |
7321 | 7334 | | |
7322 | 7335 | | |
7323 | 7336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
0 commit comments