Home | History | Annotate | Download | only in Parse

Lines Matching refs:Scope

24 #include "clang/Sema/Scope.h"
282 // a new scope.
434 Scope::DeclScope | Scope::SEHTryScope));
472 ParseScope ExpectScope(this, Scope::DeclScope | Scope::ControlScope |
473 Scope::SEHExceptScope);
484 Scope::SEHFilterScope);
816 return ParseCompoundStatement(isStmtExpr, Scope::DeclScope);
845 // Enter a scope to hold everything within the compound stmt. Compound
906 /// consume the '}' at the end of the block. It does not manipulate the scope
1105 // A name introduced by a declaration in a condition is in scope from its
1113 ParseScope IfScope(this, Scope::DeclScope | Scope::ControlScope, C99orCXX);
1123 // C99 6.8.4p3 - In C99, the body of the if statement is a scope, even if
1129 // form of the if statement) implicitly defines a local scope.
1131 // For C++ we create a scope for the condition and a new scope for
1133 // -When the 'then' scope exits, we want the condition declaration to still be
1134 // active for the 'else' scope too.
1137 // -If we wanted the condition and substatement to be in the same scope, we
1138 // would have to notify ParseStatement not to create a new scope. It's
1139 // simpler to let it create a new scope.
1141 ParseScope InnerScope(this, Scope::DeclScope, C99orCXX, Tok.is(tok::l_brace));
1149 // Pop the 'if' scope if needed.
1164 // C99 6.8.4p3 - In C99, the body of the if statement is a scope, even if
1171 // form of the if statement) implicitly defines a local scope.
1173 ParseScope InnerScope(this, Scope::DeclScope, C99orCXX, Tok.is(tok::l_brace));
1177 // Pop the 'else' scope if needed.
1226 // not the case for C90. Start the switch scope.
1229 // A name introduced by a declaration in a condition is in scope from its
1237 unsigned ScopeFlags = Scope::SwitchScope;
1239 ScopeFlags |= Scope::DeclScope | Scope::ControlScope;
1264 // C99 6.8.4p3 - In C99, the body of the switch statement is a scope, even if
1270 // form of the if statement) implicitly defines a local scope.
1272 // See comments in ParseIfStatement for why we create a scope for the
1273 // condition and a new scope for substatement in C++.
1275 getCurScope()->AddFlags(Scope::BreakScope);
1276 ParseScope InnerScope(this, Scope::DeclScope, C99orCXX, Tok.is(tok::l_brace));
1311 // the case for C90. Start the loop scope.
1314 // A name introduced by a declaration in a condition is in scope from its
1324 ScopeFlags = Scope::BreakScope | Scope::ContinueScope |
1325 Scope::DeclScope | Scope::ControlScope;
1327 ScopeFlags = Scope::BreakScope | Scope::ContinueScope;
1338 // C99 6.8.5p5 - In C99, the body of the while statement is a scope, even if
1343 // The substatement in an iteration-statement implicitly defines a local scope
1346 // See comments in ParseIfStatement for why we create a scope for the
1347 // condition and a new scope for substatement in C++.
1349 ParseScope InnerScope(this, Scope::DeclScope, C99orCXX, Tok.is(tok::l_brace));
1354 // Pop the body scope if needed.
1373 // the case for C90. Start the loop scope.
1376 ScopeFlags = Scope::BreakScope | Scope::ContinueScope | Scope::DeclScope;
1378 ScopeFlags = Scope::BreakScope | Scope::ContinueScope;
1382 // C99 6.8.5p5 - In C99, the body of the do statement is a scope, even if
1387 // The substatement in an iteration-statement implicitly defines a local scope
1391 ParseScope InnerScope(this, Scope::DeclScope, C99orCXX, Tok.is(tok::l_brace));
1396 // Pop the body scope if needed.
1492 // the case for C90. Start the loop scope.
1495 // A name introduced by a declaration in a condition is in scope from its
1508 ScopeFlags = Scope::DeclScope | Scope::ControlScope;
1643 getCurScope()->AddFlags(Scope::BreakScope | Scope::ContinueScope);
1722 // C99 6.8.5p5 - In C99, the body of the for statement is a scope, even if
1727 // The substatement in an iteration-statement implicitly defines a local scope
1730 // See comments in ParseIfStatement for why we create a scope for
1731 // for-init-statement/condition and a new scope for substatement in C++.
1733 ParseScope InnerScope(this, Scope::DeclScope, C99orCXXorObjC,
1746 // Pop the body scope if needed.
1749 // Leave the for-scope.
1911 // Do not enter a scope for the brace, as the arguments are in the same scope
2025 Scope::DeclScope | Scope::TryScope |
2026 (FnTry ? Scope::FnTryCatchScope : 0)));
2098 ParseScope CatchScope(this, Scope::DeclScope | Scope::ControlScope |
2099 (FnCatch ? Scope::FnTryCatchScope : 0));