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();
127 diagnoseMissingImport(SS.getLastQualifierNameLoc(), PartialSpec,
169 bool Sema::isDependentScopeSpecifier(const CXXScopeSpec &SS) {
170 if (!SS.isSet() || SS.isInvalid())
173 return SS.getScopeRep()->isDependent();
192 /// \brief Require that the context specified by SS be complete.
194 /// If SS refers to a type, this routine checks whether the type is
201 bool Sema::RequireCompleteDeclContext(CXXScopeSpec &SS,
220 SourceLocation loc = SS.getLastQualifierNameLoc();
221 if (loc.isInvalid()) loc = SS.getRange().getBegin();
225 SS.getRange())) {
226 SS.SetInvalid(SS.getRange());
259 SS.SetInvalid(SS.getRange());
267 << type << SS.getRange();
268 SS.SetInvalid(SS.getRange());
273 CXXScopeSpec &SS) {
274 SS.MakeGlobal(Context, CCLoc);
280 CXXScopeSpec &SS) {
305 SS.MakeSuper(Context, RD, SuperLoc, ColonColonLoc);
383 bool Sema::isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS,
396 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
399 } else if (SS.isSet()) {
402 LookupCtx = computeDeclContext(SS, false);
403 isDependent = isDependentScopeSpecifier(SS);
404 Found.setContextRange(SS.getRange());
415 RequireCompleteDeclContext(SS, LookupCtx))
459 /// \param SS Optional nested name specifier preceding the identifier.
479 /// dependent context, for example. Nor will it extend \p SS with the scope
487 CXXScopeSpec &SS,
502 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
505 } else if (SS.isSet()) {
508 LookupCtx = computeDeclContext(SS, EnteringContext);
509 isDependent = isDependentScopeSpecifier(SS);
510 Found.setContextRange(SS.getRange());
522 RequireCompleteDeclContext(SS, LookupCtx))
577 SS.Extend(Context, &Identifier, IdentifierLoc, CCLoc);
618 Found.getLookupNameInfo(), Found.getLookupKind(), S, &SS,
626 SS.clear();
629 << SS.getRange());
635 SS.MakeTrivial(Context, Corrected.getCorrectionSpecifier(),
710 SS.Extend(Context, Namespace, IdentifierLoc, CCLoc);
715 SS.Extend(Context, Alias, IdentifierLoc, CCLoc);
758 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
777 // resolve Identifier, then extend the SS with Identifier. This will have
800 SS.Extend(Context, &Identifier, IdentifierLoc, CCLoc);
816 } else if (SS.isSet())
818 << SS.getRange();
831 CXXScopeSpec &SS,
834 if (SS.isInvalid())
839 EnteringContext, SS,
844 bool Sema::ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS,
847 if (SS.isInvalid() || DS.getTypeSpecType() == DeclSpec::TST_error)
862 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
873 bool Sema::IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS,
879 if (SS.isInvalid())
884 EnteringContext, SS,
889 CXXScopeSpec &SS,
898 if (SS.isInvalid())
909 assert(DTN->getQualifier() == SS.getScopeRep());
920 SpecTL.setQualifierLoc(SS.getWithLocInContext(Context));
928 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
937 if (SS.getRange().isValid())
938 R.setBegin(SS.getRange().getBegin());
973 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
986 void *Sema::SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS) {
987 if (SS.isEmpty() || SS.isInvalid())
991 SS.location_size()),
995 Annotation->NNS = SS.getScopeRep();
996 memcpy(Annotation + 1, SS.location_data(), SS.location_size());
1002 CXXScopeSpec &SS) {
1004 SS.SetInvalid(AnnotationRange);
1010 SS.Adopt(NestedNameSpecifierLoc(Annotation->NNS, Annotation + 1));
1013 bool Sema::ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
1014 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1016 NestedNameSpecifier *Qualifier = SS.getScopeRep();
1056 /// The 'SS' should be a non-empty valid CXXScopeSpec.
1057 bool Sema::ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS) {
1058 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1060 if (SS.isInvalid()) return true;
1062 DeclContext *DC = computeDeclContext(SS, true);
1067 if (!DC->isDependentContext() && RequireCompleteDeclContext(SS, DC))
1074 RebuildNestedNameSpecifierInCurrentInstantiation(SS);
1080 /// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
1084 void Sema::ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
1085 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1086 if (SS.isInvalid())
1088 assert(!SS.isInvalid() && computeDeclContext(SS, true) &&