[all-commits] [llvm/llvm-project] 54be30: [Clang] Fix Sema::ClassifyName so that it classifi...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Tue Nov 29 10:39:37 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 54be300f7e0bc4edaf54e9289b2380bd210a37bc
      https://github.com/llvm/llvm-project/commit/54be300f7e0bc4edaf54e9289b2380bd210a37bc
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2022-11-29 (Tue, 29 Nov 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/SemaCXX/cxx20-using-enum.cpp

  Log Message:
  -----------
  [Clang] Fix Sema::ClassifyName so that it classifies EnumConstantDecl as NonType when they are brought into scope via using enum

Currently Sema::ClassifyName(...) in some cases when an enumerator is brought
into scope via using enum during lookup it can end up being classified as an
OverloadSet. It looks like this was never accounted for when using enum support
was implemented and we need to add a check to allow an EnumConstantDecl to be
classified as NonType even when it is a class member.

This fixes:
  https://github.com/llvm/llvm-project/issues/58057
  https://github.com/llvm/llvm-project/issues/59014
  https://github.com/llvm/llvm-project/issues/54746

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




More information about the All-commits mailing list