Index: clang/include/clang/Basic/DiagnosticLexKinds.td =================================================================== --- clang/include/clang/Basic/DiagnosticLexKinds.td +++ clang/include/clang/Basic/DiagnosticLexKinds.td @@ -104,10 +104,10 @@ "raw string literals are incompatible with C++98">, InGroup, DefaultIgnore; -def ext_multichar_character_literal : ExtWarn< +def ext_multichar_character_literal : Warning< "multi-character character constant">, InGroup; -def ext_four_char_character_literal : Extension< - "multi-character character constant">, InGroup; +def ext_four_char_character_literal : Warning< + "multi-character character constant">, InGroup, DefaultIgnore; // Unicode and UCNs Index: clang/test/FixIt/format.m =================================================================== --- clang/test/FixIt/format.m +++ clang/test/FixIt/format.m @@ -177,7 +177,7 @@ // type-checker expects %c to correspond to an integer argument, because // many C library functions like fgetc() actually return an int (using -1 // as a sentinel). - NSLog(@"%c", 'abcd'); // missing-warning{{format specifies type 'char' but the argument has type 'int'}} + NSLog(@"%c", 'abcd'); // missing-warning{{format specifies type 'char' but the argument has type 'int'}} \ // CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%d" } Index: clang/test/Lexer/constants.c =================================================================== --- clang/test/Lexer/constants.c +++ clang/test/Lexer/constants.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -ftrigraphs %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wfour-char-constants -pedantic -ftrigraphs %s int x = 000000080; // expected-error {{invalid digit}} @@ -26,7 +26,7 @@ '\\ t', '??!', // expected-warning {{trigraph converted to '|' character}} - 'abcd' // expected-warning {{multi-character character constant}} + 'abcd' // expected-warning {{multi-character character constant}} }; // PR4499 @@ -36,15 +36,14 @@ int m3 = '\\\ '; - #pragma clang diagnostic ignored "-Wmultichar" int d = 'df'; // no warning. -int e = 'abcd'; // still warn: expected-warning {{multi-character character constant}} +int e = 'abcd'; // still warn: expected-warning {{multi-character character constant}} #pragma clang diagnostic ignored "-Wfour-char-constants" -int f = 'abcd'; // ignored. +int f = 'abcd'; // ignored. // rdar://problem/6974641 float t0[] = { Index: clang/test/Lexer/multi-char-constants.c =================================================================== --- /dev/null +++ clang/test/Lexer/multi-char-constants.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wfour-char-constants -pedantic-errors %s + +int x = 'ab'; // expected-warning {{multi-character character constant}} +int y = 'abcd'; // expected-warning {{multi-character character constant}} + +int main() { + return 0; +} +