Commit d0f0b5b
Thread safety analysis: Warn when demoting locks on back edges
Previously in D104261 we warned about dropping locks from back edges,
this is the corresponding change for exclusive/shared joins. If we're
entering the loop with an exclusive change, which is then relaxed to a
shared lock before we loop back, we have already analyzed the loop body
with the stronger exclusive lock and thus might have false positives.
There is a minor non-observable change: we modify the exit lock set of a
function, but since that isn't used further it doesn't change anything.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D106713
(cherry picked from commit 9b889f8)1 parent 80f974e commit d0f0b5b
File tree
2 files changed
+59
-14
lines changed- clang
- lib/Analysis
- test/SemaCXX
2 files changed
+59
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
1053 | | - | |
| 1053 | + | |
1054 | 1054 | | |
1055 | 1055 | | |
1056 | 1056 | | |
| |||
2188 | 2188 | | |
2189 | 2189 | | |
2190 | 2190 | | |
2191 | | - | |
2192 | | - | |
| 2191 | + | |
| 2192 | + | |
2193 | 2193 | | |
2194 | | - | |
2195 | | - | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
2196 | 2198 | | |
2197 | 2199 | | |
2198 | 2200 | | |
2199 | 2201 | | |
2200 | | - | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
2205 | | - | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
2206 | 2206 | | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
2207 | 2210 | | |
2208 | 2211 | | |
2209 | | - | |
| 2212 | + | |
2210 | 2213 | | |
2211 | 2214 | | |
2212 | 2215 | | |
| |||
2237 | 2240 | | |
2238 | 2241 | | |
2239 | 2242 | | |
2240 | | - | |
2241 | | - | |
| 2243 | + | |
| 2244 | + | |
2242 | 2245 | | |
2243 | 2246 | | |
2244 | 2247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2789 | 2789 | | |
2790 | 2790 | | |
2791 | 2791 | | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
2792 | 2811 | | |
2793 | 2812 | | |
2794 | 2813 | | |
| |||
2812 | 2831 | | |
2813 | 2832 | | |
2814 | 2833 | | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
2815 | 2857 | | |
2816 | 2858 | | |
2817 | 2859 | | |
| |||
0 commit comments