Lines Matching defs: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 &SS, Validator, LookupCtx, EnteringContext)) {
501 SS.clear();
504 << SS.getRange());
567 SS.Extend(Context, Namespace, IdentifierLoc, CCLoc);
572 SS.Extend(Context, Alias, IdentifierLoc, CCLoc);
614 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
633 // resolve Identifier, then extend the SS with Identifier. This will have
652 SS.Extend(Context, &Identifier, IdentifierLoc, CCLoc);
660 else if (SS.isSet()) {
662 << &Identifier << LookupCtx << SS.getRange();
667 if (SS.isSet())
668 Diag(IdentifierLoc, DiagID) << &Identifier << SS.getRange();
681 CXXScopeSpec &SS) {
682 if (SS.isInvalid())
687 EnteringContext, SS,
691 bool Sema::ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS,
694 if (SS.isInvalid() || DS.getTypeSpecType() == DeclSpec::TST_error)
709 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
720 bool Sema::IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS,
726 if (SS.isInvalid())
731 EnteringContext, SS,
736 CXXScopeSpec &SS,
745 if (SS.isInvalid())
755 assert(DTN->getQualifier() == SS.getScopeRep());
766 SpecTL.setQualifierLoc(SS.getWithLocInContext(Context));
774 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
783 if (SS.getRange().isValid())
784 R.setBegin(SS.getRange().getBegin());
819 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
832 void *Sema::SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS) {
833 if (SS.isEmpty() || SS.isInvalid())
837 SS.location_size()),
841 Annotation->NNS = SS.getScopeRep();
842 memcpy(Annotation + 1, SS.location_data(), SS.location_size());
848 CXXScopeSpec &SS) {
850 SS.SetInvalid(AnnotationRange);
856 SS.Adopt(NestedNameSpecifierLoc(Annotation->NNS, Annotation + 1));
859 bool Sema::ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
860 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
862 NestedNameSpecifier *Qualifier = SS.getScopeRep();
901 /// The 'SS' should be a non-empty valid CXXScopeSpec.
902 bool Sema::ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS) {
903 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
905 if (SS.isInvalid()) return true;
907 DeclContext *DC = computeDeclContext(SS, true);
912 if (!DC->isDependentContext() && RequireCompleteDeclContext(SS, DC))
919 RebuildNestedNameSpecifierInCurrentInstantiation(SS);
925 /// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
929 void Sema::ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
930 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
931 if (SS.isInvalid())
933 assert(!SS.isInvalid() && computeDeclContext(SS, true) &&