зеркало из https://github.com/microsoft/clang-1.git
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:
Родитель
0a62984eab
Коммит
5a4cca2cc5
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче