clang 19.0.0git
Namespaces | Functions
SemaTemplateInstantiate.cpp File Reference
#include "TreeTransform.h"
#include "clang/AST/ASTConcept.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTLambda.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprConcepts.h"
#include "clang/AST/PrettyDeclStackTrace.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/TypeVisitor.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Stack.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Sema/DeclSpec.h"
#include "clang/Sema/EnterExpressionEvaluationContext.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaConcept.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/Template.h"
#include "clang/Sema/TemplateDeduction.h"
#include "clang/Sema/TemplateInstCallback.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/TimeProfiler.h"
#include <optional>

Go to the source code of this file.

Namespaces

namespace  TemplateInstArgsHelpers
 
namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::sema
 

Functions

static std::string convertCallArgsToString (Sema &S, llvm::ArrayRef< const Expr * > Args)
 
static TemplateArgument getPackSubstitutedTemplateArgument (Sema &S, TemplateArgument Arg)
 
static concepts::Requirement::SubstitutionDiagnosticcreateSubstDiag (Sema &S, TemplateDeductionInfo &Info, concepts::EntityPrinter Printer)
 
static bool NeedsInstantiationAsFunctionType (TypeSourceInfo *T)
 
Attrclang::sema::instantiateTemplateAttribute (const Attr *At, ASTContext &C, Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs)
 
Attrclang::sema::instantiateTemplateAttributeForDecl (const Attr *At, ASTContext &C, Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs)
 
static ActionResult< CXXRecordDecl * > getPatternForClassTemplateSpecialization (Sema &S, SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
 Get the instantiation pattern to use to instantiate the definition of a given ClassTemplateSpecializationDecl (either the pattern of the primary template or of a partial specialization).
 
static const DeclgetCanonicalParmVarDecl (const Decl *D)
 

Function Documentation

◆ convertCallArgsToString()

static std::string convertCallArgsToString ( Sema S,
llvm::ArrayRef< const Expr * >  Args 
)
static

◆ createSubstDiag()

static concepts::Requirement::SubstitutionDiagnostic * createSubstDiag ( Sema S,
TemplateDeductionInfo Info,
concepts::EntityPrinter  Printer 
)
static

◆ getCanonicalParmVarDecl()

static const Decl * getCanonicalParmVarDecl ( const Decl D)
static

◆ getPackSubstitutedTemplateArgument()

static TemplateArgument getPackSubstitutedTemplateArgument ( Sema S,
TemplateArgument  Arg 
)
static

◆ getPatternForClassTemplateSpecialization()

static ActionResult< CXXRecordDecl * > getPatternForClassTemplateSpecialization ( Sema S,
SourceLocation  PointOfInstantiation,
ClassTemplateSpecializationDecl ClassTemplateSpec,
TemplateSpecializationKind  TSK 
)
static

Get the instantiation pattern to use to instantiate the definition of a given ClassTemplateSpecializationDecl (either the pattern of the primary template or of a partial specialization).

Definition at line 3943 of file SemaTemplateInstantiate.cpp.

References clang::TemplateSpecCandidateSet::addCandidate(), clang::AS_public, clang::TemplateArgumentList::asArray(), clang::Sema::InstantiatingTemplate::Clear(), clang::Sema::Context, clang::Sema::DeduceTemplateArguments(), clang::SemaBase::Diag(), clang::ClassTemplateDecl::getInstantiatedFromMemberTemplate(), clang::TemplateSpecCandidateSet::getLocation(), clang::Sema::getMoreSpecializedPartialSpecialization(), clang::ClassTemplateDecl::getPartialSpecializations(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplateOrPartial(), clang::ClassTemplateSpecializationDecl::getTemplateArgs(), clang::Sema::getTemplateArgumentBindingsText(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::Sema::InstantiatingTemplate::isAlreadyInstantiating(), clang::Sema::InstantiatingTemplate::isInvalid(), clang::RedeclarableTemplateDecl::isMemberSpecialization(), clang::DeclAccessPair::make(), clang::MakeDeductionFailureInfo(), P, clang::Result, clang::TemplateSpecCandidate::set(), clang::ClassTemplateSpecializationDecl::setInstantiationOf(), clang::Decl::setInvalidDecl(), clang::Success, and clang::sema::TemplateDeductionInfo::takeCanonical().

Referenced by clang::Sema::InstantiateClassTemplateSpecialization().

◆ NeedsInstantiationAsFunctionType()

static bool NeedsInstantiationAsFunctionType ( TypeSourceInfo T)
static