Commit 907c558
Introduce temporary bindings to BoundsCastExprs (#694)
Cherry-picked from commit 82f665e
Author: Katherine Kjeer <[email protected]>
Commit: GitHub <[email protected]>
Introduce temporary bindings to BoundsCastExprs (#694)
* Account for cast kind in StmtProfiler::VisitBoundsCastExpr and CanonBounds::CompareImpl
* Don't treat dynamic and assume bounds casts as value preserving; don't compare types on bounds expressions
* Introduce a temporary binding expression for all bounds cast expressions
* Use the temporary bindings introduced in bounds cast expressions to infer bounds
* Remove unused PruneTemporaryBindings
* Treat e and the usage of a temporary binding of e as equal
* Remove llvm_unreachable from CanonBounds::Compare
* Account for bounds cast expressions in GetTempBinding
* Treat bounds casts as value preserving in CheckBoundsDelarations::EqualValue (introducing the assumption that E1 and E2 have been evaluated)
* Remove function call test from bounds-decl-challenges
* Add AST dump tests for bounds cast expression temporaries
* Fix indentation
* More formatting fixes
* Revert treating bounds casts as value preserving in EqualValue
* Add comment about lack of bounds expression types
* Prune temporary bindings from member expression bounds
* Account for checked scope information in PruneTemporaryBindings1 parent 4bd1634 commit 907c558
File tree
13 files changed
+269
-150
lines changed- clang
- include/clang
- AST
- Sema
- lib
- AST
- Sema
- test/CheckedC
- inferred-bounds
- static-checking
13 files changed
+269
-150
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4951 | 4951 | | |
4952 | 4952 | | |
4953 | 4953 | | |
4954 | | - | |
| 4954 | + | |
4955 | 4955 | | |
4956 | 4956 | | |
4957 | 4957 | | |
| |||
4975 | 4975 | | |
4976 | 4976 | | |
4977 | 4977 | | |
4978 | | - | |
| 4978 | + | |
4979 | 4979 | | |
4980 | 4980 | | |
4981 | 4981 | | |
| |||
4985 | 4985 | | |
4986 | 4986 | | |
4987 | 4987 | | |
| 4988 | + | |
4988 | 4989 | | |
4989 | 4990 | | |
4990 | 4991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
326 | | - | |
327 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
328 | 327 | | |
329 | 328 | | |
330 | | - | |
331 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
332 | 337 | | |
333 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
334 | 344 | | |
335 | 345 | | |
336 | 346 | | |
| |||
446 | 456 | | |
447 | 457 | | |
448 | 458 | | |
449 | | - | |
450 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
451 | 464 | | |
452 | 465 | | |
453 | 466 | | |
| |||
754 | 767 | | |
755 | 768 | | |
756 | 769 | | |
757 | | - | |
| 770 | + | |
758 | 771 | | |
759 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
760 | 778 | | |
761 | 779 | | |
762 | 780 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1321 | 1321 | | |
1322 | 1322 | | |
1323 | 1323 | | |
| 1324 | + | |
1324 | 1325 | | |
1325 | 1326 | | |
1326 | 1327 | | |
| |||
0 commit comments