/external/llvm-project/clang/lib/Sema/ |
D | SemaTemplateDeduction.cpp | 197 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl())) in getDeducedParameterFromExpr() local 198 if (NTTP->getDepth() == Depth) in getDeducedParameterFromExpr() 199 return NTTP; in getDeducedParameterFromExpr() 388 const NonTypeTemplateParmDecl *NTTP, const DeducedTemplateArgument &NewDeduced, in DeduceNonTypeTemplateArgument() argument 391 assert(NTTP->getDepth() == Info.getDeducedDepth() && in DeduceNonTypeTemplateArgument() 395 S.Context, Deduced[NTTP->getIndex()], NewDeduced); in DeduceNonTypeTemplateArgument() 397 Info.Param = const_cast<NonTypeTemplateParmDecl*>(NTTP); in DeduceNonTypeTemplateArgument() 398 Info.FirstArg = Deduced[NTTP->getIndex()]; in DeduceNonTypeTemplateArgument() 403 Deduced[NTTP->getIndex()] = Result; in DeduceNonTypeTemplateArgument() 407 if (NTTP->isExpandedParameterPack()) in DeduceNonTypeTemplateArgument() [all …]
|
D | SemaTemplate.cpp | 1230 bool Sema::AttachTypeConstraint(AutoTypeLoc TL, NonTypeTemplateParmDecl *NTTP, in AttachTypeConstraint() argument 1232 if (NTTP->getType() != TL.getType() || in AttachTypeConstraint() 1234 Diag(NTTP->getTypeSourceInfo()->getTypeLoc().getBeginLoc(), in AttachTypeConstraint() 1236 << NTTP->getTypeSourceInfo()->getTypeLoc().getSourceRange(); in AttachTypeConstraint() 1241 DeclRefExpr *Ref = BuildDeclRefExpr(NTTP, NTTP->getType(), VK_RValue, in AttachTypeConstraint() 1242 NTTP->getLocation()); in AttachTypeConstraint() 1249 BuildDecltypeType(Ref, NTTP->getLocation()), NTTP->getLocation(), in AttachTypeConstraint() 1258 NTTP->setPlaceholderTypeConstraint(ImmediatelyDeclaredConstraint.get()); in AttachTypeConstraint() 2596 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) { in DiagnoseUnexpandedParameterPacks() local 2597 if (!NTTP->isParameterPack() && in DiagnoseUnexpandedParameterPacks() [all …]
|
D | SemaTemplateInstantiate.cpp | 1432 NonTypeTemplateParmDecl *NTTP) { in TransformTemplateParmRefExpr() argument 1437 if (!TemplateArgs.hasTemplateArgument(NTTP->getDepth(), in TransformTemplateParmRefExpr() 1438 NTTP->getPosition())) in TransformTemplateParmRefExpr() 1441 TemplateArgument Arg = TemplateArgs(NTTP->getDepth(), NTTP->getPosition()); in TransformTemplateParmRefExpr() 1458 if (NTTP->isParameterPack()) { in TransformTemplateParmRefExpr() 1466 QualType TargetType = SemaRef.SubstType(NTTP->getType(), TemplateArgs, in TransformTemplateParmRefExpr() 1468 NTTP->getDeclName()); in TransformTemplateParmRefExpr() 1477 ExprType, TargetType->isReferenceType() ? VK_LValue : VK_RValue, NTTP, in TransformTemplateParmRefExpr() 1484 return transformNonTypeTemplateParmRef(NTTP, E->getLocation(), Arg); in TransformTemplateParmRefExpr() 1710 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(D)) { in TransformDeclRefExpr() local [all …]
|
/external/llvm-project/clang/include/clang/AST/ |
D | IgnoreExpr.h | 68 if (auto *NTTP = dyn_cast<SubstNonTypeTemplateParmExpr>(E)) in IgnoreImplicitCastsExtraSingleStep() local 69 return NTTP->getReplacement(); in IgnoreImplicitCastsExtraSingleStep() 84 if (auto *NTTP = dyn_cast<SubstNonTypeTemplateParmExpr>(E)) in IgnoreCastsSingleStep() local 85 return NTTP->getReplacement(); in IgnoreCastsSingleStep()
|
/external/clang/lib/AST/ |
D | DeclTemplate.cpp | 43 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) in TemplateParameterList() local 44 if (NTTP->getType()->containsUnexpandedParameterPack()) in TemplateParameterList() 70 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) in getMinRequiredArguments() local 71 if (NTTP->isExpandedParameterPack()) { in getMinRequiredArguments() 72 NumRequiredArgs += NTTP->getNumExpansionTypes(); in getMinRequiredArguments() 82 } else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) { in getMinRequiredArguments() local 83 if (NTTP->hasDefaultArgument()) in getMinRequiredArguments() 102 else if (const NonTypeTemplateParmDecl *NTTP in getDepth() local 104 return NTTP->getDepth(); in getDepth() 213 } else if (auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) { in GenerateInjectedTemplateArgs() local [all …]
|
D | DeclPrinter.cpp | 928 } else if (const NonTypeTemplateParmDecl *NTTP = in PrintTemplateParameters() local 931 if (IdentifierInfo *II = NTTP->getIdentifier()) in PrintTemplateParameters() 933 printDeclType(NTTP->getType(), Name, NTTP->isParameterPack()); in PrintTemplateParameters() 938 } else if (NTTP->hasDefaultArgument()) { in PrintTemplateParameters() 940 NTTP->getDefaultArgument()->printPretty(Out, nullptr, Policy, in PrintTemplateParameters()
|
D | Expr.cpp | 1188 while (SubstNonTypeTemplateParmExpr *NTTP in getCalleeDecl() local 1190 CEE = NTTP->getReplacement()->IgnoreParenCasts(); in getCalleeDecl() 2339 if (SubstNonTypeTemplateParmExpr *NTTP in IgnoreParenCasts() local 2341 E = NTTP->getReplacement(); in IgnoreParenCasts() 2360 if (SubstNonTypeTemplateParmExpr *NTTP in IgnoreCasts() local 2362 E = NTTP->getReplacement(); in IgnoreCasts() 2386 } else if (SubstNonTypeTemplateParmExpr *NTTP in IgnoreParenLValueCasts() local 2388 E = NTTP->getReplacement(); in IgnoreParenLValueCasts() 2426 if (SubstNonTypeTemplateParmExpr *NTTP in IgnoreParenImpCasts() local 2428 E = NTTP->getReplacement(); in IgnoreParenImpCasts() [all …]
|
D | StmtProfile.cpp | 1639 if (const NonTypeTemplateParmDecl *NTTP = in VisitDecl() local 1641 ID.AddInteger(NTTP->getDepth()); in VisitDecl() 1642 ID.AddInteger(NTTP->getIndex()); in VisitDecl() 1643 ID.AddBoolean(NTTP->isParameterPack()); in VisitDecl() 1644 VisitType(NTTP->getType()); in VisitDecl()
|
D | ASTContext.cpp | 566 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) { in Profile() local 568 ID.AddBoolean(NTTP->isParameterPack()); in Profile() 569 ID.AddPointer(NTTP->getType().getCanonicalType().getAsOpaquePtr()); in Profile() 570 if (NTTP->isExpandedParameterPack()) { in Profile() 572 ID.AddInteger(NTTP->getNumExpansionTypes()); in Profile() 573 for (unsigned I = 0, N = NTTP->getNumExpansionTypes(); I != N; ++I) { in Profile() 574 QualType T = NTTP->getExpansionType(I); in Profile() 615 else if (NonTypeTemplateParmDecl *NTTP in getCanonicalTemplateTemplateParmDecl() local 617 QualType T = getCanonicalType(NTTP->getType()); in getCanonicalTemplateTemplateParmDecl() 620 if (NTTP->isExpandedParameterPack()) { in getCanonicalTemplateTemplateParmDecl() [all …]
|
D | Decl.cpp | 256 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) { in getLVForTemplateParameterList() local 258 if (!NTTP->isExpandedParameterPack()) { in getLVForTemplateParameterList() 259 if (!NTTP->getType()->isDependentType()) { in getLVForTemplateParameterList() 260 LV.merge(getLVForType(*NTTP->getType(), computation)); in getLVForTemplateParameterList() 266 for (unsigned i = 0, n = NTTP->getNumExpansionTypes(); i != n; ++i) { in getLVForTemplateParameterList() 267 QualType type = NTTP->getExpansionType(i); in getLVForTemplateParameterList()
|
/external/clang/lib/Sema/ |
D | SemaTemplateDeduction.cpp | 290 Sema &S, NonTypeTemplateParmDecl *NTTP, const llvm::APSInt &Value, in DeduceNonTypeTemplateArgument() argument 293 assert(NTTP->getDepth() == 0 && in DeduceNonTypeTemplateArgument() 299 Deduced[NTTP->getIndex()], in DeduceNonTypeTemplateArgument() 302 Info.Param = NTTP; in DeduceNonTypeTemplateArgument() 303 Info.FirstArg = Deduced[NTTP->getIndex()]; in DeduceNonTypeTemplateArgument() 308 Deduced[NTTP->getIndex()] = Result; in DeduceNonTypeTemplateArgument() 318 NonTypeTemplateParmDecl *NTTP, in DeduceNonTypeTemplateArgument() argument 322 assert(NTTP->getDepth() == 0 && in DeduceNonTypeTemplateArgument() 329 Deduced[NTTP->getIndex()], in DeduceNonTypeTemplateArgument() 333 Info.Param = NTTP; in DeduceNonTypeTemplateArgument() [all …]
|
D | SemaTemplateInstantiate.cpp | 611 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(ND)) in getDepthAndIndex() local 612 return std::make_pair(NTTP->getDepth(), NTTP->getIndex()); in getDepthAndIndex() 1072 NonTypeTemplateParmDecl *NTTP) { in TransformTemplateParmRefExpr() argument 1077 if (!TemplateArgs.hasTemplateArgument(NTTP->getDepth(), in TransformTemplateParmRefExpr() 1078 NTTP->getPosition())) in TransformTemplateParmRefExpr() 1081 TemplateArgument Arg = TemplateArgs(NTTP->getDepth(), NTTP->getPosition()); in TransformTemplateParmRefExpr() 1082 if (NTTP->isParameterPack()) { in TransformTemplateParmRefExpr() 1090 QualType TargetType = SemaRef.SubstType(NTTP->getType(), TemplateArgs, in TransformTemplateParmRefExpr() 1092 NTTP->getDeclName()); in TransformTemplateParmRefExpr() 1097 NTTP, in TransformTemplateParmRefExpr() [all …]
|
D | SemaTemplate.cpp | 1269 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) { in DiagnoseUnexpandedParameterPacks() local 1270 if (!NTTP->isParameterPack() && in DiagnoseUnexpandedParameterPacks() 1271 S.DiagnoseUnexpandedParameterPack(NTTP->getLocation(), in DiagnoseUnexpandedParameterPacks() 1272 NTTP->getTypeSourceInfo(), in DiagnoseUnexpandedParameterPacks() 1514 else if (NonTypeTemplateParmDecl *NTTP in CheckTemplateParameterList() local 1516 NTTP->removeDefaultArgument(); in CheckTemplateParameterList() 2470 const NonTypeTemplateParmDecl *NTTP = in isTemplateArgumentTemplateParameter() local 2472 return NTTP && NTTP->getDepth() == Depth && NTTP->getIndex() == Index; in isTemplateArgumentTemplateParameter() 3499 if (NonTypeTemplateParmDecl *NTTP =dyn_cast<NonTypeTemplateParmDecl>(Param)) { in CheckTemplateArgument() local 3503 QualType NTTPType = NTTP->getType(); in CheckTemplateArgument() [all …]
|
D | SemaTemplateVariadic.cpp | 531 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(ND)) in getDepthAndIndex() local 532 return std::make_pair(NTTP->getDepth(), NTTP->getIndex()); in getDepthAndIndex()
|
/external/llvm-project/clang/lib/AST/ |
D | DeclTemplate.cpp | 62 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) { in TemplateParameterList() local 63 if (!IsPack && NTTP->getType()->containsUnexpandedParameterPack()) in TemplateParameterList() 65 if (NTTP->hasPlaceholderTypeConstraint()) in TemplateParameterList() 105 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) { in getMinRequiredArguments() local 106 if (NTTP->isExpandedParameterPack()) { in getMinRequiredArguments() 107 NumRequiredArgs += NTTP->getNumExpansionTypes(); in getMinRequiredArguments() 129 } else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(P)) { in getMinRequiredArguments() local 130 if (NTTP->hasDefaultArgument()) in getMinRequiredArguments() 148 else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(FirstParm)) in getDepth() local 149 return NTTP->getDepth(); in getDepth() [all …]
|
D | DeclPrinter.cpp | 109 void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *NTTP); 1062 } else if (auto NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) { in printTemplateParameters() local 1063 VisitNonTypeTemplateParmDecl(NTTP); in printTemplateParameters() 1722 const NonTypeTemplateParmDecl *NTTP) { in VisitNonTypeTemplateParmDecl() argument 1724 if (IdentifierInfo *II = NTTP->getIdentifier()) in VisitNonTypeTemplateParmDecl() 1726 printDeclType(NTTP->getType(), Name, NTTP->isParameterPack()); in VisitNonTypeTemplateParmDecl() 1728 if (NTTP->hasDefaultArgument()) { in VisitNonTypeTemplateParmDecl() 1730 NTTP->getDefaultArgument()->printPretty(Out, nullptr, Policy, Indentation); in VisitNonTypeTemplateParmDecl()
|
D | ASTContext.cpp | 686 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) { in Profile() local 688 ID.AddBoolean(NTTP->isParameterPack()); in Profile() 689 ID.AddPointer(NTTP->getType().getCanonicalType().getAsOpaquePtr()); in Profile() 690 if (NTTP->isExpandedParameterPack()) { in Profile() 692 ID.AddInteger(NTTP->getNumExpansionTypes()); in Profile() 693 for (unsigned I = 0, N = NTTP->getNumExpansionTypes(); I != N; ++I) { in Profile() 694 QualType T = NTTP->getExpansionType(I); in Profile() 809 } else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) { in getCanonicalTemplateTemplateParmDecl() local 810 QualType T = getCanonicalType(NTTP->getType()); in getCanonicalTemplateTemplateParmDecl() 813 if (NTTP->isExpandedParameterPack()) { in getCanonicalTemplateTemplateParmDecl() [all …]
|
D | StmtProfile.cpp | 93 if (const NonTypeTemplateParmDecl *NTTP = in VisitDecl() local 95 ID.AddInteger(NTTP->getDepth()); in VisitDecl() 96 ID.AddInteger(NTTP->getIndex()); in VisitDecl() 97 ID.AddBoolean(NTTP->isParameterPack()); in VisitDecl() 98 VisitType(NTTP->getType()); in VisitDecl()
|
D | TypePrinter.cpp | 1906 if (auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(DRE->getDecl())) in isSubstitutedTemplateArgument() local 1907 return NTTP->getDepth() == Depth && Args.size() > NTTP->getIndex() && in isSubstitutedTemplateArgument() 1908 Args[NTTP->getIndex()].structurallyEquals(Arg); in isSubstitutedTemplateArgument()
|
/external/llvm-project/clang-tools-extra/clangd/ |
D | Hover.cpp | 139 std::string printType(const NonTypeTemplateParmDecl *NTTP, in printType() argument 141 std::string Res = printType(NTTP->getType(), PP); in printType() 142 if (NTTP->isParameterPack()) in printType() 158 else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) in printType() local 159 OS << printType(NTTP, PP); in printType() 185 } else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) { in fetchTemplateParameters() local 186 P.Type = printType(NTTP, PP); in fetchTemplateParameters() 188 if (IdentifierInfo *II = NTTP->getIdentifier()) in fetchTemplateParameters() 191 if (NTTP->hasDefaultArgument()) { in fetchTemplateParameters() 194 NTTP->getDefaultArgument()->printPretty(Out, nullptr, PP); in fetchTemplateParameters()
|
/external/llvm-project/clang/include/clang/Sema/ |
D | SemaInternal.h | 69 if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(ND)) in getDepthAndIndex() local 70 return std::make_pair(NTTP->getDepth(), NTTP->getIndex()); in getDepthAndIndex()
|
/external/llvm-project/clang/test/SemaCXX/ |
D | cxx17-compat.cpp | 125 namespace NTTP { namespace
|
/external/clang/lib/Index/ |
D | USRGeneration.cpp | 772 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) { in VisitTemplateParameterList() local 773 if (NTTP->isParameterPack()) in VisitTemplateParameterList() 776 VisitType(NTTP->getType()); in VisitTemplateParameterList()
|
/external/llvm-project/clang/lib/Index/ |
D | IndexDecl.cpp | 690 } else if (const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(TP)) { in VisitTemplateDecl() local 691 if (NTTP->hasDefaultArgument()) in VisitTemplateDecl() 692 IndexCtx.indexBody(NTTP->getDefaultArgument(), Parent); in VisitTemplateDecl()
|
D | USRGeneration.cpp | 917 if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) { in VisitTemplateParameterList() local 918 if (NTTP->isParameterPack()) in VisitTemplateParameterList() 921 VisitType(NTTP->getType()); in VisitTemplateParameterList()
|