diff options
Diffstat (limited to 'clang/lib/Basic/Warnings.cpp')
-rw-r--r-- | clang/lib/Basic/Warnings.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Basic/Warnings.cpp b/clang/lib/Basic/Warnings.cpp index 2c909d9510d4..cc8c138233ca 100644 --- a/clang/lib/Basic/Warnings.cpp +++ b/clang/lib/Basic/Warnings.cpp @@ -130,11 +130,14 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, } // -Werror/-Wno-error is a special case, not controlled by the option - // table. It also has the "specifier" form of -Werror=foo and -Werror-foo. + // table. It also has the "specifier" form of -Werror=foo. GCC supports + // the deprecated -Werror-implicit-function-declaration which is used by + // a few projects. if (Opt.startswith("error")) { StringRef Specifier; if (Opt.size() > 5) { // Specifier must be present. - if ((Opt[5] != '=' && Opt[5] != '-') || Opt.size() == 6) { + if (Opt[5] != '=' && + Opt.substr(5) != "-implicit-function-declaration") { if (Report) Diags.Report(diag::warn_unknown_warning_specifier) << "-Werror" << ("-W" + OrigOpt.str()); |