
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
8 lines
213 B
C++
8 lines
213 B
C++
enum class AAA { X, Y, Z };
|
|
|
|
namespace N2 {
|
|
using enum AAA;
|
|
// RUN: %clang_cc1 -std=c++20 -fsyntax-only -code-completion-at=%s:4:14 %s | FileCheck -check-prefix=CHECK-CC1 %s
|
|
// CHECK-CC1: COMPLETION: AAA
|
|
};
|