[cfe-commits] r107485 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td test/SemaCXX/overloaded-operator.cpp
Douglas Gregor
dgregor at apple.com
Fri Jul 2 09:17:01 PDT 2010
Author: dgregor
Date: Fri Jul 2 11:17:01 2010
New Revision: 107485
URL: http://llvm.org/viewvc/llvm-project?rev=107485&view=rev
Log:
By default, warn about commas at the end of an enumerator list in C++/C89.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
cfe/trunk/test/SemaCXX/overloaded-operator.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=107485&r1=107484&r2=107485&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Fri Jul 2 11:17:01 2010
@@ -51,7 +51,7 @@
"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">;
Modified: cfe/trunk/test/SemaCXX/overloaded-operator.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/overloaded-operator.cpp?rev=107485&r1=107484&r2=107485&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/overloaded-operator.cpp (original)
+++ cfe/trunk/test/SemaCXX/overloaded-operator.cpp Fri Jul 2 11:17:01 2010
@@ -293,7 +293,7 @@
// 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) {
More information about the cfe-commits
mailing list