From: Chris Lattner Date: Thu, 29 Jan 2009 05:23:19 +0000 (+0000) Subject: Fix a wart that existed from before we had EXTWARN. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a360896d790ccb0b8dc393097ceea6a4b5e2436;p=clang Fix a wart that existed from before we had EXTWARN. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63272 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/clang.cpp b/Driver/clang.cpp index f5bb058d08..ca91fc682b 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -730,15 +730,6 @@ static void InitializeDiagnostics(Diagnostic &Diags) { if (!WarnImplicitFunctionDeclaration) Diags.setDiagnosticMapping(diag::warn_implicit_function_decl, diag::MAP_IGNORE); - - // If -pedantic-errors is set, turn extensions that warn by default into - // errors. - if (ErrorOnExtensions) { - Diags.setDiagnosticMapping(diag::warn_hex_escape_too_large, - diag::MAP_ERROR); - Diags.setDiagnosticMapping(diag::warn_octal_escape_too_large, - diag::MAP_ERROR); - } } //===----------------------------------------------------------------------===// diff --git a/include/clang/Basic/DiagnosticCommonKinds.def b/include/clang/Basic/DiagnosticCommonKinds.def index 1bdaf6ab3d..7386321537 100644 --- a/include/clang/Basic/DiagnosticCommonKinds.def +++ b/include/clang/Basic/DiagnosticCommonKinds.def @@ -75,9 +75,9 @@ DIAG(warn_implicit_function_decl, WARNING, "implicit declaration of function %0") DIAG(err_pp_I_dash_not_supported, ERROR, "-I- not supported, please use -iquote instead") -DIAG(warn_octal_escape_too_large, WARNING, +DIAG(warn_octal_escape_too_large, EXTWARN, "octal escape sequence out of range") -DIAG(warn_hex_escape_too_large, WARNING, +DIAG(warn_hex_escape_too_large, EXTWARN, "hex escape sequence out of range") DIAG(warn_pp_undef_identifier, WARNING, "%0 is not defined, evaluates to 0")