summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-05-04 20:51:19 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-05-04 20:51:19 +0000
commit7e411337c0ed226dace6e07f1420486768161308 (patch)
tree938fcb7c80a0402925b5b00fa684a245ab0936a5 /include/clang/Basic
parent8aaf5818a64e9f7687798852af5945b053c68a54 (diff)
downloadFreeBSD-src-7e411337c0ed226dace6e07f1420486768161308.zip
FreeBSD-src-7e411337c0ed226dace6e07f1420486768161308.tar.gz
Update clang to r103052.
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/Diagnostic.h6
-rw-r--r--include/clang/Basic/Diagnostic.td8
-rw-r--r--include/clang/Basic/DiagnosticGroups.td10
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
4 files changed, 17 insertions, 9 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index bf94af6..6b2912e 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -60,7 +60,7 @@ namespace clang {
// Get typedefs for common diagnostics.
enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM,
#include "clang/Basic/DiagnosticCommonKinds.inc"
NUM_BUILTIN_COMMON_DIAGNOSTICS
#undef DIAG
@@ -283,13 +283,13 @@ public:
void setTemplateBacktraceLimit(unsigned Limit) {
TemplateBacktraceLimit = Limit;
}
-
+
/// \brief Retrieve the maximum number of template instantiation
/// nodes to emit along with a given diagnostic.
unsigned getTemplateBacktraceLimit() const {
return TemplateBacktraceLimit;
}
-
+
/// setIgnoreAllWarnings - When set to true, any unmapped warnings are
/// ignored. If this and WarningsAsErrors are both set, then this one wins.
void setIgnoreAllWarnings(bool Val) { IgnoreAllWarnings = Val; }
diff --git a/include/clang/Basic/Diagnostic.td b/include/clang/Basic/Diagnostic.td
index 6aa3b43..f6b5d9c 100644
--- a/include/clang/Basic/Diagnostic.td
+++ b/include/clang/Basic/Diagnostic.td
@@ -26,10 +26,17 @@ def CLASS_WARNING : DiagClass;
def CLASS_EXTENSION : DiagClass;
def CLASS_ERROR : DiagClass;
+// Diagnostic Categories. These can be applied to groups or individual
+// diagnostics to specify a category.
+class DiagCategory<string Name> {
+ string CategoryName = Name;
+}
+
// Diagnostic Groups.
class DiagGroup<string Name, list<DiagGroup> subgroups = []> {
string GroupName = Name;
list<DiagGroup> SubGroups = subgroups;
+ string CategoryName = "";
}
class InGroup<DiagGroup G> { DiagGroup Group = G; }
//class IsGroup<string Name> { DiagGroup Group = DiagGroup<Name>; }
@@ -48,6 +55,7 @@ class Diagnostic<string text, DiagClass DC, DiagMapping defaultmapping> {
bit SFINAE = 1;
DiagMapping DefaultMapping = defaultmapping;
DiagGroup Group;
+ string CategoryName = "";
}
class Error<string str> : Diagnostic<str, CLASS_ERROR, MAP_ERROR>;
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index c74a48c..1012e91 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -15,8 +15,6 @@ def Implicit : DiagGroup<"implicit", [
ImplicitFunctionDeclare,
ImplicitInt
]>;
-
-
// Empty DiagGroups are recognized by clang but ignored.
def : DiagGroup<"address">;
@@ -102,7 +100,7 @@ def : DiagGroup<"strict-prototypes">;
def : DiagGroup<"strict-selector-match">;
def SwitchEnum : DiagGroup<"switch-enum">;
def Switch : DiagGroup<"switch", [SwitchEnum]>;
-def Trigraphs : DiagGroup<"trigraphs">;
+def Trigraphs : DiagGroup<"trigraphs">;
def : DiagGroup<"type-limits">;
def Uninitialized : DiagGroup<"uninitialized">;
@@ -135,7 +133,8 @@ def Parentheses : DiagGroup<"parentheses", [DiagGroup<"idiomatic-parentheses">]>
// -Wconversion has its own warnings, but we split this one out for
// legacy reasons.
def Conversion : DiagGroup<"conversion",
- [DiagGroup<"shorten-64-to-32">]>;
+ [DiagGroup<"shorten-64-to-32">]>,
+ DiagCategory<"Value Conversion">;
def Unused : DiagGroup<"unused",
[UnusedArgument, UnusedFunction, UnusedLabel,
@@ -143,7 +142,8 @@ def Unused : DiagGroup<"unused",
UnusedValue, UnusedVariable]>;
// Format settings.
-def Format : DiagGroup<"format", [FormatExtraArgs, FormatZeroLength, NonNull]>;
+def Format : DiagGroup<"format", [FormatExtraArgs, FormatZeroLength, NonNull]>,
+ DiagCategory<"Format String">;
def FormatSecurity : DiagGroup<"format-security", [Format]>;
def FormatNonLiteral : DiagGroup<"format-nonliteral", [FormatSecurity]>;
def FormatY2K : DiagGroup<"format-y2k", [Format]>;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 93ab858..6b40820 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1457,7 +1457,7 @@ def note_template_default_arg_checking : Note<
"while checking a default template argument used here">;
def note_instantiation_contexts_suppressed : Note<
"(skipping %0 context%s0 in backtrace; use -ftemplate-backtrace-limit=0 to "
- "see all)">;
+ "see all)">;
def err_field_instantiates_to_function : Error<
"data member instantiated with function type %0">;
OpenPOWER on IntegriCloud