[all-commits] [llvm/llvm-project] 3d2080: [clang][DR2621] using enum NAME lookup fix

Nathan Sidwell via All-commits all-commits at lists.llvm.org
Wed Sep 28 08:50:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d2080683f1dc37010fb56cf7d0e1632cda00f15
      https://github.com/llvm/llvm-project/commit/3d2080683f1dc37010fb56cf7d0e1632cda00f15
  Author: Nathan Sidwell <nathan at acm.org>
  Date:   2022-09-28 (Wed, 28 Sep 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/test/CXX/drs/dr26xx.cpp
    M clang/test/CodeCompletion/using-enum.cpp
    M clang/test/Parser/cxx20-using-enum.cpp
    M clang/test/SemaCXX/cxx20-using-enum.cpp

  Log Message:
  -----------
  [clang][DR2621] using enum NAME lookup fix

Although using-enum's grammar is 'using elaborated-enum-specifier',
the lookup for the enum is ordinary lookup (and not the tagged-type
lookup that normally occurs wth an tagged-type specifier).  Thus (a)
we can find typedefs and (b) do not find enum tags hidden by a non-tag
name (the struct stat thing).

This reimplements that part of using-enum handling, to address DR2621,
where clang's behaviour does not match std intent (and other
compilers).

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list