Mercurial > hg > CbC > CbC_llvm
diff clang/lib/Basic/Warnings.cpp @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line diff
--- a/clang/lib/Basic/Warnings.cpp Mon May 25 11:55:54 2020 +0900 +++ b/clang/lib/Basic/Warnings.cpp Tue Jun 08 06:07:14 2021 +0900 @@ -130,11 +130,14 @@ } // -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());