llvm-project/clang/test/CXX/drs
Richard Smith c90e198107 Fix parsing of enum-base to follow C++11 rules.
Previously we implemented non-standard disambiguation rules to
distinguish an enum-base from a bit-field but otherwise treated a :
after an elaborated-enum-specifier as introducing an enum-base. That
misparses various examples (anywhere an elaborated-type-specifier can
appear followed by a colon, such as within a ternary operator or
_Generic).

We now implement the C++11 rules, with the old cases accepted as
extensions where that seemed reasonable. These amount to:
 * an enum-base must always be accompanied by an enum definition (except
   in a standalone declaration of the form 'enum E : T;')
 * in a member-declaration, 'enum E :' always introduces an enum-base,
   never a bit-field
 * in a type-specifier (or similar context), 'enum E :' is not
   permitted; the colon means whatever else it would mean in that
   context.

Fixed underlying types for enums are also permitted in Objective-C and
under MS extensions, plus as a language extension in all other modes.
The behavior in ObjC and MS extensions modes is unchanged (but the
bit-field disambiguation is a bit better); remaining language modes
follow the C++11 rules.

Fixes PR45726, PR39979, PR19810, PR44941, and most of PR24297, plus C++
core issues 1514 and 1966.
2020-05-08 19:32:00 -07:00
..
dr0xx.cpp Add missing diagnostic for explicit instantiation declarations naming 2019-04-26 01:51:07 +00:00
dr1xx.cpp When diagnosing the lack of a viable conversion function, also list 2020-01-09 15:15:02 -08:00
dr2xx.cpp Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang 2020-02-18 16:16:37 -08:00
dr3xx.cpp [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
dr4xx.cpp PR45142: 'template ~X<T>' is ill-formed; reject it rather than crashing. 2020-03-23 15:07:06 -07:00
dr5xx.cpp DR674, PR38883, PR40238: Qualified friend lookup should look for a 2019-01-07 06:00:46 +00:00
dr6xx.cpp Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang 2020-02-18 16:16:37 -08:00
dr7xx.cpp [MS] Consder constexpr globals to be inline, as in C++17 2019-09-11 18:09:10 +00:00
dr9xx.cpp
dr10xx.cpp When substituting previously-checked template arguments into a template 2018-03-08 01:07:33 +00:00
dr11xx.cpp
dr12xx.cpp DR1213: Ignore implicit conversions when determining if an operand of an 2018-06-27 20:29:32 +00:00
dr13xx.cpp Always deduce the lengths of contained parameter packs when deducing a 2020-01-06 17:24:29 -08:00
dr14xx.cpp CWG1423: don't permit implicit conversion of nullptr_t to bool. 2020-02-11 06:52:45 -08:00
dr15xx.cpp Fix parsing of enum-base to follow C++11 rules. 2020-05-08 19:32:00 -07:00
dr16xx.cpp When diagnosing an ambiguity, only note the candidates that contribute 2019-10-24 14:58:29 -07:00
dr17xx.cpp DR1753: Don't permit x.NS::~T() as a pseudo-destructor name. 2020-01-24 18:53:50 -08:00
dr18xx.cpp [c++20] P1064R0: Allow virtual function calls in constant expression 2019-05-13 23:35:21 +00:00
dr19xx.cpp Fix parsing of enum-base to follow C++11 rules. 2020-05-08 19:32:00 -07:00
dr20xx.cpp C++ DR2026: static storage duration variables are not zeroed before 2020-02-06 16:37:22 -08:00
dr21xx.cpp Fix parsing of enum-base to follow C++11 rules. 2020-05-08 19:32:00 -07:00
dr22xx.cpp Fix handling of class member access into a vector type. 2019-08-14 22:57:50 +00:00
dr23xx.cpp CWG2352: Allow qualification conversions during reference binding. 2020-01-09 18:24:06 -08:00
dr118.cpp
dr158.cpp
dr412.cpp
dr1748.cpp