[all-commits] [llvm/llvm-project] d9d63f: [AST] lookup in parent DeclContext for transparent...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Mon Jan 10 18:17:21 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9d63fc1088c22129cde9c3d3a84f356c875190e
      https://github.com/llvm/llvm-project/commit/d9d63fc1088c22129cde9c3d3a84f356c875190e
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2022-01-11 (Tue, 11 Jan 2022)

  Changed paths:
    M clang/lib/AST/DeclBase.cpp
    A clang/test/Modules/Inputs/template_name_lookup/foo.cppm
    A clang/test/Modules/template_name_lookup.cpp
    A clang/test/SemaCXX/lookup-template-name-extern-CXX.cpp

  Log Message:
  -----------
  [AST] lookup in parent DeclContext for transparent DeclContext

The compiler would crash if we lookup for name in transparent decl
context. See the tests attached for example.

I think this should make sense since the member declared in transparent
DeclContext are semantically defined in the enclosing (non-transparent)
DeclContext, this is the definition for transparent DeclContext.

Reviewed By: erichkeane

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




More information about the All-commits mailing list