File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -1929,23 +1929,25 @@ class sema
1929
1929
1930
1930
auto end (compound_statement_node const & n, int ) -> void
1931
1931
{
1932
+ symbols.emplace_back (
1933
+ scope_depth,
1934
+ compound_sym{ false , &n, kind_of (n) }
1935
+ );
1936
+ --scope_depth;
1937
+
1932
1938
// Pop an implicit 'else' branch.
1933
1939
if (auto s = std::find_if (
1934
1940
symbols.rbegin (),
1935
1941
symbols.rend (),
1936
1942
[=](symbol s) {
1937
- return s.depth == scope_depth - 1 ;
1943
+ return s.depth == scope_depth;
1938
1944
});
1939
- s == symbols.rend ()
1940
- || std::get_if<symbol::selection>(&s->sym )
1941
- ) {
1945
+ s != symbols.rend ()
1946
+ && std::get_if<symbol::selection>(&s->sym )
1947
+ )
1948
+ {
1942
1949
--scope_depth;
1943
1950
}
1944
- symbols.emplace_back (
1945
- scope_depth,
1946
- compound_sym{ false , &n, kind_of (n) }
1947
- );
1948
- --scope_depth;
1949
1951
}
1950
1952
1951
1953
auto start (assignment_expression_node const & n, int )
You can’t perform that action at this time.
0 commit comments