Commit 0a38617
Gabor Horvath
[cxx-interop] Require lifetime annotations in safe mode
In strict safe mode we should consider all C++ APIs with non-escapable
parameters unsafe unless they have their lifetimes annotated. This can
be done using [[clang::lifetimebound]], [[clang::lifetime_capture_by]],
or [[clang::noescape]].1 parent e50b27f commit 0a38617
File tree
2 files changed
+31
-2
lines changed- lib/ClangImporter
- test/Interop/Cxx/class
2 files changed
+31
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3980 | 3980 | | |
3981 | 3981 | | |
3982 | 3982 | | |
3983 | | - | |
3984 | | - | |
| 3983 | + | |
| 3984 | + | |
3985 | 3985 | | |
3986 | 3986 | | |
3987 | 3987 | | |
| |||
4013 | 4013 | | |
4014 | 4014 | | |
4015 | 4015 | | |
| 4016 | + | |
4016 | 4017 | | |
4017 | 4018 | | |
4018 | 4019 | | |
| 4020 | + | |
4019 | 4021 | | |
4020 | 4022 | | |
4021 | 4023 | | |
| |||
4039 | 4041 | | |
4040 | 4042 | | |
4041 | 4043 | | |
| 4044 | + | |
4042 | 4045 | | |
4043 | 4046 | | |
4044 | 4047 | | |
| |||
4110 | 4113 | | |
4111 | 4114 | | |
4112 | 4115 | | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
4113 | 4129 | | |
4114 | 4130 | | |
4115 | 4131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
0 commit comments