Implement clang_getDiagnosticCategoryText() to provide a way for a client of libclang to accurately
get the diagnostic category name from a serialized diagnostic when the version of libclang used
to read the diagnostic file is newer than the clang that emitted the diagnostic file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154567 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndexDiagnostic.h b/tools/libclang/CIndexDiagnostic.h
index 3066998..b1c3978 100644
--- a/tools/libclang/CIndexDiagnostic.h
+++ b/tools/libclang/CIndexDiagnostic.h
@@ -73,7 +73,10 @@
/// \brief Return the category of the diagnostic.
virtual unsigned getCategory() const = 0;
-
+
+ /// \brief Return the category string of the diagnostic.
+ virtual CXString getCategoryText() const = 0;
+
/// \brief Return the number of source ranges for the diagnostic.
virtual unsigned getNumRanges() const = 0;
@@ -132,6 +135,9 @@
/// \brief Return the category of the diagnostic.
virtual unsigned getCategory() const;
+ /// \brief Return the category string of the diagnostic.
+ virtual CXString getCategoryText() const;
+
/// \brief Return the number of source ranges for the diagnostic.
virtual unsigned getNumRanges() const;