forked from OSchip/llvm-project
[Concepts] Fix ConceptSpecializationExpr profiling crash
ConceptSpecializationExprs (CSEs) were being created with nullptr TemplateArgsAsWritten during TemplateTemplateParmDecl canonicalization, and we were relying on them during profiling which caused sporadic crashes in test/CXX/.../temp.arg.template/p3-2a.cpp introduced in D44352. Change profiling of CSEs to instead rely on the actual converted template arguments and concept named.
This commit is contained in:
parent
b08e8353a8
commit
8a34467460
|
@ -1335,9 +1335,9 @@ void StmtProfiler::VisitAtomicExpr(const AtomicExpr *S) {
|
|||
void StmtProfiler::VisitConceptSpecializationExpr(
|
||||
const ConceptSpecializationExpr *S) {
|
||||
VisitExpr(S);
|
||||
VisitDecl(S->getFoundDecl());
|
||||
VisitTemplateArguments(S->getTemplateArgsAsWritten()->getTemplateArgs(),
|
||||
S->getTemplateArgsAsWritten()->NumTemplateArgs);
|
||||
VisitDecl(S->getNamedConcept());
|
||||
for (const TemplateArgument &Arg : S->getTemplateArguments())
|
||||
VisitTemplateArgument(Arg);
|
||||
}
|
||||
|
||||
static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S,
|
||||
|
|
Loading…
Reference in New Issue