Home | History | Annotate | Download | only in Sema

Lines Matching defs:Deduced

92                         SmallVectorImpl<DeducedTemplateArgument> &Deduced);
125 Deduced,
137 SmallVectorImpl<DeducedTemplateArgument> &Deduced);
172 /// \brief Verify that the given, deduced template arguments are compatible.
174 /// \returns The deduced template argument, or a NULL template argument if
175 /// the deduced template arguments were incompatible.
188 llvm_unreachable("Non-deduced template arguments handled above");
199 // If we deduced a constant in one case and either a dependent expression or
231 // If we deduced a dependent expression in one case and either an integral
252 // If we deduced a declaration and a dependent expression, keep the
257 // If we deduced a declaration and an integral constant, keep the
262 // If we deduced two declarations, make sure they they refer to the
273 // If we deduced a null pointer and a dependent expression, keep the
278 // If we deduced a null pointer and an integral constant, keep the
283 // If we deduced two null pointers, make sure they have the same type.
321 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
328 Deduced[NTTP->getIndex()],
332 Info.FirstArg = Deduced[NTTP->getIndex()];
337 Deduced[NTTP->getIndex()] = Result;
350 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
358 Deduced[NTTP->getIndex()],
363 Info.FirstArg = Deduced[NTTP->getIndex()];
368 Deduced[NTTP->getIndex()] = Result;
381 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
389 Deduced[NTTP->getIndex()],
393 Info.FirstArg = Deduced[NTTP->getIndex()];
398 Deduced[NTTP->getIndex()] = Result;
408 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
420 Deduced[TempParam->getIndex()],
424 Info.FirstArg = Deduced[TempParam->getIndex()];
429 Deduced[TempParam->getIndex()] = Result;
456 /// \param Deduced the deduced template arguments
467 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
478 Info, Deduced))
488 Info, Deduced);
515 Info, Deduced))
523 Info, Deduced);
591 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
595 // Save the deduced template arguments for each parameter pack expanded
598 // Save the previously-deduced argument pack, then clear it out so that we
600 SavedPacks[I] = Deduced[PackIndices[I]];
601 Deduced[PackIndices[I]] = TemplateArgument();
607 // the set of deduced arguments.
628 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
639 Deduced[PackIndices[I]] = SavedPacks[I];
646 // If we deduced an empty argument pack, create it now.
669 Deduced[PackIndices[I]] = Result;
693 /// \param Deduced the deduced template arguments
714 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
753 Info, Deduced, TDF,
763 // The non-deduced contexts are:
795 // Keep track of the deduced template arguments for each parameter pack
801 PrepareArgumentPackDeduction(S, Deduced, PackIndices, SavedPacks,
811 Args[ArgIdx], Info, Deduced,
816 // Capture the deduced template arguments for each parameter pack expanded
817 // by this pack expansion, add them to the list of arguments we've deduced
818 // for that pack, then clear out the deduced argument.
820 DeducedTemplateArgument &DeducedArg = Deduced[PackIndices[I]];
832 Deduced, PackIndices, SavedPacks,
914 /// \param Deduced the deduced template arguments
933 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
997 // - If the original P is a reference type, the deduced A (i.e., the type
1019 // deduced as X&. - end note ]
1034 // template non-type argument i can be deduced if P and A have one of
1073 // Remove any qualifiers on the parameter from the deduced type.
1112 Deduced[Index],
1116 Info.FirstArg = Deduced[Index];
1121 Deduced[Index] = Result;
1210 Info, Deduced, TDF);
1220 Info, Deduced, TDF);
1240 Info, Deduced, SubTDF);
1251 ReferenceArg->getPointeeType(), Info, Deduced, 0);
1263 Info, Deduced, 0);
1277 Info, Deduced, SubTDF);
1296 Info, Deduced, SubTDF);
1314 Info, Deduced, SubTDF))
1333 Info, Deduced);
1340 Info, Deduced);
1371 Info, Deduced, 0))
1379 Info, Deduced, SubTDF);
1404 Info, Deduced);
1409 // derived class of the deduced A. Likewise, if P is a pointer to a
1411 // class pointed to by the deduced A.
1430 SmallVector<DeducedTemplateArgument, 8> DeducedOrig(Deduced.begin(),
1431 Deduced.end());
1448 Deduced);
1456 DeducedOrig.append(Deduced.begin(), Deduced.end());
1462 Deduced = DeducedOrig;
1504 Info, Deduced,
1511 Info, Deduced,
1530 Info, Deduced, 0);
1547 Info, Deduced, TDF);
1560 Info, Deduced, TDF);
1579 Info, Deduced, TDF))
1591 false, Info, Deduced);
1601 Info, Deduced, TDF))
1611 Info, Deduced);
1639 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
1655 Info, Deduced, 0);
1664 Arg.getAsTemplate(), Info, Deduced);
1719 Info, Deduced);
1722 Info, Deduced);
1725 Info, Deduced);
1800 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
1804 // non-deduced context.
1832 Info, Deduced))
1868 // and set any deduced parameter packs to an empty argument pack.
1871 // Save the deduced template arguments for each parameter pack expanded
1876 PrepareArgumentPackDeduction(S, Deduced, PackIndices, SavedPacks,
1879 // Keep track of the deduced template arguments for each parameter pack
1889 Info, Deduced))
1892 // Capture the deduced template arguments for each parameter pack expanded
1893 // by this pack expansion, add them to the list of arguments we've deduced
1894 // for that pack, then clear out the deduced argument.
1896 DeducedTemplateArgument &DeducedArg = Deduced[PackIndices[I]];
1910 Deduced, PackIndices, SavedPacks,
1924 SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
1928 Info, Deduced);
2065 /// \brief Convert the given deduced template argument and add it to the set of
2083 // When converting the deduced template argument, append it to the
2105 // Convert the deduced template argument into a template
2131 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2140 // [...] or if any template argument remains neither deduced nor
2146 if (Deduced[I].isNull()) {
2151 // We have deduced this argument, so it still needs to be
2179 if (ConvertDeducedTemplateArgument(S, Param, Deduced[I],
2190 // Form the template argument list from the deduced template arguments.
2197 // Substitute the deduced template arguments into the template
2261 // specialization can be deduced from the actual template argument
2268 SmallVector<DeducedTemplateArgument, 4> Deduced;
2269 Deduced.resize(Partial->getTemplateParameters()->size());
2274 TemplateArgs, Info, Deduced))
2277 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2287 Deduced, Info);
2296 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2303 // [...] or if any template argument remains neither deduced nor
2309 if (Deduced[I].isNull()) {
2314 // We have deduced this argument, so it still needs to be
2340 if (ConvertDeducedTemplateArgument(S, Param, Deduced[I], Partial, NTTPType,
2350 // Form the template argument list from the deduced template arguments.
2356 // Substitute the deduced template arguments into the template
2417 // specialization can be deduced from the actual template argument
2424 SmallVector<DeducedTemplateArgument, 4> Deduced;
2425 Deduced.resize(Partial->getTemplateParameters()->size());
2428 TemplateArgs, Info, Deduced))
2431 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2441 Deduced, Info);
2462 /// \param Deduced the deduced template arguments, which will be populated
2481 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
2517 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2549 // If we deduced template arguments for a template parameter pack,
2627 // Trailing template arguments that can be deduced (14.8.2) may be
2629 // template arguments can be deduced, they may all be omitted; in this
2633 // the set of deduced template arguments. Explicitly-specified
2636 Deduced.reserve(TemplateParams->size());
2640 Deduced.push_back(DeducedTemplateArgument());
2642 Deduced.push_back(Arg);
2648 /// \brief Check whether the deduced argument type for a call to a function
2671 // - If the original P is a reference type, the deduced A (i.e., the
2682 // Under Objective-C++ ARC, the deduced type may have implicitly been
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,
2769 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(), Deduced.end());
2780 // [...] or if any template argument remains neither deduced nor
2786 if (!Deduced[I].isNull()) {
2791 Builder.push_back(Deduced[I]);
2795 // We have deduced this argument, so it still needs to be
2823 if (ConvertDeducedTemplateArgument(*this, Param, Deduced[I],
2837 // A trailing template parameter pack (14.5.3) not otherwise deduced will
2838 // be deduced to an empty sequence of template arguments.
2897 // Form the template argument list from the deduced template arguments.
2902 // Substitute the deduced template arguments into the function template
2933 // values that will make the deduced A identical to A (after the type A
3035 // non-deduced context.
3064 // treated as a non-deduced context.
3068 // the deduced template argument values are then combined.
3071 Deduced(TemplateParams->size());
3075 ArgType, Info, Deduced, TDF);
3168 // values that will make the deduced A identical to A (after the type A
3172 // - If the original P is a reference type, the deduced A (i.e., the
3178 // type that can be converted to the deduced A via a qualification
3184 // transformed A can be a derived class of the deduced A. Likewise,
3187 // the deduced A.
3210 SmallVectorImpl<DeducedTemplateArgument> &Deduced,
3224 Info, Deduced, TDF))
3238 ArgType, Info, Deduced, TDF);
3294 SmallVector<DeducedTemplateArgument, 4> Deduced;
3301 Deduced,
3308 NumExplicitlySpecified = Deduced.size();
3316 Deduced.resize(TemplateParams->size());
3349 // result is the deduced type if it's the same for all elements.
3359 Info, Deduced, TDF))
3367 // so we can check for compatibility between the deduced A and A.
3374 Info, Deduced, TDF))
3388 // the parameter pack is a non-deduced context.
3409 // Keep track of the deduced template arguments for each parameter pack
3415 PrepareArgumentPackDeduction(*this, Deduced, PackIndices, SavedPacks,
3448 Info, Deduced, TDF))
3454 // so we can check for compatibility between the deduced A and A.
3462 Deduced, TDF))
3466 // Capture the deduced template arguments for each parameter pack expanded
3467 // by this pack expansion, add them to the list of arguments we've deduced
3468 // for that pack, then clear out the deduced argument.
3470 DeducedTemplateArgument &DeducedArg = Deduced[PackIndices[I]];
3482 Deduced, PackIndices, SavedPacks,
3490 return FinishTemplateArgumentDeduction(FunctionTemplate, Deduced,
3535 SmallVector<DeducedTemplateArgument, 4> Deduced;
3542 Deduced, ParamTypes,
3546 NumExplicitlySpecified = Deduced.size();
3553 Deduced.resize(TemplateParams->size());
3555 // If the function has a deduced return type, substitute it for a dependent
3556 // type so that we treat it as a non-deduced context in what follows.
3571 Info, Deduced, TDF))
3576 = FinishTemplateArgumentDeduction(FunctionTemplate, Deduced,
3581 // If the function has a deduced return type, deduce it now, so we can check
3582 // that the deduced function type matches the requested type.
3673 SmallVector<DeducedTemplateArgument, 4> Deduced;
3674 Deduced.resize(TemplateParams->size());
3678 // argument values that will make the deduced A identical to
3682 // cv-qualified than the deduced A (i.e., the type referred to
3686 // - The deduced A can be another pointer or pointer to member
3698 P, A, Info, Deduced, TDF))
3705 = FinishTemplateArgumentDeduction(FunctionTemplate, Deduced, 0, Spec,
3756 // auto type deduced as T" in order for [temp.deduct.call]p3 to apply.
3799 /// \param Init the initializer for the variable whose type is to be deduced.
3801 /// deduced type.
3827 QualType Deduced = BuildDecltypeType(Init, Init->getLocStart());
3828 // FIXME: Support a non-canonical deduced type for 'auto'.
3829 Deduced = Context.getCanonicalType(Deduced);
3830 Result = SubstituteAutoTransform(*this, Deduced).Apply(Type);
3855 SmallVector<DeducedTemplateArgument, 1> Deduced;
3856 Deduced.resize(1);
3868 Info, Deduced, TDF))
3878 InitType, Info, Deduced, TDF))
3882 if (Deduced[0].getKind() != TemplateArgument::Type)
3885 QualType DeducedType = Deduced[0].getAsType();
3897 // Check that the deduced argument type is compatible with the original
3910 QualType Sema::SubstAutoType(QualType Type, QualType Deduced) {
3911 return SubstituteAutoTransform(*this, Deduced).TransformType(Type);
3945 llvm::SmallBitVector &Deduced);
3985 SmallVector<DeducedTemplateArgument, 4> Deduced;
3986 Deduced.resize(TemplateParams->size());
4044 Args1.data(), Args1.size(), Info, Deduced,
4058 Info, Deduced, TDF_None,
4069 Info, Deduced, TDF_None,
4081 // in a non-deduced context is considered used. -end note]
4082 unsigned ArgIdx = 0, NumArgs = Deduced.size();
4084 if (Deduced[ArgIdx].isNull())
4088 // All template arguments were deduced. FT1 is at least as specialized
4125 // If this argument had no value deduced but was used in one of the types
4127 if (Deduced[ArgIdx].isNull() && UsedParameters[ArgIdx])
4420 SmallVector<DeducedTemplateArgument, 4> Deduced;
4427 Deduced.resize(PS2->getTemplateParameters()->size());
4430 PT2, PT1, Info, Deduced, TDF_None,
4434 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),Deduced.end());
4438 *this, PS2, PS1->getTemplateArgs(), Deduced, Info);
4442 Deduced.clear();
4443 Deduced.resize(PS1->getTemplateParameters()->size());
4445 *this, PS1->getTemplateParameters(), PT1, PT2, Info, Deduced, TDF_None,
4449 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),
4450 Deduced.end());
4454 *this, PS1, PS2->getTemplateArgs(), Deduced, Info);
4468 SmallVector<DeducedTemplateArgument, 4> Deduced;
4484 Deduced.resize(PS2->getTemplateParameters()->size());
4486 *this, PS2->getTemplateParameters(), PT2, PT1, Info, Deduced, TDF_None,
4490 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),
4491 Deduced.end());
4496 Deduced, Info);
4500 Deduced.clear();
4501 Deduced.resize(PS1->getTemplateParameters()->size());
4504 PT1, PT2, Info, Deduced, TDF_None,
4508 SmallVector<TemplateArgument, 4> DeducedArgs(Deduced.begin(),Deduced.end());
4513 Deduced, Info);
4731 // non-deduced context.
4773 // non-deduced context.
4887 /// \brief Mark which template parameters can be deduced from a given
4891 /// parameters will be deduced.
4895 /// deduced.
4903 // non-deduced context.
4913 /// \brief Marks all of the template parameters that will be deduced by a
4918 llvm::SmallBitVector &Deduced) {
4921 Deduced.clear();
4922 Deduced.resize(TemplateParams->size());
4927 true, TemplateParams->getDepth(), Deduced);
4938 llvm::SmallBitVector Deduced(TemplateParams->size());
4940 Deduced);
4942 return Deduced.any();