Home | History | Annotate | Download | only in Sema

Lines Matching refs:Deduced

92                         SmallVectorImpl<DeducedTemplateArgument> &Deduced);
101 Deduced,
110 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.
292 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
299 Deduced[NTTP->getIndex()],
303 Info.FirstArg = Deduced[NTTP->getIndex()];
308 Deduced[NTTP->getIndex()] = Result;
321 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
329 Deduced[NTTP->getIndex()],
334 Info.FirstArg = Deduced[NTTP->getIndex()];
339 Deduced[NTTP->getIndex()] = Result;
352 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
360 Deduced[NTTP->getIndex()],
364 Info.FirstArg = Deduced[NTTP->getIndex()];
369 Deduced[NTTP->getIndex()] = Result;
379 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
391 Deduced[TempParam->getIndex()],
395 Info.FirstArg = Deduced[TempParam->getIndex()];
400 Deduced[TempParam->getIndex()] = Result;
427 /// \param Deduced the deduced template arguments
438 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
449 Info, Deduced))
458 SpecArg->getNumArgs(), Info, Deduced,
486 Info, Deduced))
493 Info, Deduced, /*NumberOfArgumentsMustMatch=*/true);
565 // deduced because this deduction hadn't happened yet.
580 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
582 : S(S), TemplateParams(TemplateParams), Deduced(Deduced), Info(Info) {
595 // Save the deduced template argument for the parameter pack expanded
598 Pack.Saved = Deduced[Index];
599 Deduced[Index] = TemplateArgument();
616 // the set of deduced arguments.
634 /// Move to deducing the next element in each pack that is being deduced.
636 // Capture the deduced template arguments for each parameter pack expanded
637 // by this pack expansion, add them to the list of arguments we've deduced
638 // for that pack, then clear out the deduced argument.
640 DeducedTemplateArgument &DeducedArg = Deduced[Pack.Index];
656 Deduced[Pack.Index] = Pack.Saved;
663 // (because it only appeared in non-deduced contexts), so just
671 // If we deduced an empty argument pack, create it now.
693 Loc = &Deduced[Pack.Index];
725 SmallVectorImpl<DeducedTemplateArgument> &Deduced;
750 /// \param Deduced the deduced template arguments
768 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
805 Info, Deduced, TDF,
814 // The non-deduced contexts are:
828 PackDeductionScope PackScope(S, TemplateParams, Deduced, Info, Pattern);
837 Args[ArgIdx], Info, Deduced,
927 /// \param Deduced the deduced template arguments
943 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
1016 // - If the original P is a reference type, the deduced A (i.e., the type
1038 // deduced as X&. - end note ]
1053 // template non-type argument i can be deduced if P and A have one of
1092 // Remove any qualifiers on the parameter from the deduced type.
1131 Deduced[Index],
1135 Info.FirstArg = Deduced[Index];
1140 Deduced[Index] = Result;
1229 Info, Deduced, TDF);
1239 Info, Deduced, TDF);
1259 Info, Deduced, SubTDF);
1271 ReferenceArg->getPointeeType(), Info, Deduced, 0);
1284 Info, Deduced, 0);
1298 Info, Deduced, SubTDF);
1317 Info, Deduced, SubTDF);
1335 Info, Deduced, SubTDF))
1354 Info, Deduced);
1361 Info, Deduced);
1391 FunctionProtoArg->getReturnType(), Info, Deduced, 0))
1398 FunctionProtoArg->getNumParams(), Info, Deduced, SubTDF);
1425 Deduced);
1427 SmallVector<DeducedTemplateArgument, 8> DeducedOrig(Deduced.begin(),
1428 Deduced.end());
1431 S, TemplateParams, SpecParam, Arg, Info, Deduced);
1444 // transformed A can be a derived class of the deduced A. Likewise if
1447 // deduced A.
1450 // otherwise fail. If they yield more than one possible deduced A, the
1453 // Reset the incorrectly deduced argument from above.
1454 Deduced = DeducedOrig;
1478 QualType(NextT, 0), BaseInfo, Deduced);
1490 std::swap(SuccessfulDeduced, Deduced);
1497 Deduced = DeducedOrig;
1510 std::swap(SuccessfulDeduced, Deduced);
1545 Info, Deduced,
1552 Info, Deduced,
1571 Info, Deduced, 0);
1588 Info, Deduced, TDF);
1601 Info, Deduced, TDF);
1620 Info, Deduced, TDF))
1632 false, Info, Deduced);
1642 Info, Deduced, TDF))
1652 Info, Deduced);
1681 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
1697 Info, Deduced, 0);
1706 Arg.getAsTemplate(), Info, Deduced);
1760 Info, Deduced);
1763 Info, Deduced);
1766 Info, Deduced);
1840 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
1845 // non-deduced context.
1874 Info, Deduced))
1892 // and set any deduced parameter packs to an empty argument pack.
1896 PackDeductionScope PackScope(S, TemplateParams, Deduced, Info, Pattern);
1898 // Keep track of the deduced template arguments for each parameter pack
1908 Info, Deduced))
1929 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
1933 Info, Deduced, false);
2070 /// \brief Convert the given deduced template argument and add it to the set of
2099 // Convert the deduced template argument into a template
2120 // When converting the deduced template argument, append it to the
2126 "deduced nested pack");
2168 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2177 // [...] or if any template argument remains neither deduced nor
2183 if (Deduced[I].isNull()) {
2188 // We have deduced this argument, so it still needs to be
2190 if (ConvertDeducedTemplateArgument(S, Param, Deduced[I],
2200 // Form the template argument list from the deduced template arguments.
2206 // Substitute the deduced template arguments into the template
2271 // specialization can be deduced from the actual template argument
2278 SmallVector<DeducedTemplateArgument, 4> Deduced;
2279 Deduced.resize(Partial->getTemplateParameters()->size());
2284 TemplateArgs, Info, Deduced))
2287 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2297 Deduced, Info);
2310 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2317 // [...] or if any template argument remains neither deduced nor
2323 if (Deduced[I].isNull()) {
2328 // We have deduced this argument, so it still needs to be
2330 if (ConvertDeducedTemplateArgument(S, Param, Deduced[I], Partial,
2339 // Form the template argument list from the deduced template arguments.
2345 // Substitute the deduced template arguments into the template
2412 // specialization can be deduced from the actual template argument
2419 SmallVector<DeducedTemplateArgument, 4> Deduced;
2420 Deduced.resize(Partial->getTemplateParameters()->size());
2423 TemplateArgs, Info, Deduced))
2426 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2436 Deduced, Info);
2457 /// \param Deduced the deduced template arguments, which will be populated
2476 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2509 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2541 // If we deduced template arguments for a template parameter pack,
2625 // Trailing template arguments that can be deduced (14.8.2) may be
2627 // template arguments can be deduced, they may all be omitted; in this
2631 // the set of deduced template arguments. Explicitly-specified
2634 Deduced.reserve(TemplateParams->size());
2638 Deduced.push_back(DeducedTemplateArgument());
2640 Deduced.push_back(Arg);
2646 /// \brief Check whether the deduced argument type for a call to a function
2669 // - If the original P is a reference type, the deduced A (i.e., the
2680 // Under Objective-C++ ARC, the deduced type may have implicitly
2698 // deduced argument type's qualifiers as if we had performed the
2705 // type that can be converted to the deduced A via a qualification
2721 // transformed A can be a derived class of the deduced A. [...]
2724 // derived class pointed to by the deduced A.
2749 /// checking the deduced template arguments for completeness and forming
2753 /// which the deduced argument types should be compared.
2756 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2771 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2782 // [...] or if any template argument remains neither deduced nor
2788 if (!Deduced[I].isNull()) {
2793 Builder.push_back(Deduced[I]);
2796 // via additional deduced arguments).
2808 // We have deduced this argument, so it still needs to be
2810 if (ConvertDeducedTemplateArgument(*this, Param, Deduced[I],
2823 // A trailing template parameter pack (14.5.3) not otherwise deduced will
2824 // be deduced to an empty sequence of template arguments.
2894 // Form the template argument list from the deduced template arguments.
2899 // Substitute the deduced template arguments into the function template
2930 // values that will make the deduced A identical to A (after the type A
3041 // non-deduced context.
3070 // treated as a non-deduced context.
3074 // the deduced template argument values are then combined.
3077 Deduced(TemplateParams->size());
3081 ArgType, Info, Deduced, TDF);
3163 // values that will make the deduced A identical to A (after the type A
3167 // - If the original P is a reference type, the deduced A (i.e., the
3173 // type that can be converted to the deduced A via a qualification
3179 // transformed A can be a derived class of the deduced A. Likewise,
3182 // the deduced A.
3199 SmallVectorImpl<DeducedTemplateArgument> &Deduced, unsigned TDF);
3207 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
3216 // P0[N] case, if N is a non-type template parameter, N is deduced from the
3218 // causes the parameter to be considered a non-deduced context
3244 E, Info, Deduced, TDF)))
3263 /*ArrayBound=*/true, Info, Deduced);
3278 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
3286 Deduced, TDF, Result))
3300 ArgType, Info, Deduced, TDF);
3356 SmallVector<DeducedTemplateArgument, 4> Deduced;
3363 Deduced,
3370 NumExplicitlySpecified = Deduced.size();
3378 Deduced.resize(TemplateParams->size());
3411 Info, Deduced, TDF, Result))
3421 // so we can check for compatibility between the deduced A and A.
3428 Info, Deduced, TDF))
3442 // the parameter pack is a non-deduced context.
3447 PackDeductionScope PackScope(*this, TemplateParams, Deduced, Info,
3473 Info, Deduced, TDF, Result)) {
3483 // so we can check for compatibility between the deduced A and A.
3491 Deduced, TDF))
3507 return FinishTemplateArgumentDeduction(FunctionTemplate, Deduced,
3577 SmallVector<DeducedTemplateArgument, 4> Deduced;
3584 Deduced, ParamTypes,
3588 NumExplicitlySpecified = Deduced.size();
3595 Deduced.resize(TemplateParams->size());
3597 // If the function has a deduced return type, substitute it for a dependent
3598 // type so that we treat it as a non-deduced context in what follows.
3613 Info, Deduced, TDF))
3618 = FinishTemplateArgumentDeduction(FunctionTemplate, Deduced,
3623 // If the function has a deduced return type, deduce it now, so we can check
3624 // that the deduced function type matches the requested type.
3688 // Use the deduced arguments of the conversion function, to specialize our
3711 // specialize the static invoker with the deduced arguments of our
3827 SmallVector<DeducedTemplateArgument, 4> Deduced;
3828 Deduced.resize(TemplateParams->size());
3832 // argument values that will make the deduced A identical to
3836 // cv-qualified than the deduced A (i.e., the type referred to
3840 // - The deduced A can be another pointer or pointer to member
3852 P, A, Info, Deduced, TDF))
3860 = FinishTemplateArgumentDeduction(ConversionTemplate, Deduced, 0,
3865 // to a ptr-to-function, use the deduced arguments from the conversion
3889 Specialization, Deduced, DestFunctionPtrReturnType,
3941 // auto type deduced as T" in order for [temp.deduct.call]p3 to apply.
3984 /// \param Init the initializer for the variable whose type is to be deduced.
3986 /// deduced type.
4012 QualType Deduced = BuildDecltypeType(Init, Init->getLocStart(), false);
4013 if (Deduced.isNull())
4015 // FIXME: Support a non-canonical deduced type for 'auto'.
4016 Deduced = Context.getCanonicalType(Deduced);
4017 Result = SubstituteAutoTransform(*this, Deduced).Apply(Type);
4047 SmallVector<DeducedTemplateArgument, 1> Deduced;
4048 Deduced.resize(1);
4059 Info, Deduced, TDF))
4073 FuncParam, InitType, Info, Deduced,
4078 if (Deduced[0].getKind() != TemplateArgument::Type)
4081 QualType DeducedType = Deduced[0].getAsType();
4093 // Check that the deduced argument type is compatible with the original
4153 llvm::SmallBitVector &Deduced);
4192 SmallVector<DeducedTemplateArgument, 4> Deduced;
4193 Deduced.resize(TemplateParams->size());
4248 Args1.data(), Args1.size(), Info, Deduced,
4260 Info, Deduced, TDF_None,
4270 Info, Deduced, TDF_None,
4281 // in a non-deduced context is considered used. -end note]
4282 unsigned ArgIdx = 0, NumArgs = Deduced.size();
4284 if (Deduced[ArgIdx].isNull())
4288 // All template arguments were deduced. FT1 is at least as specialized
4316 // If this argument had no value deduced but was used in one of the types
4318 if (Deduced[ArgIdx].isNull() && UsedParameters[ArgIdx])
4542 SmallVector<DeducedTemplateArgument, 4> Deduced;
4549 Deduced.resize(PS2->getTemplateParameters()->size());
4552 PT2, PT1, Info, Deduced, TDF_None,
4555 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),Deduced.end());
4558 *this, PS2, PS1->getTemplateArgs(), Deduced, Info);
4562 Deduced.clear();
4563 Deduced.resize(PS1->getTemplateParameters()->size());
4565 *this, PS1->getTemplateParameters(), PT1, PT2, Info, Deduced, TDF_None,
4568 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),
4569 Deduced.end());
4572 *this, PS1, PS2->getTemplateArgs(), Deduced, Info);
4590 SmallVector<DeducedTemplateArgument, 4> Deduced;
4604 Deduced.resize(PS2->getTemplateParameters()->size());
4606 *this, PS2->getTemplateParameters(), PT2, PT1, Info, Deduced, TDF_None,
4609 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),
4610 Deduced.end());
4614 Deduced, Info);
4618 Deduced.clear();
4619 Deduced.resize(PS1->getTemplateParameters()->size());
4622 PT1, PT2, Info, Deduced, TDF_None,
4625 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),Deduced.end());
4629 Deduced, Info);
4847 // non-deduced context.
4881 // The non-deduced contexts are:
4886 // When a type name is specified in a way that includes a non-deduced
4888 // non-deduced.
5006 /// \brief Mark which template parameters can be deduced from a given
5010 /// parameters will be deduced.
5014 /// deduced.
5022 // non-deduced context.
5032 /// \brief Marks all of the template parameters that will be deduced by a
5036 llvm::SmallBitVector &Deduced) {
5039 Deduced.clear();
5040 Deduced.resize(TemplateParams->size());
5045 true, TemplateParams->getDepth(), Deduced);
5056 llvm::SmallBitVector Deduced(TemplateParams->size());
5058 Deduced);
5060 return Deduced.any();