summaryrefslogtreecommitdiff
path: root/include/clang/Basic/DiagnosticIDs.h
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
commit9762c97158542eefece55517cd0ec92a84203df1 (patch)
tree4ed40fd78f067bb97849d1d4543dac140859f25b /include/clang/Basic/DiagnosticIDs.h
parent3e1970f112d12e61b46f1dd6ac997e1d0ea55c1e (diff)
downloadclang-9762c97158542eefece55517cd0ec92a84203df1.tar.gz
clang-9762c97158542eefece55517cd0ec92a84203df1.tar.bz2
clang-9762c97158542eefece55517cd0ec92a84203df1.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticIDs.h')
-rw-r--r--include/clang/Basic/DiagnosticIDs.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/clang/Basic/DiagnosticIDs.h b/include/clang/Basic/DiagnosticIDs.h
index 0152f25fa6..f9b845606b 100644
--- a/include/clang/Basic/DiagnosticIDs.h
+++ b/include/clang/Basic/DiagnosticIDs.h
@@ -56,16 +56,17 @@ namespace clang {
};
/// Enum values that allow the client to map NOTEs, WARNINGs, and EXTENSIONs
- /// to either MAP_IGNORE (nothing), MAP_WARNING (emit a warning), MAP_ERROR
- /// (emit as an error). It allows clients to map errors to
- /// MAP_ERROR/MAP_DEFAULT or MAP_FATAL (stop emitting diagnostics after this
- /// one).
+ /// to either MAP_IGNORE (nothing), MAP_REMARK (emit a remark), MAP_WARNING
+ /// (emit a warning), MAP_ERROR (emit as an error). It allows clients to
+ /// map errors to MAP_ERROR/MAP_DEFAULT or MAP_FATAL (stop emitting
+ /// diagnostics after this one).
enum Mapping {
// NOTE: 0 means "uncomputed".
MAP_IGNORE = 1, ///< Map this diagnostic to nothing, ignore it.
- MAP_WARNING = 2, ///< Map this diagnostic to a warning.
- MAP_ERROR = 3, ///< Map this diagnostic to an error.
- MAP_FATAL = 4 ///< Map this diagnostic to a fatal error.
+ MAP_REMARK = 2, ///< Map this diagnostic to a remark.
+ MAP_WARNING = 3, ///< Map this diagnostic to a warning.
+ MAP_ERROR = 4, ///< Map this diagnostic to an error.
+ MAP_FATAL = 5 ///< Map this diagnostic to a fatal error.
};
}
@@ -113,7 +114,7 @@ class DiagnosticIDs : public RefCountedBase<DiagnosticIDs> {
public:
/// \brief The level of the diagnostic, after it has been through mapping.
enum Level {
- Ignored, Note, Warning, Error, Fatal
+ Ignored, Note, Remark, Warning, Error, Fatal
};
private: