aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-02 16:17:01 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-02 16:17:01 +0000
commitfe2dd6ceeeb31a7c681b2873a8459c5de5d1a3e9 (patch)
treeb749a04dfef914ee24678fc5afabea075096dfb5
parent91468328268f8be076c399e8482ec3cf98fe90cc (diff)
By default, warn about commas at the end of an enumerator list in C++/C89.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107485 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticParseKinds.td2
-rw-r--r--test/SemaCXX/overloaded-operator.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td
index 63bd3f65a9..63f53a1aef 100644
--- a/include/clang/Basic/DiagnosticParseKinds.td
+++ b/include/clang/Basic/DiagnosticParseKinds.td
@@ -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">;
diff --git a/test/SemaCXX/overloaded-operator.cpp b/test/SemaCXX/overloaded-operator.cpp
index 24f7f66129..15d6605d02 100644
--- a/test/SemaCXX/overloaded-operator.cpp
+++ b/test/SemaCXX/overloaded-operator.cpp
@@ -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) {