[all-commits] [llvm/llvm-project] 0bc993: [AST] [Modules] Introduce Decl::getNonTransparentD...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Thu Aug 11 20:51:57 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0bc993edf4ec57993c8fc11ea511b3d62ffd3c93
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M clang/include/clang/AST/DeclBase.h
    M clang/lib/AST/DeclBase.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    A clang/test/Modules/pr56826.cppm
    M clang/unittests/AST/DeclTest.cpp

  Log Message:
  [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

Closing https://github.com/llvm/llvm-project/issues/56826.

The root cause for pr56826 is: when we collect the template args for the
friend, we need to judge if the friend lives in file context. However,
if the friend lives in ExportDecl lexically, the judgement here is

The solution is easy. We should judge the non transparent context and
the ExportDecl is transparent context. So the solution should be good.

A main concern may be the patch doesn't handle all the places of the
same defect. I think it might not be bad since the patch itself should
be innocent.

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D131651

More information about the All-commits mailing list