• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/clang/lib/Sema/

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();
125 diagnoseMissingImport(SS.getLastQualifierNameLoc(), PartialSpec,
167 bool Sema::isDependentScopeSpecifier(const CXXScopeSpec &SS) {
168 if (!SS.isSet() || SS.isInvalid())
171 return SS.getScopeRep()->isDependent();
190 /// Require that the context specified by SS be complete.
192 /// If SS refers to a type, this routine checks whether the type is
199 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,
395 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
398 } else if (SS.isSet()) {
401 LookupCtx = computeDeclContext(SS, false);
402 isDependent = isDependentScopeSpecifier(SS);
403 Found.setContextRange(SS.getRange());
414 RequireCompleteDeclContext(SS, LookupCtx))
460 /// \param SS Optional nested name specifier preceding the identifier.
481 /// dependent context, for example. Nor will it extend \p SS with the scope
484 bool EnteringContext, CXXScopeSpec &SS,
504 assert(!SS.isSet() && "ObjectType and scope specifier cannot coexist");
507 } else if (SS.isSet()) {
510 LookupCtx = computeDeclContext(SS, EnteringContext);
511 isDependent = isDependentScopeSpecifier(SS);
512 Found.setContextRange(SS.getRange());
524 RequireCompleteDeclContext(SS, LookupCtx))
579 SS.Extend(Context, IdInfo.Identifier, IdInfo.IdentifierLoc, IdInfo.CCLoc);
624 Found.getLookupNameInfo(), Found.getLookupKind(), S, &SS, CCC,
631 SS.clear();
634 << SS.getRange());
640 SS.MakeTrivial(Context, Corrected.getCorrectionSpecifier(),
714 SS.Extend(Context, Namespace, IdInfo.IdentifierLoc, IdInfo.CCLoc);
719 SS.Extend(Context, Alias, IdInfo.IdentifierLoc, IdInfo.CCLoc);
762 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
781 // resolve Identifier, then extend the SS with Identifier. This will have
805 SS.Extend(Context, IdInfo.Identifier, IdInfo.IdentifierLoc,
823 } else if (SS.isSet())
825 << LookupCtx << SS.getRange();
834 bool EnteringContext, CXXScopeSpec &SS,
838 if (SS.isInvalid())
841 return BuildCXXNestedNameSpecifier(S, IdInfo, EnteringContext, SS,
846 bool Sema::ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS,
849 if (SS.isInvalid() || DS.getTypeSpecType() == DeclSpec::TST_error)
867 SS.Extend(Context, SourceLocation(), TLB.getTypeLocInContext(Context, T),
878 bool Sema::IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS,
881 if (SS.isInvalid())
884 return !BuildCXXNestedNameSpecifier(S, IdInfo, EnteringContext, SS,
889 CXXScopeSpec &SS,
898 if (SS.isInvalid())
911 assert(DTN->getQualifier() == SS.getScopeRep());
922 SpecTL.setQualifierLoc(SS.getWithLocInContext(Context));
930 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
945 if (SS.getRange().isValid())
946 R.setBegin(SS.getRange().getBegin());
980 SS.Extend(Context, TemplateKWLoc, Builder.getTypeLocInContext(Context, T),
993 void *Sema::SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS) {
994 if (SS.isEmpty() || SS.isInvalid())
998 (sizeof(NestedNameSpecifierAnnotation) + SS.location_size()),
1002 Annotation->NNS = SS.getScopeRep();
1003 memcpy(Annotation + 1, SS.location_data(), SS.location_size());
1009 CXXScopeSpec &SS) {
1011 SS.SetInvalid(AnnotationRange);
1017 SS.Adopt(NestedNameSpecifierLoc(Annotation->NNS, Annotation + 1));
1020 bool Sema::ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
1021 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1028 NestedNameSpecifier *Qualifier = SS.getScopeRep();
1068 /// The 'SS' should be a non-empty valid CXXScopeSpec.
1069 bool Sema::ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS) {
1070 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1072 if (SS.isInvalid()) return true;
1074 DeclContext *DC = computeDeclContext(SS, true);
1079 if (!DC->isDependentContext() && RequireCompleteDeclContext(SS, DC))
1086 RebuildNestedNameSpecifierInCurrentInstantiation(SS);
1092 /// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
1096 void Sema::ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS) {
1097 assert(SS.isSet() && "Parser passed invalid CXXScopeSpec.");
1098 if (SS.isInvalid())
1100 assert(!SS.isInvalid() && computeDeclContext(SS, true) &&