diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-10 09:31:37 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-10 09:31:37 +0000 |
commit | e451a7e7601d25bcad758bc8efd1cdeb6579254b (patch) | |
tree | cd59171f24cfc8bb5b68913b4ba38781ff408484 /lib/Basic/Warnings.cpp | |
parent | 5328ab0000298a379cf14b584e7d8be485d12363 (diff) |
Improve diagnostic mapping terminology
Diagnostic mappings are used to calculate the final severity of diagnostic
instances.
Detangle the implementation to reflect the terminology used in documentation
and bindings.
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Warnings.cpp')
-rw-r--r-- | lib/Basic/Warnings.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Basic/Warnings.cpp b/lib/Basic/Warnings.cpp index b09e69aeca..df72ef7186 100644 --- a/lib/Basic/Warnings.cpp +++ b/lib/Basic/Warnings.cpp @@ -106,8 +106,9 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, // Figure out how this option affects the warning. If -Wfoo, map the // diagnostic to a warning, if -Wno-foo, map it to ignore. - diag::Mapping Mapping = isPositive ? diag::MAP_WARNING : diag::MAP_IGNORE; - + diag::Severity Mapping = + isPositive ? diag::MAP_WARNING : diag::MAP_IGNORE; + // -Wsystem-headers is a special case, not driven by the option table. It // cannot be controlled with -Werror. if (Opt == "system-headers") { @@ -124,7 +125,7 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, Diags.setEnableAllWarnings(true); } else { Diags.setEnableAllWarnings(false); - Diags.setMappingToAllDiagnostics(diag::MAP_IGNORE); + Diags.setMappingForAllDiagnostics(diag::MAP_IGNORE); } } continue; |