Home | History | Annotate | Download | only in Sema

Lines Matching refs:Scope

34 #include "clang/Sema/Scope.h"
105 void visitScopeChain(Scope *S, Scope *InnermostFileScope) {
115 // A using-directive shall not appear in class scope, but may
116 // appear in namespace scope or in block scope.
176 // The using-directive is transitive: if a scope contains a
344 /// will have the same context if they were found within the same scope.
443 // C++ [basic.scope.declarative]p4:
449 // C++ [basic.scope.hiding]p2:
452 // scope.
508 // Redeclarations of types via typedef can occur both within a scope
576 // C++ [basic.scope.hiding]p2:
579 // scope. If a class or enumeration name and an object, function,
580 // or enumerator are declared in the same scope (in any order)
660 // now, injecting it into translation unit scope, and return it.
925 static bool isNamespaceOrTranslationUnitScope(Scope *S) {
931 // Find the next outer declaration context from this scope. This
933 // differ from the lexical context (encoded directly in the Scope
937 // it leaves the current template parameter scope.
938 static std::pair<DeclContext *, bool> findOuterContext(Scope *S) {
941 for (Scope *OuterS = S->getParent(); OuterS;
975 // Find the outermost template parameter scope.
976 // For the example, this is the scope for the template parameters of
978 Scope *OutermostTemplateScope = S->getParent();
983 // Find the namespace context in which the original scope occurs. In
990 // parameter scope. This is the context in which the template is
992 // example, this is the global scope.
1001 /// An RAII object to specify that we want to find block scope extern
1020 bool Sema::CppLookupName(LookupResult &R, Scope *S) {
1027 // go through the scope stack to implicitly declare
1029 for (Scope *PreS = S; PreS; PreS = PreS->getParent())
1035 // fact we are in a scope where it matters.
1037 Scope *Initial = S;
1042 // First we lookup local scope.
1056 // ++i; // finds local 'i', A::i appears at global scope
1065 // When performing a scope lookup, we want to find local extern decls.
1071 // Check whether the IdResolver has anything in this scope.
1077 // out-of-scope.
1081 // If we found something outside of our starting scope that
1108 // innermost enclosing non-class scope.
1114 // We've just searched the last template parameter scope and
1139 // function/method are present within the Scope.
1175 // Find the innermost file scope, so we can add using directives
1177 Scope *InnermostFileScope = S;
1212 // If we are looking for members, no need to look into global/namespace scope.
1219 // FIXME: Cache this sorted list in Scope structure, and DeclContext, so we
1227 // extern declarations outside of a function scope.
1231 // Lookup namespace scope, and global scope.
1236 // Check whether the IdResolver has anything in this scope.
1240 // We found something. Look for anything else in our scope
1257 // We've just searched the last template parameter scope and
1281 // template parameter scope for an out-of-line definition, also
1495 // If this declaration is not at namespace scope nor module-private,
1568 // visible in the same scope as D. This needs to be done much more
1583 /// scope.
1586 /// used to find names within the current scope. For example, 'x' in
1590 /// return x; // unqualified name look finds 'x' in the global scope
1595 /// particular scope can have both a struct and a function of the same
1600 /// @param S The scope from which unqualified name lookup will
1610 bool Sema::LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation) {
1620 // Find the nearest non-transparent declaration scope.
1621 while (!(S->getFlags() & Scope::DeclScope) ||
1626 // When performing a scope lookup, we want to find local extern decls.
1629 // Scan up the scope chain looking for a decl that matches this
1641 // out-of-scope.
1645 // If we found something outside of our starting scope that
1659 // and in the same scope.
1661 // Find the scope in which this declaration was declared (if it
1662 // actually exists in a Scope).
1666 // If the scope containing the declaration is the translation unit,
1680 // Match based on scope.
1709 // now, injecting it into translation unit scope, and return it.
1877 /// particular scope can have both a struct and a function of the same
2091 /// "__super::" scope specifier.
2094 /// that need to perform a qualified name lookup with an optional C++ scope
2102 /// \param SS An optional C++ scope-specifier.
2116 /// source code, and may contain a C++ scope specifier.
2119 /// contexts that receive a name and an optional C++ scope specifier
2123 /// perform a special type of lookup for "__super::" scope specifier.
2125 /// @param S The scope from which unqualified name lookup will
2128 /// @param SS An optional C++ scope-specifier, e.g., "::N::M".
2131 /// context of the scope-specifier SS (if present).
2134 bool Sema::LookupParsedName(LookupResult &R, Scope *S, CXXScopeSpec *SS,
2137 // When the scope specifier is invalid, don't even look for
2148 // We have resolved the scope specifier to a particular declaration
2157 // We could not resolve the scope specified to a specific declaration
2165 // Perform unqualified name lookup starting in the given scope.
2685 NamedDecl *Sema::LookupSingleName(Scope *S, DeclarationName Name,
2703 void Sema::LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S,
3022 Sema::LookupLiteralOperator(Scope *S, LookupResult &R,
3193 // -- Any namespace-scope friend functions declared in
3254 /// this name within a particular scope.
3277 /// current scope.
3332 // Functions and function templates in the same scope overload
3507 static void LookupVisibleDecls(Scope *S, LookupResult &Result,
3519 // Walk through the declarations in this Scope.
3532 // Look into this scope's declaration context, along with any of its
3534 // where we hit the context stored in the next outer scope.
3553 // outer scope.
3564 // Look into the translation unit scope. We walk through the translation
3565 // unit's declaration context, because the Scope itself won't have all of
3567 // FIXME: We would like the translation unit's Scope object to point to the
3587 // Lookup names in the parent scope.
3592 void Sema::LookupVisibleDecls(Scope *S, LookupNameKind Kind,
3597 Scope *Initial = S;
3600 // Find the first namespace or translation-unit scope.
3643 Scope *S = CurScope;
3657 Scope *S = CurScope->getFnParent();
3677 Scope *S, CXXScopeSpec *SS,
4184 Scope *S, CXXScopeSpec *SS,
4236 Scope *S, CorrectionCandidateCallback &CCC,
4386 Scope *S, CXXScopeSpec *SS,
4407 // If the scope specifier itself was invalid, don't try to correct
4533 /// \param S the scope in which name lookup occurs.
4557 Scope *S, CXXScopeSpec *SS,
4619 // wasn't actually in scope.
4638 // wasn't actually in scope.
4662 /// \param S the scope in which name lookup occurs.
4693 Scope *S, CXXScopeSpec *SS,