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();
159 bool Sema::isDependentScopeSpecifier(const CXXScopeSpec &SS) {
160 if (!SS.isSet() || SS.isInvalid())
163 return SS.getScopeRep()->isDependent();
182 /// \brief Require that the context specified by SS be complete.
184 /// If SS refers to a type, this routine checks whether the type is
191 bool Sema::RequireCompleteDeclContext(CXXScopeSpec &SS,
208 SourceLocation loc = SS.getLastQualifierNameLoc();
209 if (loc.isInvalid()) loc = SS.getRange().getBegin();
213 SS.getRange())) {
214 SS.SetInvalid(SS.getRange());
234 SS.SetInvalid(SS.getRange());
242 << type << SS.getRange();
243 SS.SetInvalid(SS.getRange());
248 CXXScopeSpec &SS) {
249 SS.MakeGlobal(Context, CCLoc);
255 CXXScopeSpec &SS) {
280 SS.MakeSuper(Context, RD, SuperLoc, ColonColonLoc);
358 bool Sema::isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS,
371 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
374 } else if (SS.isSet()) {
377 LookupCtx = computeDeclContext(SS, false);
378 isDependent = isDependentScopeSpecifier(SS);
379 Found.setContextRange(SS.getRange());
390 RequireCompleteDeclContext(SS, LookupCtx))
434 /// \param SS Optional nested name specifier preceding the identifier.
454 /// dependent context, for example. Nor will it extend \p SS with the scope
462 CXXScopeSpec &SS,
477 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
480 } else if (SS.isSet()) {
483 LookupCtx = computeDeclContext(SS, EnteringContext);
484 isDependent = isDependentScopeSpecifier(SS);
485 Found.setContextRange(SS.getRange());
497 RequireCompleteDeclContext(SS, LookupCtx))
552 SS.Extend(Context, &Identifier, IdentifierLoc, CCLoc);
593 Found.getLookupNameInfo(), Found.getLookupKind(), S, &SS,
601 SS.clear();
604 << SS.getRange());
681 SS.Extend(Context, Namespace, IdentifierLoc, CCLoc);
686 SS.Extend(Context, Alias, IdentifierLoc, CCLoc);
729 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
748 // resolve Identifier, then extend the SS with Identifier. This will have
771 SS.Extend(Context, &Identifier, IdentifierLoc, CCLoc);
787 } else if (SS.isSet())
789 << SS.getRange();
802 CXXScopeSpec &SS,
805 if (SS.isInvalid())
810 EnteringContext, SS,
815 bool Sema::ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS,
818 if (SS.isInvalid() || DS.getTypeSpecType() == DeclSpec::TST_error)
833 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
844 bool Sema::IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS,
850 if (SS.isInvalid())
855 EnteringContext, SS,
860 CXXScopeSpec &SS,
869 if (SS.isInvalid())
880 assert(DTN->getQualifier() == SS.getScopeRep());
891 SpecTL.setQualifierLoc(SS.getWithLocInContext(Context));
899 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
908 if (SS.getRange().isValid())
909 R.setBegin(SS.getRange().getBegin());
944 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
957 void *Sema::SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS) {
958 if (SS.isEmpty() || SS.isInvalid())
962 SS.location_size()),
966 Annotation->NNS = SS.getScopeRep();
967 memcpy(Annotation + 1, SS.location_data(), SS.location_size());
973 CXXScopeSpec &SS) {
975 SS.SetInvalid(AnnotationRange);
981 SS.Adopt(NestedNameSpecifierLoc(Annotation->NNS, Annotation + 1));
984 bool Sema::ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
985 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
987 NestedNameSpecifier *Qualifier = SS.getScopeRep();
1027 /// The 'SS' should be a non-empty valid CXXScopeSpec.
1028 bool Sema::ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS) {
1029 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1031 if (SS.isInvalid()) return true;
1033 DeclContext *DC = computeDeclContext(SS, true);
1038 if (!DC->isDependentContext() && RequireCompleteDeclContext(SS, DC))
1045 RebuildNestedNameSpecifierInCurrentInstantiation(SS);
1051 /// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
1055 void Sema::ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
1056 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1057 if (SS.isInvalid())
1059 assert(!SS.isInvalid() && computeDeclContext(SS, true) &&