Don't warn about -Wno-foo where foo is an unknown warning option. Explicitly

passing -Wunknown-warning-option will re-enable warnings about -Wno-foo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132570 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Beaumont-Gay 2011-06-03 18:30:50 +00:00
Родитель 0a62984eab
Коммит 5a4cca2cc5
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -281,6 +281,9 @@ def err_not_a_pch_file : Error<
def warn_unknown_warning_option : Warning<
"unknown warning option '%0'">,
InGroup<DiagGroup<"unknown-warning-option"> >;
def warn_unknown_negative_warning_option : Warning<
"unknown warning option '%0'">,
InGroup<DiagGroup<"unknown-warning-option"> >, DefaultIgnore;
def warn_unknown_warning_specifier : Warning<
"unknown %0 warning specifier: '%1'">,
InGroup<DiagGroup<"unknown-warning-option"> >;

Просмотреть файл

@ -123,6 +123,8 @@ void clang::ProcessWarningOptions(Diagnostic &Diags,
}
if (Diags.setDiagnosticGroupMapping(Opt, Mapping))
Diags.Report(diag::warn_unknown_warning_option) << ("-W" + Opt.str());
Diags.Report(isPositive ? diag::warn_unknown_warning_option :
diag::warn_unknown_negative_warning_option)
<< ("-W" + Opt.str());
}
}