From: Eli Friedman Date: Wed, 1 Apr 2009 02:59:02 +0000 (+0000) Subject: Follow gcc's example and warn by default on unknown escapes. Inspired X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aec5cabee22888bbc052585bfcfa11eb1d1478cb;p=clang Follow gcc's example and warn by default on unknown escapes. Inspired by mailing list message about "\phello" style strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68180 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 087e0c63bc..74a1b5903a 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -50,7 +50,7 @@ def err_invalid_character_to_charify : Error< // Literal def ext_nonstandard_escape : Extension< "use of non-standard escape character '\\%0'">; -def ext_unknown_escape : Extension<"unknown escape sequence '\\%0'">; +def ext_unknown_escape : ExtWarn<"unknown escape sequence '\\%0'">; def err_hex_escape_no_digits : Error<"\\x used with no following hex digits">; def err_ucn_escape_no_digits : Error<"\\u used with no following hex digits">; def err_ucn_escape_invalid : Error<"invalid universal character">;