Home | History | Annotate | Download | only in Sema

Lines Matching defs:Deduced

92                         SmallVectorImpl<DeducedTemplateArgument> &Deduced);
101 Deduced,
111 SmallVectorImpl<DeducedTemplateArgument> &Deduced);
146 /// \brief Verify that the given, deduced template arguments are compatible.
148 /// \returns The deduced template argument, or a NULL template argument if
149 /// the deduced template arguments were incompatible.
162 llvm_unreachable("Non-deduced template arguments handled above");
173 // If we deduced a constant in one case and either a dependent expression or
205 // If we deduced a dependent expression in one case and either an integral
226 // If we deduced a declaration and a dependent expression, keep the
231 // If we deduced a declaration and an integral constant, keep the
236 // If we deduced two declarations, make sure they they refer to the
246 // If we deduced a null pointer and a dependent expression, keep the
251 // If we deduced a null pointer and an integral constant, keep the
256 // If we deduced two null pointers, make sure they have the same type.
295 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
302 Deduced[NTTP->getIndex()],
306 Info.FirstArg = Deduced[NTTP->getIndex()];
311 Deduced[NTTP->getIndex()] = Result;
324 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
332 Deduced[NTTP->getIndex()],
337 Info.FirstArg = Deduced[NTTP->getIndex()];
342 Deduced[NTTP->getIndex()] = Result;
355 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
363 Deduced[NTTP->getIndex()],
367 Info.FirstArg = Deduced[NTTP->getIndex()];
372 Deduced[NTTP->getIndex()] = Result;
382 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
394 Deduced[TempParam->getIndex()],
398 Info.FirstArg = Deduced[TempParam->getIndex()];
403 Deduced[TempParam->getIndex()] = Result;
430 /// \param Deduced the deduced template arguments
441 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
452 Info, Deduced))
462 Info, Deduced);
489 Info, Deduced))
497 Info, Deduced);
569 // deduced because this deduction hadn't happened yet.
584 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
586 : S(S), TemplateParams(TemplateParams), Deduced(Deduced), Info(Info) {
599 // Save the deduced template argument for the parameter pack expanded
602 Pack.Saved = Deduced[Index];
603 Deduced[Index] = TemplateArgument();
620 // the set of deduced arguments.
638 /// Move to deducing the next element in each pack that is being deduced.
640 // Capture the deduced template arguments for each parameter pack expanded
641 // by this pack expansion, add them to the list of arguments we've deduced
642 // for that pack, then clear out the deduced argument.
644 DeducedTemplateArgument &DeducedArg = Deduced[Pack.Index];
660 Deduced[Pack.Index] = Pack.Saved;
667 // (because it only appeared in non-deduced contexts), so just
675 // If we deduced an empty argument pack, create it now.
697 Loc = &Deduced[Pack.Index];
729 SmallVectorImpl<DeducedTemplateArgument> &Deduced;
754 /// \param Deduced the deduced template arguments
772 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
809 Info, Deduced, TDF,
818 // The non-deduced contexts are:
832 Deduced, Info, Pattern);
841 Args[ArgIdx], Info, Deduced,
931 /// \param Deduced the deduced template arguments
947 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
1020 // - If the original P is a reference type, the deduced A (i.e., the type
1042 // deduced as X&. - end note ]
1057 // template non-type argument i can be deduced if P and A have one of
1096 // Remove any qualifiers on the parameter from the deduced type.
1135 Deduced[Index],
1139 Info.FirstArg = Deduced[Index];
1144 Deduced[Index] = Result;
1233 Info, Deduced, TDF);
1243 Info, Deduced, TDF);
1263 Info, Deduced, SubTDF);
1275 ReferenceArg->getPointeeType(), Info, Deduced, 0);
1288 Info, Deduced, 0);
1302 Info, Deduced, SubTDF);
1321 Info, Deduced, SubTDF);
1339 Info, Deduced, SubTDF))
1358 Info, Deduced);
1365 Info, Deduced);
1395 FunctionProtoArg->getReturnType(), Info, Deduced, 0))
1402 FunctionProtoArg->getNumParams(), Info, Deduced, SubTDF);
1427 Info, Deduced);
1432 // derived class of the deduced A. Likewise, if P is a pointer to a
1434 // class pointed to by the deduced A.
1453 SmallVector<DeducedTemplateArgument, 8> DeducedOrig(Deduced.begin(),
1454 Deduced.end());
1470 Deduced);
1478 DeducedOrig.append(Deduced.begin(), Deduced.end());
1484 Deduced = DeducedOrig;
1533 Info, Deduced,
1540 Info, Deduced,
1559 Info, Deduced, 0);
1576 Info, Deduced, TDF);
1589 Info, Deduced, TDF);
1608 Info, Deduced, TDF))
1620 false, Info, Deduced);
1630 Info, Deduced, TDF))
1640 Info, Deduced);
1668 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
1684 Info, Deduced, 0);
1693 Arg.getAsTemplate(), Info, Deduced);
1747 Info, Deduced);
1750 Info, Deduced);
1753 Info, Deduced);
1828 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
1832 // non-deduced context.
1860 Info, Deduced))
1878 // and set any deduced parameter packs to an empty argument pack.
1882 PackDeductionScope PackScope(S, TemplateParams, Deduced, Info, Pattern);
1884 // Keep track of the deduced template arguments for each parameter pack
1894 Info, Deduced))
1915 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
1919 Info, Deduced);
2056 /// \brief Convert the given deduced template argument and add it to the set of
2072 // When converting the deduced template argument, append it to the
2092 // Convert the deduced template argument into a template
2118 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2127 // [...] or if any template argument remains neither deduced nor
2133 if (Deduced[I].isNull()) {
2138 // We have deduced this argument, so it still needs to be
2166 if (ConvertDeducedTemplateArgument(S, Param, Deduced[I],
2177 // Form the template argument list from the deduced template arguments.
2184 // Substitute the deduced template arguments into the template
2249 // specialization can be deduced from the actual template argument
2256 SmallVector<DeducedTemplateArgument, 4> Deduced;
2257 Deduced.resize(Partial->getTemplateParameters()->size());
2262 TemplateArgs, Info, Deduced))
2265 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2275 Deduced, Info);
2288 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2295 // [...] or if any template argument remains neither deduced nor
2301 if (Deduced[I].isNull()) {
2306 // We have deduced this argument, so it still needs to be
2332 if (ConvertDeducedTemplateArgument(S, Param, Deduced[I], Partial, NTTPType,
2342 // Form the template argument list from the deduced template arguments.
2348 // Substitute the deduced template arguments into the template
2415 // specialization can be deduced
2422 SmallVector<DeducedTemplateArgument, 4> Deduced;
2423 Deduced.resize(Partial->getTemplateParameters()->size());
2426 TemplateArgs, Info, Deduced))
2429 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2439 Deduced, Info);
2460 /// \param Deduced the deduced template arguments, which will be populated
2479 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2512 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2544 // If we deduced template arguments for a template parameter pack,
2624 // Trailing template arguments that can be deduced (14.8.2) may be
2626 // template arguments can be deduced, they may all be omitted; in this
2630 // the set of deduced template arguments. Explicitly-specified
2633 Deduced.reserve(TemplateParams->size());
2637 Deduced.push_back(DeducedTemplateArgument());
2639 Deduced.push_back(Arg);
2645 /// \brief Check whether the deduced argument type for a call to a function
2668 // - If the original P is a reference type, the deduced A (i.e., the
2679 // Under Objective-C++ ARC, the deduced type may have implicitly
2697 // deduced argument type's qualifiers as if we had performed the
2704 // type that can be converted to the deduced A via a qualification
2720 // transformed A can be a derived class of the deduced A. [...]
2723 // derived class pointed to by the deduced A.
2748 /// checking the deduced template arguments for completeness and forming
2752 /// which the deduced argument types should be compared.
2755 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2770 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2781 // [...] or if any template argument remains neither deduced nor
2787 if (!Deduced[I].isNull()) {
2792 Builder.push_back(Deduced[I]);
2795 // via additional deduced arguments).
2806 // We have deduced this argument, so it still needs to be
2834 if (ConvertDeducedTemplateArgument(*this, Param, Deduced[I],
2848 // A trailing template parameter pack (14.5.3) not otherwise deduced will
2849 // be deduced to an empty sequence of template arguments.
2911 // Form the template argument list from the deduced template arguments.
2916 // Substitute the deduced template arguments into the function template
2947 // values that will make the deduced A identical to A (after the type A
3049 // non-deduced context.
3078 // treated as a non-deduced context.
3082 // the deduced template argument values are then combined.
3085 Deduced(TemplateParams->size());
3089 ArgType, Info, Deduced, TDF);
3171 // values that will make the deduced A identical to A (after the type A
3175 // - If the original P is a reference type, the deduced A (i.e., the
3181 // type that can be converted to the deduced A via a qualification
3187 // transformed A can be a derived class of the deduced A. Likewise,
3190 // the deduced A.
3207 SmallVectorImpl<DeducedTemplateArgument> &Deduced, unsigned TDF);
3215 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
3224 // P0[N] case, if N is a non-type template parameter, N is deduced from the
3226 // causes the parameter to be considered a non-deduced context
3252 E, Info, Deduced, TDF)))
3271 /*ArrayBound=*/true, Info, Deduced);
3286 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
3294 Deduced, TDF, Result))
3308 ArgType, Info, Deduced, TDF);
3364 SmallVector<DeducedTemplateArgument, 4> Deduced;
3371 Deduced,
3378 NumExplicitlySpecified = Deduced.size();
3386 Deduced.resize(TemplateParams->size());
3419 Info, Deduced, TDF, Result))
3429 // so we can check for compatibility between the deduced A and A.
3436 Info, Deduced, TDF))
3450 // the parameter pack is a non-deduced context.
3455 PackDeductionScope PackScope(*this, TemplateParams, Deduced, Info,
3481 Info, Deduced, TDF, Result)) {
3491 // so we can check for compatibility between the deduced A and A.
3499 Deduced, TDF))
3515 return FinishTemplateArgumentDeduction(FunctionTemplate, Deduced,
3585 SmallVector<DeducedTemplateArgument, 4> Deduced;
3592 Deduced, ParamTypes,
3596 NumExplicitlySpecified = Deduced.size();
3603 Deduced.resize(TemplateParams->size());
3605 // If the function has a deduced return type, substitute it for a dependent
3606 // type so that we treat it as a non-deduced context in what follows.
3621 Info, Deduced, TDF))
3626 = FinishTemplateArgumentDeduction(FunctionTemplate, Deduced,
3631 // If the function has a deduced return type, deduce it now, so we can check
3632 // that the deduced function type matches the requested type.
3696 // Use the deduced arguments of the conversion function, to specialize our
3719 // specialize the static invoker with the deduced arguments of our
3835 SmallVector<DeducedTemplateArgument, 4> Deduced;
3836 Deduced.resize(TemplateParams->size());
3840 // argument values that will make the deduced A identical to
3844 // cv-qualified than the deduced A (i.e., the type referred to
3848 // - The deduced A can be another pointer or pointer to member
3860 P, A, Info, Deduced, TDF))
3868 = FinishTemplateArgumentDeduction(ConversionTemplate, Deduced, 0,
3873 // to a ptr-to-function, use the deduced arguments from the conversion
3897 Specialization, Deduced, DestFunctionPtrReturnType,
3949 // auto type deduced as T" in order for [temp.deduct.call]p3 to apply.
3992 /// \param Init the initializer for the variable whose type is to be deduced.
3994 /// deduced type.
4020 QualType Deduced = BuildDecltypeType(Init, Init->getLocStart(), false);
4021 if (Deduced.isNull())
4023 // FIXME: Support a non-canonical deduced type for 'auto'.
4024 Deduced = Context.getCanonicalType(Deduced);
4025 Result = SubstituteAutoTransform(*this, Deduced).Apply(Type);
4055 SmallVector<DeducedTemplateArgument, 1> Deduced;
4056 Deduced.resize(1);
4067 Info, Deduced, TDF))
4081 FuncParam, InitType, Info, Deduced,
4086 if (Deduced[0].getKind() != TemplateArgument::Type)
4089 QualType DeducedType = Deduced[0].getAsType();
4101 // Check that the deduced argument type is compatible with the original
4161 llvm::SmallBitVector &Deduced);
4200 SmallVector<DeducedTemplateArgument, 4> Deduced;
4201 Deduced.resize(TemplateParams->size());
4256 Args1.data(), Args1.size(), Info, Deduced,
4268 Info, Deduced, TDF_None,
4278 Info, Deduced, TDF_None,
4289 // in a non-deduced context is considered used. -end note]
4290 unsigned ArgIdx = 0, NumArgs = Deduced.size();
4292 if (Deduced[ArgIdx].isNull())
4296 // All template arguments were deduced. FT1 is at least as specialized
4324 // If this argument had no value deduced but was used in one of the types
4326 if (Deduced[ArgIdx].isNull() && UsedParameters[ArgIdx])
4550 SmallVector<DeducedTemplateArgument, 4> Deduced;
4557 Deduced.resize(PS2->getTemplateParameters()->size());
4560 PT2, PT1, Info, Deduced, TDF_None,
4563 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),Deduced.end());
4566 *this, PS2, PS1->getTemplateArgs(), Deduced, Info);
4570 Deduced.clear();
4571 Deduced.resize(PS1->getTemplateParameters()->size());
4573 *this, PS1->getTemplateParameters(), PT1, PT2, Info, Deduced, TDF_None,
4576 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),
4577 Deduced.end());
4580 *this, PS1, PS2->getTemplateArgs(), Deduced, Info);
4598 SmallVector<DeducedTemplateArgument, 4> Deduced;
4614 Deduced.resize(PS2->getTemplateParameters()->size());
4616 *this, PS2->getTemplateParameters(), PT2, PT1, Info, Deduced, TDF_None,
4619 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),
4620 Deduced.end());
4624 Deduced, Info);
4628 Deduced.clear();
4629 Deduced.resize(PS1->getTemplateParameters()->size());
4632 PT1, PT2, Info, Deduced, TDF_None,
4635 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),Deduced.end());
4639 Deduced, Info);
4857 // non-deduced context.
4899 // non-deduced context.
5011 /// \brief Mark which template parameters can be deduced from a given
5015 /// parameters will be deduced.
5019 /// deduced.
5027 // non-deduced context.
5037 /// \brief Marks all of the template parameters that will be deduced by a
5041 llvm::SmallBitVector &Deduced) {
5044 Deduced.clear();
5045 Deduced.resize(TemplateParams->size());
5050 true, TemplateParams->getDepth(), Deduced);
5061 llvm::SmallBitVector Deduced(TemplateParams->size());
5063 Deduced);
5065 return Deduced.any();