File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2449,11 +2449,17 @@ class sema
2449
2449
}
2450
2450
2451
2451
// All the scope-local names stay active for lookup until the end of their scope
2452
- while (current_declarations.back ()) {
2452
+ while (
2453
+ !current_declarations.empty ()
2454
+ && current_declarations.back () != nullptr
2455
+ )
2456
+ {
2457
+ current_declarations.pop_back ();
2458
+ }
2459
+ if (!current_declarations.empty ()) {
2460
+ assert (current_declarations.back () == nullptr ); // we're popping a lifetime scope
2453
2461
current_declarations.pop_back ();
2454
2462
}
2455
- assert (!current_declarations.back ()); // we're popping a lifetime scope
2456
- current_declarations.pop_back ();
2457
2463
2458
2464
indices_of_uses_per_scope.pop_back ();
2459
2465
indices_of_activations_per_scope.pop_back ();
You can’t perform that action at this time.
0 commit comments