Commit 3c8c0d4
committed
Thread Safety Analysis: Handle address-of followed by dereference
Correctly analyze expressions where the address of a guarded variable is
taken and immediately dereferenced, such as (*(type-specifier *)&x).
Previously, such patterns would result in false negatives.
Pull Request: llvm/llvm-project#1273961 parent 5c8e22b commit 3c8c0d4
File tree
2 files changed
+30
-0
lines changed- clang
- lib/Analysis
- test/Sema
2 files changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1765 | 1765 | | |
1766 | 1766 | | |
1767 | 1767 | | |
| 1768 | + | |
| 1769 | + | |
1768 | 1770 | | |
1769 | 1771 | | |
1770 | 1772 | | |
| |||
1783 | 1785 | | |
1784 | 1786 | | |
1785 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
1786 | 1797 | | |
1787 | 1798 | | |
1788 | 1799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
145 | 156 | | |
146 | 157 | | |
147 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
148 | 167 | | |
149 | 168 | | |
150 | 169 | | |
| |||
0 commit comments