diff options
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index 1f762ca..7b05e4c 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -1271,6 +1271,12 @@ void Sema::PrintInstantiationStack(InstantiationContextDiagFuncRef DiagFunc) { PDiag(diag::note_building_deduction_guide_here)); break; case CodeSynthesisContext::TypeAliasTemplateInstantiation: + // Workaround for a workaround: don't produce a note if we are merely + // instantiating some other template which contains this alias template. + // This would be redundant either with the error itself, or some other + // context note attached to it. + if (Active->NumTemplateArgs == 0) + break; DiagFunc(Active->PointOfInstantiation, PDiag(diag::note_template_type_alias_instantiation_here) << cast<TypeAliasTemplateDecl>(Active->Entity) |