#include "TreeTransform.h"
#include "TypeLocBuilder.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTLambda.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclAccessPair.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/TypeOrdering.h"
#include "clang/AST/UnresolvedSet.h"
#include "clang/Basic/AddressSpaces.h"
#include "clang/Basic/ExceptionSpecificationType.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/PartialDiagnostic.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Sema/EnterExpressionEvaluationContext.h"
#include "clang/Sema/Ownership.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/Template.h"
#include "clang/Sema/TemplateDeduction.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
#include <cassert>
#include <optional>
#include <tuple>
#include <type_traits>
#include <utility>
namespace clang {
enum TemplateDeductionFlags { … };
}
usingnamespaceclang;
usingnamespacesema;
static bool hasSameExtendedValue(llvm::APSInt X, llvm::APSInt Y) { … }
static TemplateDeductionResult DeduceTemplateArgumentsByTypeMatch(
Sema &S, TemplateParameterList *TemplateParams, QualType Param,
QualType Arg, TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced, unsigned TDF,
bool PartialOrdering, bool DeducedFromArrayBound, bool *HasDeducedAnyParam);
enum class PackFold { … };
static TemplateDeductionResult
DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams,
ArrayRef<TemplateArgument> Ps,
ArrayRef<TemplateArgument> As,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool NumberOfArgumentsMustMatch, PackFold PackFold,
bool *HasDeducedAnyParam);
static void MarkUsedTemplateParameters(ASTContext &Ctx,
const TemplateArgument &TemplateArg,
bool OnlyDeduced, unsigned Depth,
llvm::SmallBitVector &Used);
static void MarkUsedTemplateParameters(ASTContext &Ctx, QualType T,
bool OnlyDeduced, unsigned Level,
llvm::SmallBitVector &Deduced);
static const NonTypeTemplateParmDecl *
getDeducedParameterFromExpr(const Expr *E, unsigned Depth) { … }
static const NonTypeTemplateParmDecl *
getDeducedParameterFromExpr(TemplateDeductionInfo &Info, Expr *E) { … }
static bool isSameDeclaration(Decl *X, Decl *Y) { … }
static DeducedTemplateArgument
checkDeducedTemplateArguments(ASTContext &Context,
const DeducedTemplateArgument &X,
const DeducedTemplateArgument &Y,
bool AggregateCandidateDeduction = false) { … }
static TemplateDeductionResult
DeduceNonTypeTemplateArgument(Sema &S, TemplateParameterList *TemplateParams,
const NonTypeTemplateParmDecl *NTTP,
const DeducedTemplateArgument &NewDeduced,
QualType ValueType, TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static TemplateDeductionResult DeduceNonTypeTemplateArgument(
Sema &S, TemplateParameterList *TemplateParams,
const NonTypeTemplateParmDecl *NTTP, const llvm::APSInt &Value,
QualType ValueType, bool DeducedFromArrayBound, TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static TemplateDeductionResult
DeduceNullPtrTemplateArgument(Sema &S, TemplateParameterList *TemplateParams,
const NonTypeTemplateParmDecl *NTTP,
QualType NullPtrType, TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static TemplateDeductionResult
DeduceNonTypeTemplateArgument(Sema &S, TemplateParameterList *TemplateParams,
const NonTypeTemplateParmDecl *NTTP, Expr *Value,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static TemplateDeductionResult
DeduceNonTypeTemplateArgument(Sema &S, TemplateParameterList *TemplateParams,
const NonTypeTemplateParmDecl *NTTP, ValueDecl *D,
QualType T, TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static NamedDecl *getTemplateParameterWithDefault(Sema &S, NamedDecl *A,
TemplateArgument Default) { … }
static TemplateDeductionResult
DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams,
TemplateName Param, TemplateName Arg,
TemplateDeductionInfo &Info,
ArrayRef<TemplateArgument> DefaultArguments,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static const TemplateSpecializationType *getLastTemplateSpecType(QualType QT) { … }
static TemplateDeductionResult
DeduceTemplateSpecArguments(Sema &S, TemplateParameterList *TemplateParams,
const QualType P, QualType A,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static bool IsPossiblyOpaquelyQualifiedTypeInternal(const Type *T) { … }
static bool IsPossiblyOpaquelyQualifiedType(QualType T) { … }
static TemplateParameter makeTemplateParameter(Decl *D) { … }
struct clang::DeducedPack { … };
namespace {
class PackDeductionScope { … };
}
template <class T>
static TemplateDeductionResult DeduceForEachType(
Sema &S, TemplateParameterList *TemplateParams, const QualType *Params,
unsigned NumParams, const QualType *Args, unsigned NumArgs,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced, bool PartialOrdering,
bool FinishingDeduction, T &&DeductFunc) { … }
static TemplateDeductionResult DeduceTemplateArguments(
Sema &S, TemplateParameterList *TemplateParams, const QualType *Params,
unsigned NumParams, const QualType *Args, unsigned NumArgs,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced, unsigned TDF,
bool PartialOrdering, bool *HasDeducedAnyParam,
llvm::SmallBitVector *HasDeducedParam) { … }
static bool hasInconsistentOrSupersetQualifiersOf(QualType ParamType,
QualType ArgType) { … }
bool Sema::isSameOrCompatibleFunctionType(QualType P, QualType A) { … }
static unsigned getFirstInnerIndex(FunctionTemplateDecl *FTD) { … }
static bool isForwardingReference(QualType Param, unsigned FirstInnerIndex) { … }
static TemplateDeductionResult
DeduceTemplateBases(Sema &S, const CXXRecordDecl *RD,
TemplateParameterList *TemplateParams, QualType P,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static TemplateDeductionResult DeduceTemplateArgumentsByTypeMatch(
Sema &S, TemplateParameterList *TemplateParams, QualType P, QualType A,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced, unsigned TDF,
bool PartialOrdering, bool DeducedFromArrayBound,
bool *HasDeducedAnyParam) { … }
static TemplateDeductionResult
DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams,
const TemplateArgument &P, TemplateArgument A,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool *HasDeducedAnyParam) { … }
static bool hasTemplateArgumentForDeduction(ArrayRef<TemplateArgument> &Args,
unsigned &ArgIdx) { … }
static bool hasPackExpansionBeforeEnd(ArrayRef<TemplateArgument> Args) { … }
static TemplateDeductionResult
DeduceTemplateArguments(Sema &S, TemplateParameterList *TemplateParams,
ArrayRef<TemplateArgument> Ps,
ArrayRef<TemplateArgument> As,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool NumberOfArgumentsMustMatch, PackFold PackFold,
bool *HasDeducedAnyParam) { … }
TemplateDeductionResult Sema::DeduceTemplateArguments(
TemplateParameterList *TemplateParams, ArrayRef<TemplateArgument> Ps,
ArrayRef<TemplateArgument> As, sema::TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
bool NumberOfArgumentsMustMatch) { … }
static bool isSameTemplateArg(ASTContext &Context,
TemplateArgument X,
const TemplateArgument &Y,
bool PartialOrdering,
bool PackExpansionMatchesPack = false) { … }
TemplateArgumentLoc
Sema::getTrivialTemplateArgumentLoc(const TemplateArgument &Arg,
QualType NTTPType, SourceLocation Loc,
NamedDecl *TemplateParam) { … }
TemplateArgumentLoc
Sema::getIdentityTemplateArgumentLoc(NamedDecl *TemplateParm,
SourceLocation Location) { … }
static bool ConvertDeducedTemplateArgument(
Sema &S, NamedDecl *Param, DeducedTemplateArgument Arg, NamedDecl *Template,
TemplateDeductionInfo &Info, bool IsDeduced,
SmallVectorImpl<TemplateArgument> &SugaredOutput,
SmallVectorImpl<TemplateArgument> &CanonicalOutput) { … }
template <typename TemplateDeclT>
static TemplateDeductionResult ConvertDeducedTemplateArguments(
Sema &S, TemplateDeclT *Template, bool IsDeduced,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
TemplateDeductionInfo &Info,
SmallVectorImpl<TemplateArgument> &SugaredBuilder,
SmallVectorImpl<TemplateArgument> &CanonicalBuilder,
LocalInstantiationScope *CurrentInstantiationScope = nullptr,
unsigned NumAlreadyConverted = 0, bool *IsIncomplete = nullptr) { … }
static DeclContext *getAsDeclContextOrEnclosing(Decl *D) { … }
template<typename T> struct IsPartialSpecialization { … };
template<>
struct IsPartialSpecialization<ClassTemplatePartialSpecializationDecl> { … };
template<>
struct IsPartialSpecialization<VarTemplatePartialSpecializationDecl> { … };
template <typename TemplateDeclT>
static bool DeducedArgsNeedReplacement(TemplateDeclT *Template) { … }
template <>
bool DeducedArgsNeedReplacement<VarTemplatePartialSpecializationDecl>(
VarTemplatePartialSpecializationDecl *Spec) { … }
template <>
bool DeducedArgsNeedReplacement<ClassTemplatePartialSpecializationDecl>(
ClassTemplatePartialSpecializationDecl *Spec) { … }
template <typename TemplateDeclT>
static TemplateDeductionResult
CheckDeducedArgumentConstraints(Sema &S, TemplateDeclT *Template,
ArrayRef<TemplateArgument> SugaredDeducedArgs,
ArrayRef<TemplateArgument> CanonicalDeducedArgs,
TemplateDeductionInfo &Info) { … }
template <typename T>
static std::enable_if_t<IsPartialSpecialization<T>::value,
TemplateDeductionResult>
FinishTemplateArgumentDeduction(
Sema &S, T *Partial, bool IsPartialOrdering,
ArrayRef<TemplateArgument> TemplateArgs,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
TemplateDeductionInfo &Info) { … }
static TemplateDeductionResult FinishTemplateArgumentDeduction(
Sema &S, TemplateDecl *Template, bool PartialOrdering,
ArrayRef<TemplateArgument> TemplateArgs,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
TemplateDeductionInfo &Info) { … }
static TemplateDeductionResult FinishTemplateArgumentDeduction(
Sema &S, TemplateDecl *TD,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
TemplateDeductionInfo &Info) { … }
template <typename T>
static std::enable_if_t<IsPartialSpecialization<T>::value,
TemplateDeductionResult>
DeduceTemplateArguments(Sema &S, T *Partial,
ArrayRef<TemplateArgument> TemplateArgs,
TemplateDeductionInfo &Info) { … }
TemplateDeductionResult
Sema::DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial,
ArrayRef<TemplateArgument> TemplateArgs,
TemplateDeductionInfo &Info) { … }
TemplateDeductionResult
Sema::DeduceTemplateArguments(VarTemplatePartialSpecializationDecl *Partial,
ArrayRef<TemplateArgument> TemplateArgs,
TemplateDeductionInfo &Info) { … }
TemplateDeductionResult
Sema::DeduceTemplateArgumentsFromType(TemplateDecl *TD, QualType FromType,
sema::TemplateDeductionInfo &Info) { … }
static bool isSimpleTemplateIdType(QualType T) { … }
TemplateDeductionResult Sema::SubstituteExplicitTemplateArguments(
FunctionTemplateDecl *FunctionTemplate,
TemplateArgumentListInfo &ExplicitTemplateArgs,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
SmallVectorImpl<QualType> &ParamTypes, QualType *FunctionType,
TemplateDeductionInfo &Info) { … }
static TemplateDeductionResult
CheckOriginalCallArgDeduction(Sema &S, TemplateDeductionInfo &Info,
Sema::OriginalCallArg OriginalArg,
QualType DeducedA) { … }
static unsigned getPackIndexForParam(Sema &S,
FunctionTemplateDecl *FunctionTemplate,
const MultiLevelTemplateArgumentList &Args,
unsigned ParamIdx) { … }
static TemplateDeductionResult instantiateExplicitSpecifierDeferred(
Sema &S, FunctionDecl *Specialization,
const MultiLevelTemplateArgumentList &SubstArgs,
TemplateDeductionInfo &Info, FunctionTemplateDecl *FunctionTemplate,
ArrayRef<TemplateArgument> DeducedArgs) { … }
TemplateDeductionResult Sema::FinishTemplateArgumentDeduction(
FunctionTemplateDecl *FunctionTemplate,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
unsigned NumExplicitlySpecified, FunctionDecl *&Specialization,
TemplateDeductionInfo &Info,
SmallVectorImpl<OriginalCallArg> const *OriginalCallArgs,
bool PartialOverloading, llvm::function_ref<bool()> CheckNonDependent) { … }
static QualType GetTypeOfFunction(Sema &S, const OverloadExpr::FindResult &R,
FunctionDecl *Fn) { … }
static QualType
ResolveOverloadForDeduction(Sema &S, TemplateParameterList *TemplateParams,
Expr *Arg, QualType ParamType,
bool ParamWasReference,
TemplateSpecCandidateSet *FailedTSC = nullptr) { … }
static bool AdjustFunctionParmAndArgTypesForDeduction(
Sema &S, TemplateParameterList *TemplateParams, unsigned FirstInnerIndex,
QualType &ParamType, QualType &ArgType,
Expr::Classification ArgClassification, Expr *Arg, unsigned &TDF,
TemplateSpecCandidateSet *FailedTSC = nullptr) { … }
static bool
hasDeducibleTemplateParameters(Sema &S, FunctionTemplateDecl *FunctionTemplate,
QualType T);
static TemplateDeductionResult DeduceTemplateArgumentsFromCallArgument(
Sema &S, TemplateParameterList *TemplateParams, unsigned FirstInnerIndex,
QualType ParamType, QualType ArgType,
Expr::Classification ArgClassification, Expr *Arg,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
SmallVectorImpl<Sema::OriginalCallArg> &OriginalCallArgs,
bool DecomposedParam, unsigned ArgIdx, unsigned TDF,
TemplateSpecCandidateSet *FailedTSC = nullptr);
static TemplateDeductionResult DeduceFromInitializerList(
Sema &S, TemplateParameterList *TemplateParams, QualType AdjustedParamType,
InitListExpr *ILE, TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
SmallVectorImpl<Sema::OriginalCallArg> &OriginalCallArgs, unsigned ArgIdx,
unsigned TDF) { … }
static TemplateDeductionResult DeduceTemplateArgumentsFromCallArgument(
Sema &S, TemplateParameterList *TemplateParams, unsigned FirstInnerIndex,
QualType ParamType, QualType ArgType,
Expr::Classification ArgClassification, Expr *Arg,
TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
SmallVectorImpl<Sema::OriginalCallArg> &OriginalCallArgs,
bool DecomposedParam, unsigned ArgIdx, unsigned TDF,
TemplateSpecCandidateSet *FailedTSC) { … }
TemplateDeductionResult Sema::DeduceTemplateArguments(
FunctionTemplateDecl *FunctionTemplate,
TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args,
FunctionDecl *&Specialization, TemplateDeductionInfo &Info,
bool PartialOverloading, bool AggregateDeductionCandidate,
QualType ObjectType, Expr::Classification ObjectClassification,
llvm::function_ref<bool(ArrayRef<QualType>)> CheckNonDependent) { … }
QualType Sema::adjustCCAndNoReturn(QualType ArgFunctionType,
QualType FunctionType,
bool AdjustExceptionSpec) { … }
TemplateDeductionResult Sema::DeduceTemplateArguments(
FunctionTemplateDecl *FunctionTemplate,
TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ArgFunctionType,
FunctionDecl *&Specialization, TemplateDeductionInfo &Info,
bool IsAddressOfFunction) { … }
TemplateDeductionResult Sema::DeduceTemplateArguments(
FunctionTemplateDecl *ConversionTemplate, QualType ObjectType,
Expr::Classification ObjectClassification, QualType A,
CXXConversionDecl *&Specialization, TemplateDeductionInfo &Info) { … }
TemplateDeductionResult
Sema::DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate,
TemplateArgumentListInfo *ExplicitTemplateArgs,
FunctionDecl *&Specialization,
TemplateDeductionInfo &Info,
bool IsAddressOfFunction) { … }
namespace {
struct DependentAuto { … };
class SubstituteDeducedTypeTransform :
public TreeTransform<SubstituteDeducedTypeTransform> { … };
}
static bool CheckDeducedPlaceholderConstraints(Sema &S, const AutoType &Type,
AutoTypeLoc TypeLoc,
QualType Deduced) { … }
TemplateDeductionResult
Sema::DeduceAutoType(TypeLoc Type, Expr *Init, QualType &Result,
TemplateDeductionInfo &Info, bool DependentDeduction,
bool IgnoreConstraints,
TemplateSpecCandidateSet *FailedTSC) { … }
QualType Sema::SubstAutoType(QualType TypeWithAuto,
QualType TypeToReplaceAuto) { … }
TypeSourceInfo *Sema::SubstAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto,
QualType TypeToReplaceAuto) { … }
QualType Sema::SubstAutoTypeDependent(QualType TypeWithAuto) { … }
TypeSourceInfo *
Sema::SubstAutoTypeSourceInfoDependent(TypeSourceInfo *TypeWithAuto) { … }
QualType Sema::ReplaceAutoType(QualType TypeWithAuto,
QualType TypeToReplaceAuto) { … }
TypeSourceInfo *Sema::ReplaceAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto,
QualType TypeToReplaceAuto) { … }
void Sema::DiagnoseAutoDeductionFailure(const VarDecl *VDecl,
const Expr *Init) { … }
bool Sema::DeduceReturnType(FunctionDecl *FD, SourceLocation Loc,
bool Diagnose) { … }
bool Sema::CheckIfFunctionSpecializationIsImmediate(FunctionDecl *FD,
SourceLocation Loc) { … }
static QualType GetImplicitObjectParameterType(ASTContext &Context,
const CXXMethodDecl *Method,
QualType RawType,
bool IsOtherRvr) { … }
static TemplateDeductionResult CheckDeductionConsistency(
Sema &S, FunctionTemplateDecl *FTD, int ArgIdx, QualType P, QualType A,
ArrayRef<TemplateArgument> DeducedArgs, bool CheckConsistency) { … }
template <class T>
static TemplateDeductionResult FinishTemplateArgumentDeduction(
Sema &S, FunctionTemplateDecl *FTD,
SmallVectorImpl<DeducedTemplateArgument> &Deduced,
TemplateDeductionInfo &Info, T &&CheckDeductionConsistency) { … }
static bool isAtLeastAsSpecializedAs(Sema &S, SourceLocation Loc,
FunctionTemplateDecl *FT1,
FunctionTemplateDecl *FT2,
TemplatePartialOrderingContext TPOC,
bool Reversed,
const SmallVector<QualType> &Args1,
const SmallVector<QualType> &Args2) { … }
FunctionTemplateDecl *Sema::getMoreSpecializedTemplate(
FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc,
TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1,
QualType RawObj1Ty, QualType RawObj2Ty, bool Reversed) { … }
UnresolvedSetIterator Sema::getMostSpecialized(
UnresolvedSetIterator SpecBegin, UnresolvedSetIterator SpecEnd,
TemplateSpecCandidateSet &FailedCandidates,
SourceLocation Loc, const PartialDiagnostic &NoneDiag,
const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag,
bool Complain, QualType TargetType) { … }
FunctionDecl *Sema::getMoreConstrainedFunction(FunctionDecl *FD1,
FunctionDecl *FD2) { … }
template<typename TemplateLikeDecl>
static bool isAtLeastAsSpecializedAs(Sema &S, QualType T1, QualType T2,
TemplateLikeDecl *P2,
TemplateDeductionInfo &Info) { … }
namespace {
struct GetP2 { … };
struct TemplateArgumentListAreEqual { … };
}
template <typename TemplateLikeDecl, typename PrimaryDel>
static TemplateLikeDecl *
getMoreSpecialized(Sema &S, QualType T1, QualType T2, TemplateLikeDecl *P1,
PrimaryDel *P2, TemplateDeductionInfo &Info) { … }
ClassTemplatePartialSpecializationDecl *
Sema::getMoreSpecializedPartialSpecialization(
ClassTemplatePartialSpecializationDecl *PS1,
ClassTemplatePartialSpecializationDecl *PS2,
SourceLocation Loc) { … }
bool Sema::isMoreSpecializedThanPrimary(
ClassTemplatePartialSpecializationDecl *Spec, TemplateDeductionInfo &Info) { … }
VarTemplatePartialSpecializationDecl *
Sema::getMoreSpecializedPartialSpecialization(
VarTemplatePartialSpecializationDecl *PS1,
VarTemplatePartialSpecializationDecl *PS2, SourceLocation Loc) { … }
bool Sema::isMoreSpecializedThanPrimary(
VarTemplatePartialSpecializationDecl *Spec, TemplateDeductionInfo &Info) { … }
bool Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(
TemplateParameterList *P, TemplateDecl *AArg, SourceLocation Loc,
bool IsDeduced) { … }
namespace {
struct MarkUsedTemplateParameterVisitor :
RecursiveASTVisitor<MarkUsedTemplateParameterVisitor> { … };
}
static void
MarkUsedTemplateParameters(ASTContext &Ctx,
const Expr *E,
bool OnlyDeduced,
unsigned Depth,
llvm::SmallBitVector &Used) { … }
static void
MarkUsedTemplateParameters(ASTContext &Ctx,
NestedNameSpecifier *NNS,
bool OnlyDeduced,
unsigned Depth,
llvm::SmallBitVector &Used) { … }
static void
MarkUsedTemplateParameters(ASTContext &Ctx,
TemplateName Name,
bool OnlyDeduced,
unsigned Depth,
llvm::SmallBitVector &Used) { … }
static void
MarkUsedTemplateParameters(ASTContext &Ctx, QualType T,
bool OnlyDeduced,
unsigned Depth,
llvm::SmallBitVector &Used) { … }
static void
MarkUsedTemplateParameters(ASTContext &Ctx,
const TemplateArgument &TemplateArg,
bool OnlyDeduced,
unsigned Depth,
llvm::SmallBitVector &Used) { … }
void
Sema::MarkUsedTemplateParameters(const Expr *E, bool OnlyDeduced,
unsigned Depth,
llvm::SmallBitVector &Used) { … }
void
Sema::MarkUsedTemplateParameters(const TemplateArgumentList &TemplateArgs,
bool OnlyDeduced, unsigned Depth,
llvm::SmallBitVector &Used) { … }
void Sema::MarkDeducedTemplateParameters(
ASTContext &Ctx, const FunctionTemplateDecl *FunctionTemplate,
llvm::SmallBitVector &Deduced) { … }
bool hasDeducibleTemplateParameters(Sema &S,
FunctionTemplateDecl *FunctionTemplate,
QualType T) { … }