summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang-c/Index.h6
-rw-r--r--clang/include/clang/Basic/Diagnostic.h1
-rw-r--r--clang/include/clang/Basic/Diagnostic.td3
-rw-r--r--clang/include/clang/Basic/DiagnosticFrontendKinds.td1
-rw-r--r--clang/include/clang/Basic/DiagnosticGroups.td1
-rw-r--r--clang/include/clang/Basic/DiagnosticIDs.h17
6 files changed, 21 insertions, 8 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index b77ddcb6c05..7eff0a4216a 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -653,6 +653,12 @@ enum CXDiagnosticSeverity {
CXDiagnostic_Note = 1,
/**
+ * \brief This diagnostic is a remark that provides additional information
+ * for the user.
+ */
+ CXDiagnostic_Remark = 5,
+
+ /**
* \brief This diagnostic indicates suspicious code that may not be
* wrong.
*/
diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h
index 6782964df66..d83c4c0b9b4 100644
--- a/clang/include/clang/Basic/Diagnostic.h
+++ b/clang/include/clang/Basic/Diagnostic.h
@@ -142,6 +142,7 @@ public:
enum Level {
Ignored = DiagnosticIDs::Ignored,
Note = DiagnosticIDs::Note,
+ Remark = DiagnosticIDs::Remark,
Warning = DiagnosticIDs::Warning,
Error = DiagnosticIDs::Error,
Fatal = DiagnosticIDs::Fatal
diff --git a/clang/include/clang/Basic/Diagnostic.td b/clang/include/clang/Basic/Diagnostic.td
index 2616548bc00..61a4508615e 100644
--- a/clang/include/clang/Basic/Diagnostic.td
+++ b/clang/include/clang/Basic/Diagnostic.td
@@ -15,6 +15,7 @@
// Define the diagnostic mappings.
class DiagMapping;
def MAP_IGNORE : DiagMapping;
+def MAP_REMARK : DiagMapping;
def MAP_WARNING : DiagMapping;
def MAP_ERROR : DiagMapping;
def MAP_FATAL : DiagMapping;
@@ -22,6 +23,7 @@ def MAP_FATAL : DiagMapping;
// Define the diagnostic classes.
class DiagClass;
def CLASS_NOTE : DiagClass;
+def CLASS_REMARK : DiagClass;
def CLASS_WARNING : DiagClass;
def CLASS_EXTENSION : DiagClass;
def CLASS_ERROR : DiagClass;
@@ -84,6 +86,7 @@ class AccessControl {
// FIXME: ExtWarn and Extension should also be SFINAEFailure by default.
class Error<string str> : Diagnostic<str, CLASS_ERROR, MAP_ERROR>, SFINAEFailure;
class Warning<string str> : Diagnostic<str, CLASS_WARNING, MAP_WARNING>;
+class Remark<string str> : Diagnostic<str, CLASS_REMARK, MAP_IGNORE>;
class Extension<string str> : Diagnostic<str, CLASS_EXTENSION, MAP_IGNORE>;
class ExtWarn<string str> : Diagnostic<str, CLASS_EXTENSION, MAP_WARNING>;
class Note<string str> : Diagnostic<str, CLASS_NOTE, MAP_FATAL/*ignored*/>;
diff --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
index 2b36d38a3f1..41a83a0b8ed 100644
--- a/clang/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -29,6 +29,7 @@ def note_fe_backend_frame_larger_than: Note<"%0">, CatBackend;
def warn_fe_backend_plugin: Warning<"%0">, CatBackend, InGroup<BackendPlugin>;
def err_fe_backend_plugin: Error<"%0">, CatBackend;
+def remark_fe_backend_plugin: Remark<"%0">, CatBackend, InGroup<RemarkBackendPlugin>;
def note_fe_backend_plugin: Note<"%0">, CatBackend;
def err_fe_invalid_code_complete_file : Error<
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 428363bcfc5..9ec2f421cda 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -637,3 +637,4 @@ def SourceUsesOpenMP : DiagGroup<"source-uses-openmp">;
def BackendInlineAsm : DiagGroup<"inline-asm">;
def BackendFrameLargerThan : DiagGroup<"frame-larger-than">;
def BackendPlugin : DiagGroup<"backend-plugin">;
+def RemarkBackendPlugin : DiagGroup<"remark-backend-plugin">;
diff --git a/clang/include/clang/Basic/DiagnosticIDs.h b/clang/include/clang/Basic/DiagnosticIDs.h
index 0152f25fa66..f9b845606bc 100644
--- a/clang/include/clang/Basic/DiagnosticIDs.h
+++ b/clang/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:
OpenPOWER on IntegriCloud