aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2014-02-28 09:11:08 +0000
committerTobias Grosser <tobias@grosser.es>2014-02-28 09:11:08 +0000
commit741602461d2079c682916bce6701c39acb08bbd3 (patch)
treee83731354fa81b3ece9f6f772f98ca5e2cc6ee87 /clang/tools/c-index-test/c-index-test.c
parente8d4c9a2c726e4847f791ec9c4d8593608699751 (diff)
downloadllvm-741602461d2079c682916bce6701c39acb08bbd3.zip
llvm-741602461d2079c682916bce6701c39acb08bbd3.tar.gz
llvm-741602461d2079c682916bce6701c39acb08bbd3.tar.bz2
Add 'remark' diagnostic type in 'clang'
A 'remark' is information that is not an error or a warning, but rather some additional information provided to the user. In contrast to a 'note' a 'remark' is an independent diagnostic, whereas a 'note' always depends on another diagnostic. A typical use case for remark nodes is information provided to the user, e.g. information provided by the vectorizer about loops that have been vectorized. This patch provides the initial implementation of 'remarks'. It includes the actual definiton of the remark nodes, their printing as well as basic parameter handling. We are reusing the existing diagnostic parameters which means a remark can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade remarks. This patch is by intention minimal in terms of parameter handling. More experience and more discussions will most likely lead to further enhancements in the parameter handling. llvm-svn: 202475
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r--clang/tools/c-index-test/c-index-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index defc916..22c0d97 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -3736,6 +3736,7 @@ static const char *getDiagnosticCodeStr(enum CXLoadDiag_Error error) {
static const char *getSeverityString(enum CXDiagnosticSeverity severity) {
switch (severity) {
case CXDiagnostic_Note: return "note";
+ case CXDiagnostic_Remark: return "remark";
case CXDiagnostic_Error: return "error";
case CXDiagnostic_Fatal: return "fatal";
case CXDiagnostic_Ignored: return "ignored";