Home | History | Annotate | Download | only in Sema

Lines Matching refs:SS

66 /// \param SS the C++ scope specifier as it appears in the source
73 /// \returns the declaration context represented by the scope specifier @p SS,
76 DeclContext *Sema::computeDeclContext(const CXXScopeSpec &SS,
78 if (!SS.isSet() || SS.isInvalid())
81 NestedNameSpecifier *NNS = SS.getScopeRep();
156 bool Sema::isDependentScopeSpecifier(const CXXScopeSpec &SS) {
157 if (!SS.isSet() || SS.isInvalid())
160 return SS.getScopeRep()->isDependent();
179 /// \brief Require that the context specified by SS be complete.
181 /// If SS refers to a type, this routine checks whether the type is
188 bool Sema::RequireCompleteDeclContext(CXXScopeSpec &SS,
205 SourceLocation loc = SS.getLastQualifierNameLoc();
206 if (loc.isInvalid()) loc = SS.getRange().getBegin();
210 SS.getRange())) {
211 SS.SetInvalid(SS.getRange());
230 SS.SetInvalid(SS.getRange());
238 << type << SS.getRange();
239 SS.SetInvalid(SS.getRange());
244 CXXScopeSpec &SS) {
245 SS.MakeGlobal(Context, CCLoc);
308 bool Sema::isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS,
321 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
324 } else if (SS.isSet()) {
327 LookupCtx = computeDeclContext(SS, false);
328 isDependent = isDependentScopeSpecifier(SS);
329 Found.setContextRange(SS.getRange());
340 RequireCompleteDeclContext(SS, LookupCtx))
388 /// dependent context, for example. Nor will it extend \p SS with the scope
396 CXXScopeSpec &SS,
408 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
411 } else if (SS.isSet()) {
414 LookupCtx = computeDeclContext(SS, EnteringContext);
415 isDependent = isDependentScopeSpecifier(SS);
416 Found.setContextRange(SS.getRange());
429 RequireCompleteDeclContext(SS, LookupCtx))
481 SS.Extend(Context, &Identifier, IdentifierLoc, CCLoc);
495 Found.getLookupKind(), S, &SS, Validator,
504 << SS.getRange()
573 SS.Extend(Context, Namespace, IdentifierLoc, CCLoc);
578 SS.Extend(Context, Alias, IdentifierLoc, CCLoc);
620 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
639 // resolve Identifier, then extend the SS with Identifier. This will have
658 SS.Extend(Context, &Identifier, IdentifierLoc, CCLoc);
666 else if (SS.isSet()) {
668 << &Identifier << LookupCtx << SS.getRange();
673 if (SS.isSet())
674 Diag(IdentifierLoc, DiagID) << &Identifier << SS.getRange();
687 CXXScopeSpec &SS) {
688 if (SS.isInvalid())
693 EnteringContext, SS,
697 bool Sema::ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS,
700 if (SS.isInvalid() || DS.getTypeSpecType() == DeclSpec::TST_error)
715 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
726 bool Sema::IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS,
732 if (SS.isInvalid())
737 EnteringContext, SS,
742 CXXScopeSpec &SS,
751 if (SS.isInvalid())
761 assert(DTN->getQualifier() == SS.getScopeRep());
772 SpecTL.setQualifierLoc(SS.getWithLocInContext(Context));
780 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
789 if (SS.getRange().isValid())
790 R.setBegin(SS.getRange().getBegin());
825 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
838 void *Sema::SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS) {
839 if (SS.isEmpty() || SS.isInvalid())
843 SS.location_size()),
847 Annotation->NNS = SS.getScopeRep();
848 memcpy(Annotation + 1, SS.location_data(), SS.location_size());
854 CXXScopeSpec &SS) {
856 SS.SetInvalid(AnnotationRange);
862 SS.Adopt(NestedNameSpecifierLoc(Annotation->NNS, Annotation + 1));
865 bool Sema::ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
866 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
868 NestedNameSpecifier *Qualifier = SS.getScopeRep();
907 /// The 'SS' should be a non-empty valid CXXScopeSpec.
908 bool Sema::ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS) {
909 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
911 if (SS.isInvalid()) return true;
913 DeclContext *DC = computeDeclContext(SS, true);
918 if (!DC->isDependentContext() && RequireCompleteDeclContext(SS, DC))
925 RebuildNestedNameSpecifierInCurrentInstantiation(SS);
931 /// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
935 void Sema::ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
936 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
937 if (SS.isInvalid())
939 assert(!SS.isInvalid() && computeDeclContext(SS, true) &&