Commit 5e17dc4
committed
Only traverse closures once
So closures are in a PatternBindingDecl. Since we have an entry-point
into PatternBindingDecl that gets hit for every one of them, we used to
traverse the PBD's that are declared inside of the FunctionDecls twice.
This patch stops us from actually traversing into the PBD from the
checker, and instead pulling out the initializers of interest and
walking each expression separately.1 parent c3e725f commit 5e17dc4
File tree
2 files changed
+35
-10
lines changed- lib/Sema
- test/attr
2 files changed
+35
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3095 | 3095 | | |
3096 | 3096 | | |
3097 | 3097 | | |
| 3098 | + | |
| 3099 | + | |
3098 | 3100 | | |
3099 | | - | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
3103 | | - | |
3104 | | - | |
| 3101 | + | |
| 3102 | + | |
3105 | 3103 | | |
3106 | 3104 | | |
3107 | 3105 | | |
| |||
3116 | 3114 | | |
3117 | 3115 | | |
3118 | 3116 | | |
3119 | | - | |
3120 | | - | |
| 3117 | + | |
3121 | 3118 | | |
3122 | 3119 | | |
3123 | 3120 | | |
| |||
3142 | 3139 | | |
3143 | 3140 | | |
3144 | 3141 | | |
3145 | | - | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
3146 | 3146 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
0 commit comments