Commit a86a15d
AndreiDiaconu1
Fix problem with
The translation of `IsExpr` created a sanity check to fail since it generated
a Phi node that had only one source: if a variable was declared as part of the `IsExpr`, a conditional branch was generated, and the variable was defined only in the true successor; this has been changes so that the declaration happens before the conditional branch, and the variable is uninitialized (this removed the need for the `isInitializedByElement` predicate from `TranslatedDeclarationBase`, so that has been removed) and only the assignment happens in the true successor block (so now the two inputs of the Phi node are the result of the `Uninitialized` instruction and the `Store` instruction from the true successor block).IsExpr
1 parent 17e6b80 commit a86a15d
File tree
6 files changed
+17
-36
lines changed- csharp/ql
- src/semmle/code/csharp/ir
- implementation/raw/internal
- common
- desugar/internal
- test/library-tests/ir/ir
6 files changed
+17
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | 75 | | |
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1792 | 1792 | | |
1793 | 1793 | | |
1794 | 1794 | | |
1795 | | - | |
1796 | 1795 | | |
1797 | | - | |
| 1796 | + | |
1798 | 1797 | | |
1799 | | - | |
1800 | 1798 | | |
1801 | 1799 | | |
1802 | 1800 | | |
1803 | 1801 | | |
1804 | 1802 | | |
1805 | 1803 | | |
1806 | | - | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
1807 | 1807 | | |
1808 | 1808 | | |
1809 | 1809 | | |
1810 | 1810 | | |
1811 | 1811 | | |
1812 | 1812 | | |
1813 | 1813 | | |
1814 | | - | |
1815 | | - | |
| 1814 | + | |
| 1815 | + | |
1816 | 1816 | | |
1817 | 1817 | | |
1818 | 1818 | | |
| |||
1842 | 1842 | | |
1843 | 1843 | | |
1844 | 1844 | | |
1845 | | - | |
| 1845 | + | |
1846 | 1846 | | |
1847 | 1847 | | |
1848 | 1848 | | |
| |||
Lines changed: 3 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 42 | + | |
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
| |||
75 | 70 | | |
76 | 71 | | |
77 | 72 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 73 | + | |
| 74 | + | |
83 | 75 | | |
84 | 76 | | |
85 | 77 | | |
| |||
101 | 93 | | |
102 | 94 | | |
103 | 95 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | 96 | | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 75 | | |
80 | 76 | | |
81 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
809 | | - | |
810 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
811 | 813 | | |
812 | 814 | | |
813 | 815 | | |
| |||
817 | 819 | | |
818 | 820 | | |
819 | 821 | | |
820 | | - | |
| 822 | + | |
821 | 823 | | |
822 | 824 | | |
823 | 825 | | |
824 | 826 | | |
825 | | - | |
826 | | - | |
| 827 | + | |
827 | 828 | | |
828 | 829 | | |
829 | 830 | | |
| |||
0 commit comments