Home | History | Annotate | Download | only in Sema

Lines Matching defs:Pattern

947   TypeAliasDecl *Pattern = D->getTemplatedDecl();
950 if (getPreviousDeclForInstantiation<TypedefNameDecl>(Pattern)) {
951 DeclContext::lookup_result Found = Owner->lookup(Pattern->getDeclName());
958 InstantiateTypedefNameDecl(Pattern, /*IsTypeAlias=*/true));
1234 // parameters into the pattern type and checking the result.
1380 EnumDecl *Enum, EnumDecl *Pattern) {
1384 Enum->setLocation(Pattern->getLocation());
1389 for (auto *EC : Pattern->enumerators()) {
1426 if (Pattern->getDeclContext()->isFunctionOrMethod() &&
1459 CXXRecordDecl *Pattern = D->getTemplatedDecl();
1464 NestedNameSpecifierLoc QualifierLoc = Pattern->getQualifierLoc();
1475 if (!isFriend && getPreviousDeclForInstantiation(Pattern)) {
1476 DeclContext::lookup_result Found = Owner->lookup(Pattern->getDeclName());
1496 DC = SemaRef.FindInstantiatedContext(Pattern->getLocation(),
1497 Pattern->getDeclContext(),
1503 LookupResult R(SemaRef, Pattern->getDeclName(), Pattern->getLocation(),
1515 SemaRef.Diag(Pattern->getLocation(), diag::err_not_tag_in_scope)
1516 << D->getTemplatedDecl()->getTagKind() << Pattern->getDeclName() << DC
1539 SemaRef.Context, Pattern->getTagKind(), DC, Pattern->getBeginLoc(),
1540 Pattern->getLocation(), Pattern->getIdentifier(), PrevDecl,
1546 SemaRef.InstantiateAttrsForDecl(TemplateArgs, Pattern, RecordInst, LateAttrs,
1641 VarDecl *Pattern = D->getTemplatedDecl();
1644 if (getPreviousDeclForInstantiation(Pattern)) {
1645 DeclContext::lookup_result Found = Owner->lookup(Pattern->getDeclName());
1651 cast_or_null<VarDecl>(VisitVarDecl(Pattern,
1745 // Link the instantiation back to the pattern *unless* this is a
2709 TypeLoc Pattern = Expansion.getPatternLoc();
2711 SemaRef.collectUnexpandedParameterPacks(Pattern, Unexpanded);
2721 Pattern.getSourceRange(),
2731 TypeSourceInfo *NewDI = SemaRef.SubstType(Pattern, TemplateArgs,
2754 // pattern and create a new pack expansion type.
2756 TypeSourceInfo *NewPattern = SemaRef.SubstType(Pattern, TemplateArgs,
2908 // into the pattern.
3127 // pattern and create a new pack expansion.
3153 // had arguments for all packs but the pattern also contained other
4248 // in the pattern. They can differ in top-level cv-qualifiers, and we want
4249 // the pattern's type here. If the type is dependent, they can't differ,
4250 // per core issue 1668. Substitute into the type from the pattern, in case
4306 // FIXME: Pass in a correct Pattern argument, otherwise
4343 FunctionDecl *Pattern = FD->getTemplateInstantiationPattern(
4345 if (addInstantiatedParametersToScope(*this, FD, Pattern, Local,
4690 Stmt *Pattern = nullptr;
4692 Pattern = PatternDef->getBody(PatternDef);
4756 if (!Pattern && PatternDecl->isLateTemplateParsed() &&
4766 Pattern = PatternDecl->getBody(PatternDecl);
4770 assert((Pattern || PatternDecl->isDefaulted() ||
4805 // Copy the inner loc start from the pattern.
4830 // of the) lexical context of the pattern?
4862 Body = SubstStmt(Pattern, TemplateArgs);
5062 // If the pattern is an (in-class) explicit specialization, then the result
5196 // Find the pattern and the arguments to substitute into it.
5198 assert(PatternDecl && "no pattern for templated variable");
5539 static bool isInstantiationOf(ClassTemplateDecl *Pattern,
5541 Pattern = Pattern->getCanonicalDecl();
5545 if (Pattern == Instance) return true;
5552 static bool isInstantiationOf(FunctionTemplateDecl *Pattern,
5554 Pattern = Pattern->getCanonicalDecl();
5558 if (Pattern == Instance) return true;
5566 isInstantiationOf(ClassTemplatePartialSpecializationDecl *Pattern,
5568 Pattern
5569 = cast<ClassTemplatePartialSpecializationDecl>(Pattern->getCanonicalDecl());
5573 if (Pattern == Instance)
5581 static bool isInstantiationOf(CXXRecordDecl *Pattern,
5583 Pattern = Pattern->getCanonicalDecl();
5587 if (Pattern == Instance) return true;
5594 static bool isInstantiationOf(FunctionDecl *Pattern,
5596 Pattern = Pattern->getCanonicalDecl();
5600 if (Pattern == Instance) return true;
5607 static bool isInstantiationOf(EnumDecl *Pattern,
5609 Pattern = Pattern->getCanonicalDecl();
5613 if (Pattern == Instance) return true;
5620 static bool isInstantiationOf(UsingShadowDecl *Pattern,
5624 Pattern);
5627 static bool isInstantiationOf(UsingDecl *Pattern, UsingDecl *Instance,
5629 return declaresSameEntity(C.getInstantiatedFromUsingDecl(Instance), Pattern);
5633 static bool isInstantiationOfUnresolvedUsingDecl(T *Pattern, Decl *Other,
5655 return Pattern->isPackExpansion() == OtherIsPackExpansion &&
5656 declaresSameEntity(OtherFrom, Pattern);
5659 static bool isInstantiationOfStaticDataMember(VarDecl *Pattern,
5663 Pattern = Pattern->getCanonicalDecl();
5667 if (Pattern == Instance) return true;
5675 // D is the prospective pattern
6166 void Sema::PerformDependentDiagnostics(const DeclContext *Pattern,
6168 for (auto DD : Pattern->ddiags()) {