]> granicus.if.org Git - clang/commitdiff
By default, warn about commas at the end of an enumerator list in C++/C89.
authorDouglas Gregor <dgregor@apple.com>
Fri, 2 Jul 2010 16:17:01 +0000 (16:17 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 2 Jul 2010 16:17:01 +0000 (16:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107485 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticParseKinds.td
test/SemaCXX/overloaded-operator.cpp

index 63bd3f65a91face4bf4f657c6cdb736c653f6572..63f53a1aefefcdff0e78ea6914ffa05922105d6b 100644 (file)
@@ -51,7 +51,7 @@ 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 : Extension<
+def ext_enumerator_list_comma : ExtWarn<
   "commas at the end of enumerator lists are a %select{C99|C++0x}0-specific "
   "feature">;
 
index 24f7f66129ebd9b4564297e632701a8bf56b48ae..15d6605d0258703acd19c89765e344fd694a9f90 100644 (file)
@@ -293,7 +293,7 @@ void circ() {
 
 // PR5360: Arrays should lead to built-in candidates for subscript.
 typedef enum {
-  LastReg = 23,
+  LastReg = 23, // expected-warning{{commas at the end of enumerator lists are a C++0x-specific feature}}
 } Register;
 class RegAlloc {
   int getPriority(Register r) {