[PATCH] D60956: [Sema] Fix the lookup for a declaration conflicting with an enumerator (bogus use of LookupResult::getAsSingle)

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 10:50:27 PDT 2019


riccibruno marked an inline comment as done.
riccibruno added inline comments.


================
Comment at: test/CXX/dcl.dcl/dcl.enum/p11-enumerator_scope.cpp:107
   enum { typedef_type };                // expected-error {{redefinition of 'typedef_type'}}
 };
 
----------------
Note also that this is just my interpretation, and I am not entirely confident that this is correct.

 As a data point GCC rejects `enum { t }` in the template and accepts the other two enumerators, and then in the instantiation rejects `enum { t }` and `enum { typedef_type }` but accepts `enum { type }` (presumably because it delays the check for the hiding rules to the instantiation).


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60956/new/

https://reviews.llvm.org/D60956





More information about the cfe-commits mailing list