Commit Graph

2 Commits

Author SHA1 Message Date
Nathan Sidwell 3d2080683f [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
2022-09-28 08:50:27 -07:00
Sam McCall 30b676ac5f Don't crash when code completing `using enum ^Foo`.
Fixes https://github.com/clangd/clangd/issues/1281

Differential Revision: https://reviews.llvm.org/D134243
2022-09-26 04:52:19 +02:00