[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

Qizhi Hu via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 22:09:26 PDT 2024


================
@@ -4342,10 +4342,17 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
     InstantiatingTemplate Inst(*this, TemplateLoc, Template);
     if (Inst.isInvalid())
       return QualType();
+    if (!AliasTemplate->getDeclContext()->isFileContext()) {
+      ContextRAII SavedContext(*this, AliasTemplate->getDeclContext());
----------------
jcsxky wrote:

Looks more clear. Thanks for your guidance!

https://github.com/llvm/llvm-project/pull/83847


More information about the cfe-commits mailing list