Commit b8754a8
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 365dcf4 commit b8754a8
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 | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
4038 | 4038 | | |
4039 | 4039 | | |
4040 | 4040 | | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
4041 | 4048 | | |
4042 | 4049 | | |
4043 | 4050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4082 | 4082 | | |
4083 | 4083 | | |
4084 | 4084 | | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
4085 | 4088 | | |
4086 | 4089 | | |
4087 | 4090 | | |
| |||
4105 | 4108 | | |
4106 | 4109 | | |
4107 | 4110 | | |
4108 | | - | |
| 4111 | + | |
4109 | 4112 | | |
4110 | 4113 | | |
4111 | | - | |
| 4114 | + | |
4112 | 4115 | | |
4113 | 4116 | | |
4114 | 4117 | | |
| |||
0 commit comments