Lines Matching refs:SS

64 /// \param SS the C++ scope specifier as it appears in the source
71 /// \returns the declaration context represented by the scope specifier @p SS,
74 DeclContext *Sema::computeDeclContext(const CXXScopeSpec &SS,
76 if (!SS.isSet() || SS.isInvalid())
79 NestedNameSpecifier *NNS = SS.getScopeRep();
112 SS.getTemplateParamLists();
136 diagnoseMissingImport(SS.getLastQualifierNameLoc(), PartialSpec,
186 bool Sema::isDependentScopeSpecifier(const CXXScopeSpec &SS) {
187 if (!SS.isSet() || SS.isInvalid())
190 return SS.getScopeRep()->isDependent();
209 /// Require that the context specified by SS be complete.
211 /// If SS refers to a type, this routine checks whether the type is
218 bool Sema::RequireCompleteDeclContext(CXXScopeSpec &SS,
239 SourceLocation loc = SS.getLastQualifierNameLoc();
240 if (loc.isInvalid()) loc = SS.getRange().getBegin();
244 SS.getRange())) {
245 SS.SetInvalid(SS.getRange());
252 return RequireCompleteEnumDecl(EnumD, loc, &SS);
258 /// instantiated. SS, if provided, is the ScopeRef parsed.
261 CXXScopeSpec *SS) {
285 if (SS)
286 SS->SetInvalid(SS->getRange());
293 if (SS) {
295 << QualType(EnumD->getTypeForDecl(), 0) << SS->getRange();
296 SS->SetInvalid(SS->getRange());
306 CXXScopeSpec &SS) {
307 SS.MakeGlobal(Context, CCLoc);
313 CXXScopeSpec &SS) {
340 SS.MakeSuper(Context, RD, SuperLoc, ColonColonLoc);
450 /// \param SS Optional nested name specifier preceding the identifier.
471 /// dependent context, for example. Nor will it extend \p SS with the scope
474 bool EnteringContext, CXXScopeSpec &SS,
494 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
497 } else if (SS.isSet()) {
500 LookupCtx = computeDeclContext(SS, EnteringContext);
501 isDependent = isDependentScopeSpecifier(SS);
502 Found.setContextRange(SS.getRange());
514 RequireCompleteDeclContext(SS, LookupCtx))
569 SS.Extend(Context, IdInfo.Identifier, IdInfo.IdentifierLoc, IdInfo.CCLoc);
614 Found.getLookupNameInfo(), Found.getLookupKind(), S, &SS, CCC,
621 SS.clear();
624 << SS.getRange());
630 SS.MakeTrivial(Context, Corrected.getCorrectionSpecifier(),
704 SS.Extend(Context, Namespace, IdInfo.IdentifierLoc, IdInfo.CCLoc);
709 SS.Extend(Context, Alias, IdInfo.IdentifierLoc, IdInfo.CCLoc);
756 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
775 // resolve Identifier, then extend the SS with Identifier. This will have
799 SS.Extend(Context, IdInfo.Identifier, IdInfo.IdentifierLoc,
812 DiagnoseUnknownTypeName(IdInfo.Identifier, IdInfo.IdentifierLoc, S, &SS,
821 } else if (SS.isSet())
823 << LookupCtx << SS.getRange();
832 bool EnteringContext, CXXScopeSpec &SS,
835 if (SS.isInvalid())
838 return BuildCXXNestedNameSpecifier(S, IdInfo, EnteringContext, SS,
843 bool Sema::ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS,
846 if (SS.isInvalid() || DS.getTypeSpecType() == DeclSpec::TST_error)
865 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
876 bool Sema::IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS,
879 if (SS.isInvalid())
882 return !BuildCXXNestedNameSpecifier(S, IdInfo, EnteringContext, SS,
887 CXXScopeSpec &SS,
896 if (SS.isInvalid())
909 assert(DTN->getQualifier() == SS.getScopeRep());
919 SpecTL.setQualifierLoc(SS.getWithLocInContext(Context));
927 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
942 if (SS.getRange().isValid())
943 R.setBegin(SS.getRange().getBegin());
977 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
990 void *Sema::SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS) {
991 if (SS.isEmpty() || SS.isInvalid())
995 (sizeof(NestedNameSpecifierAnnotation) + SS.location_size()),
999 Annotation->NNS = SS.getScopeRep();
1000 memcpy(Annotation + 1, SS.location_data(), SS.location_size());
1006 CXXScopeSpec &SS) {
1008 SS.SetInvalid(AnnotationRange);
1014 SS.Adopt(NestedNameSpecifierLoc(Annotation->NNS, Annotation + 1));
1017 bool Sema::ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
1018 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1025 NestedNameSpecifier *Qualifier = SS.getScopeRep();
1065 /// The 'SS' should be a non-empty valid CXXScopeSpec.
1066 bool Sema::ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS) {
1067 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1069 if (SS.isInvalid()) return true;
1071 DeclContext *DC = computeDeclContext(SS, true);
1076 if (!DC->isDependentContext() && RequireCompleteDeclContext(SS, DC))
1083 RebuildNestedNameSpecifierInCurrentInstantiation(SS);
1089 /// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
1093 void Sema::ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
1094 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1095 if (SS.isInvalid())
1097 assert(!SS.isInvalid() && computeDeclContext(SS, true) &&