its own deprecated diagnostics group so it can be
turned off selectively. // rdar://
8827606
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122967
91177308-0d34-0410-b5e6-
96231b3b80d8
def GNUDesignator : DiagGroup<"gnu-designator">;
def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">;
+def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings">;
def Deprecated : DiagGroup<"deprecated", [ DeprecatedDeclarations] >,
DiagCategory<"Deprecations">;
"array initializer must be an initializer "
"list%select{| or string literal}0">;
def warn_deprecated_string_literal_conversion : Warning<
- "conversion from string literal to %0 is deprecated">, InGroup<Deprecated>;
+ "conversion from string literal to %0 is deprecated">, InGroup<DeprecatedWritableStr>;
def err_realimag_invalid_type : Error<"invalid type %0 to %1 operator">;
def err_typecheck_sclass_fscope : Error<
"illegal storage class on file-scoped variable">;
--- /dev/null
+// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-writable-strings -verify %s
+// rdar://8827606
+
+char *fun(void)
+{
+ return "foo";
+}
+
+void test(bool b)
+{
+ ++b; // expected-warning {{incrementing expression of type bool is deprecated}}
+}