Commit 423ab37
committed
Thread Safety Analysis: Support reentrant capabilities
Introduce the `reentrant_capability` attribute, which may be specified
alongside the `capability(..)` attribute to denote that the defined
capability type is reentrant. Marking a capability as reentrant means
that acquiring the same capability multiple times is safe, and does not
produce warnings on attempted re-acquisition.
The most significant changes required are plumbing to propagate if the
attribute is present to a CapabilityExpr, and then introducing a
ReentrancyCount to FactEntry that can be incremented while a fact
remains in the FactSet.1 parent a5defd2 commit 423ab37
File tree
16 files changed
+624
-77
lines changed- clang
- docs
- include/clang
- Analysis/Analyses
- Basic
- lib
- Analysis
- Sema
- test
- Misc
- SemaCXX
- Sema
- unittests/AST
16 files changed
+624
-77
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
439 | 440 | | |
440 | 441 | | |
441 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
437 | 452 | | |
438 | 453 | | |
439 | 454 | | |
| |||
846 | 861 | | |
847 | 862 | | |
848 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
849 | 867 | | |
850 | 868 | | |
851 | 869 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | | - | |
| 173 | + | |
| 174 | + | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| |||
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| 276 | + | |
275 | 277 | | |
276 | 278 | | |
277 | | - | |
| 279 | + | |
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
284 | | - | |
285 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
286 | 291 | | |
287 | 292 | | |
288 | | - | |
| 293 | + | |
| 294 | + | |
289 | 295 | | |
290 | 296 | | |
291 | 297 | | |
292 | 298 | | |
| 299 | + | |
293 | 300 | | |
294 | 301 | | |
295 | | - | |
| 302 | + | |
| 303 | + | |
296 | 304 | | |
297 | 305 | | |
298 | 306 | | |
| |||
389 | 397 | | |
390 | 398 | | |
391 | 399 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | 400 | | |
397 | 401 | | |
398 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4027 | 4027 | | |
4028 | 4028 | | |
4029 | 4029 | | |
| 4030 | + | |
| 4031 | + | |
| 4032 | + | |
| 4033 | + | |
| 4034 | + | |
| 4035 | + | |
| 4036 | + | |
4030 | 4037 | | |
4031 | 4038 | | |
4032 | 4039 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4060 | 4060 | | |
4061 | 4061 | | |
4062 | 4062 | | |
| 4063 | + | |
| 4064 | + | |
| 4065 | + | |
4063 | 4066 | | |
4064 | 4067 | | |
4065 | 4068 | | |
| |||
4083 | 4086 | | |
4084 | 4087 | | |
4085 | 4088 | | |
4086 | | - | |
| 4089 | + | |
4087 | 4090 | | |
4088 | 4091 | | |
4089 | | - | |
| 4092 | + | |
4090 | 4093 | | |
4091 | 4094 | | |
4092 | 4095 | | |
| |||
0 commit comments