r181494 - Put some diagnostics in DiagnosticCommonKinds.td in a category, mirroring what they are in other .td files.

Ted Kremenek kremenek at apple.com
Wed May 8 17:07:27 PDT 2013


Author: kremenek
Date: Wed May  8 19:07:27 2013
New Revision: 181494

URL: http://llvm.org/viewvc/llvm-project?rev=181494&view=rev
Log:
Put some diagnostics in DiagnosticCommonKinds.td in a category, mirroring what they are in other .td files.

I really dislike the copy-pasting of the category strings.  If there is a better
way to do this with TableGen, please advise.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td

Modified: cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td?rev=181494&r1=181493&r2=181494&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td Wed May  8 19:07:27 2013
@@ -37,6 +37,9 @@ def note_possibility : Note<"one possibi
 def note_also_found : Note<"also found">;
 
 // Parse && Lex
+
+let CategoryName = "Lexical or Preprocessor Issue" in {
+
 def err_expected_colon : Error<"expected ':'">;
 def err_expected_colon_after_setter_name : Error<
   "method name referenced in property setter attribute "
@@ -51,7 +54,12 @@ def err_invalid_character_udl : Error<
 def err_invalid_numeric_udl : Error<
   "numeric literal with user-defined suffix cannot be used here">;
 
+}
+
 // Parse && Sema
+
+let CategoryName = "Parse Issue" in {
+
 def err_param_redefinition : Error<"redefinition of parameter %0">;
 def warn_method_param_redefinition : Warning<"redefinition of method parameter %0">;
 def warn_method_param_declaration : Warning<"redeclaration of method parameter %0">,
@@ -79,6 +87,8 @@ def err_attribute_not_type_attr : Error<
   "%0 attribute cannot be applied to types">;
 def err_enum_template : Error<"enumeration cannot be a template">;
 
+}
+
 // Sema && Lex
 def ext_c99_longlong : Extension<
   "'long long' is an extension when C99 mode is not enabled">,





More information about the cfe-commits mailing list