[PATCH] Make Clang error on enum increment/decrement in C++

Richard Smith richard at metafoo.co.uk
Wed Aug 7 16:42:41 PDT 2013


  LGTM


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:4847
@@ -4846,1 +4846,3 @@
+def err_increment_decrement_enum : Error<
+  "cannot %select{decrement|increment}0 expression of type %1">;
 def err_catch_incomplete_ptr : Error<
----------------
Maybe "... of enum type %1"?


http://llvm-reviews.chandlerc.com/D1205



More information about the cfe-commits mailing list