Bowing to popular demand, reduce the "comma at end of enumerator list"

ExtWarn to an Extension. Let the broken code propagate!

llvm-svn: 107875
This commit is contained in:
Douglas Gregor 2010-07-08 14:54:42 +00:00
parent b5081aff68
commit f609386058
3 changed files with 3 additions and 4 deletions

View File

@ -38,7 +38,6 @@ def : DiagGroup<"disabled-optimization">;
def : DiagGroup<"discard-qual">;
def : DiagGroup<"div-by-zero">;
def EmptyBody : DiagGroup<"empty-body">;
def EnumeratorListComma : DiagGroup<"enumerator-list-comma">;
def ExtraTokens : DiagGroup<"extra-tokens">;
def FormatExtraArgs : DiagGroup<"format-extra-args">;

View File

@ -51,9 +51,9 @@ def ext_c99_variable_decl_in_for_loop : Extension<
"variable declaration in for loop is a C99-specific feature">;
def ext_c99_compound_literal : Extension<
"compound literals are a C99-specific feature">;
def ext_enumerator_list_comma : ExtWarn<
def ext_enumerator_list_comma : Extension<
"commas at the end of enumerator lists are a %select{C99|C++0x}0-specific "
"feature">, InGroup<EnumeratorListComma>;
"feature">;
def ext_gnu_indirect_goto : Extension<
"use of GNU indirect-goto extension">, InGroup<GNU>;

View File

@ -293,7 +293,7 @@ void circ() {
// PR5360: Arrays should lead to built-in candidates for subscript.
typedef enum {
LastReg = 23, // expected-warning{{commas at the end of enumerator lists are a C++0x-specific feature}}
LastReg = 23,
} Register;
class RegAlloc {
int getPriority(Register r) {