summaryrefslogtreecommitdiff
path: root/tools/libclang
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-04-26 14:43:53 +0000
committerAlp Toker <alp@nuanti.com>2014-04-26 14:43:53 +0000
commitdbc6d63bd5ffb866033822536d90ab57974cb224 (patch)
treebb922b52b662c7880ac62cceb9ad164e2687ab20 /tools/libclang
parent7129bf266e51bfcfac5d5aebe27a16e4e9b1972b (diff)
downloadclang-dbc6d63bd5ffb866033822536d90ab57974cb224.tar.gz
clang-dbc6d63bd5ffb866033822536d90ab57974cb224.tar.bz2
clang-dbc6d63bd5ffb866033822536d90ab57974cb224.tar.xz
libclang: remove 'CXDiagnostic_Remark'
The change was landed without review or test cases. It trivially broke almost any stable application checking for Severity >= CXDiagnostic_Error or indeed any other kind of severity comparison upon encountering a 'remark'. Mapped to CXDiagnostic_Warning until a workable solution is proposed to the list that preserves API stability. (It's also not clear why the rest of r202475 wasn't simply implemented as a modifier to the existing 'warning' level.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang')
-rw-r--r--tools/libclang/CIndexDiagnostic.cpp1
-rw-r--r--tools/libclang/CXLoadedDiagnostic.cpp3
-rw-r--r--tools/libclang/CXStoredDiagnostic.cpp3
3 files changed, 4 insertions, 3 deletions
diff --git a/tools/libclang/CIndexDiagnostic.cpp b/tools/libclang/CIndexDiagnostic.cpp
index cf9dc6f240..8a57d7dfff 100644
--- a/tools/libclang/CIndexDiagnostic.cpp
+++ b/tools/libclang/CIndexDiagnostic.cpp
@@ -308,7 +308,6 @@ CXString clang_formatDiagnostic(CXDiagnostic Diagnostic, unsigned Options) {
switch (Severity) {
case CXDiagnostic_Ignored: llvm_unreachable("impossible");
case CXDiagnostic_Note: Out << "note: "; break;
- case CXDiagnostic_Remark: Out << "remark: "; break;
case CXDiagnostic_Warning: Out << "warning: "; break;
case CXDiagnostic_Error: Out << "error: "; break;
case CXDiagnostic_Fatal: Out << "fatal error: "; break;
diff --git a/tools/libclang/CXLoadedDiagnostic.cpp b/tools/libclang/CXLoadedDiagnostic.cpp
index 679c528526..8385f242d4 100644
--- a/tools/libclang/CXLoadedDiagnostic.cpp
+++ b/tools/libclang/CXLoadedDiagnostic.cpp
@@ -79,8 +79,9 @@ CXDiagnosticSeverity CXLoadedDiagnostic::getSeverity() const {
CASE(Warning)
CASE(Error)
CASE(Fatal)
- CASE(Remark)
#undef CASE
+ // The 'Remark' level isn't represented in the stable API.
+ case serialized_diags::Remark: return CXDiagnostic_Warning;
}
llvm_unreachable("Invalid diagnostic level");
diff --git a/tools/libclang/CXStoredDiagnostic.cpp b/tools/libclang/CXStoredDiagnostic.cpp
index 45ce39b60d..faaf746a1e 100644
--- a/tools/libclang/CXStoredDiagnostic.cpp
+++ b/tools/libclang/CXStoredDiagnostic.cpp
@@ -31,7 +31,8 @@ CXDiagnosticSeverity CXStoredDiagnostic::getSeverity() const {
switch (Diag.getLevel()) {
case DiagnosticsEngine::Ignored: return CXDiagnostic_Ignored;
case DiagnosticsEngine::Note: return CXDiagnostic_Note;
- case DiagnosticsEngine::Remark: return CXDiagnostic_Remark;
+ case DiagnosticsEngine::Remark:
+ // The 'Remark' level isn't represented in the stable API.
case DiagnosticsEngine::Warning: return CXDiagnostic_Warning;
case DiagnosticsEngine::Error: return CXDiagnostic_Error;
case DiagnosticsEngine::Fatal: return CXDiagnostic_Fatal;