]> granicus.if.org Git - clang/commitdiff
Kill the brief and full explanation fields from StaticDiagInfoRec. They were unused...
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 9 Feb 2012 19:38:26 +0000 (19:38 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 9 Feb 2012 19:38:26 +0000 (19:38 +0000)
- per PR11952.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150199 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
include/clang/AST/ASTDiagnostic.h
include/clang/Analysis/AnalysisDiagnostic.h
include/clang/Basic/Diagnostic.td
include/clang/Basic/DiagnosticIDs.h
include/clang/Driver/DriverDiagnostic.h
include/clang/Frontend/FrontendDiagnostic.h
include/clang/Lex/LexDiagnostic.h
include/clang/Parse/ParseDiagnostic.h
include/clang/Sema/SemaDiagnostic.h
include/clang/Serialization/SerializationDiagnostic.h
lib/Basic/DiagnosticIDs.cpp
utils/TableGen/ClangDiagnosticsEmitter.cpp

index b0057113cf8eb939b7cebc27867ee9335cfffe11..6e3637200462f5c79dd9eef2e5d830eef7ee1f9a 100644 (file)
@@ -16,7 +16,7 @@ namespace clang {
   namespace diag {
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
 #define ASTSTART
 #include "clang/Basic/DiagnosticASTKinds.inc"
 #undef DIAG
index 16d31b476423b58462e0a971e09c69e0f658dcf2..d4e1f5fb69075b7c21c87c80374e2c54cf710ef8 100644 (file)
@@ -16,7 +16,7 @@ namespace clang {
   namespace diag {
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
 #define ANALYSISSTART
 #include "clang/Basic/DiagnosticAnalysisKinds.inc"
 #undef DIAG
index 068cf08a5a9338a77323ac00c85f368f5a86c4b7..109cd0812c6866d993fa48e7413b2dff4096d981 100644 (file)
@@ -62,8 +62,6 @@ class Diagnostic<string text, DiagClass DC, DiagMapping defaultmapping> {
   DiagMapping DefaultMapping = defaultmapping;
   DiagGroup   Group;
   string      CategoryName = "";
-  string      Brief = "";
-  string      Explanation = "";
 }
 
 class Error<string str>     : Diagnostic<str, CLASS_ERROR, MAP_ERROR>;
@@ -87,12 +85,6 @@ class DefaultWarnShowInSystemHeader {
 class NoSFINAE { bit SFINAE = 0; }
 class AccessControl { bit AccessControl = 1; }
 
-class Brief<string str> { string Brief = str; }
-class FullExplanation<string brief, string full> {
-  string Brief = brief;
-  string Explanation = full;
-}
-
 // Definitions for Diagnostics.
 include "DiagnosticASTKinds.td"
 include "DiagnosticAnalysisKinds.td"
index 40fc3a98be3779363cc7a6318954b682be7c5acc..b49a4f8bf4ead1e66e5c67ef8d2b70cbafeca6dc 100644 (file)
@@ -50,7 +50,7 @@ namespace clang {
     // Get typedefs for common diagnostics.
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,CATEGORY,NOWERROR,SHOWINSYSHEADER,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,CATEGORY,NOWERROR,SHOWINSYSHEADER) ENUM,
 #include "clang/Basic/DiagnosticCommonKinds.inc"
       NUM_BUILTIN_COMMON_DIAGNOSTICS
 #undef DIAG
@@ -229,14 +229,6 @@ public:
   /// getIdFromName - Given a diagnostic name, return its ID, or 0
   static unsigned getIdFromName(StringRef Name);
   
-  /// getBriefExplanation - Given a diagnostic ID, return a brief explanation
-  /// of the issue
-  static StringRef getBriefExplanation(unsigned DiagID);
-
-  /// getFullExplanation - Given a diagnostic ID, return a full explanation
-  /// of the issue
-  static StringRef getFullExplanation(unsigned DiagID);
-  
   /// Iterator class used for traversing all statically declared
   /// diagnostics.
   class diag_iterator {
index 844f918c1b2e96bb77c9bd000f25991fcab5a934..ea7b52f9cb726a59ff3ee3c846a868d8179a23cc 100644 (file)
@@ -16,7 +16,7 @@ namespace clang {
   namespace diag {
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
 #define DRIVERSTART
 #include "clang/Basic/DiagnosticDriverKinds.inc"
 #undef DIAG
index 21cd2c67910bd809f880bb2f8e3a6d9900273687..0b05b74b9cce15b577104ead7086dacd70327f37 100644 (file)
@@ -16,7 +16,7 @@ namespace clang {
   namespace diag {
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
 #define FRONTENDSTART
 #include "clang/Basic/DiagnosticFrontendKinds.inc"
 #undef DIAG
index f454e2309acbfdc43c5dd6a6a22cb11165685c27..41b93963a7eebfe634d3e0a657b04ac030b386da 100644 (file)
@@ -16,7 +16,7 @@ namespace clang {
   namespace diag {
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
 #define LEXSTART
 #include "clang/Basic/DiagnosticLexKinds.inc"
 #undef DIAG
index 0e76c614152fdc995a6e233b1f1aa9c9d71316d8..0d4729297057636e1152bc5ca30112d774afc803 100644 (file)
@@ -16,7 +16,7 @@ namespace clang {
   namespace diag {
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
 #define PARSESTART
 #include "clang/Basic/DiagnosticParseKinds.inc"
 #undef DIAG
index 2c4bf4b0d1b7d3ea21e5fa81be015824b9889f68..9605bf889a315745e6f02fad47b9952e4eb310c1 100644 (file)
@@ -16,7 +16,7 @@ namespace clang {
   namespace diag {
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
 #define SEMASTART
 #include "clang/Basic/DiagnosticSemaKinds.inc"
 #undef DIAG
index 796a3282b5b0ec4b27ff587a033b4ee109f719c1..e63f814ee6a05ac3a105978513ea3009905b5f4b 100644 (file)
@@ -16,7 +16,7 @@ namespace clang {
   namespace diag {
     enum {
 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY,BRIEF,FULL) ENUM,
+             SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
 #define SERIALIZATIONSTART
 #include "clang/Basic/DiagnosticSerializationKinds.inc"
 #undef DIAG
index 1e8f44d56ddc4844c075c5370d36158708cc047b..6c15e259092a67549ad607d0f54ac93340b9a425 100644 (file)
@@ -56,15 +56,11 @@ struct StaticDiagInfoRec {
   uint8_t  OptionGroupLen;
 
   uint16_t DescriptionLen;
-  uint16_t BriefExplanationLen;
-  uint16_t FullExplanationLen;
 
   const char *NameStr;
   const char *OptionGroupStr;
 
   const char *DescriptionStr;
-  const char *BriefExplanationStr;
-  const char *FullExplanationStr;
 
   StringRef getName() const {
     return StringRef(NameStr, NameLen);
@@ -76,12 +72,6 @@ struct StaticDiagInfoRec {
   StringRef getDescription() const {
     return StringRef(DescriptionStr, DescriptionLen);
   }
-  StringRef getBriefExplanation() const {
-    return StringRef(BriefExplanationStr, BriefExplanationLen);
-  }
-  StringRef getFullExplanation() const {
-    return StringRef(FullExplanationStr, FullExplanationLen);
-  }
 
   bool operator<(const StaticDiagInfoRec &RHS) const {
     return DiagID < RHS.DiagID;
@@ -120,13 +110,12 @@ public:
 static const StaticDiagInfoRec StaticDiagInfo[] = {
 #define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC,GROUP,               \
              SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER,              \
-             CATEGORY,BRIEF,FULL)                                 \
+             CATEGORY)                                            \
   { diag::ENUM, DEFAULT_MAPPING, CLASS, SFINAE, ACCESS,           \
     NOWERROR, SHOWINSYSHEADER, CATEGORY,                          \
     STR_SIZE(#ENUM, uint8_t), STR_SIZE(GROUP, uint8_t),           \
-    STR_SIZE(DESC, uint16_t), STR_SIZE(BRIEF, uint16_t),          \
-    STR_SIZE(FULL, uint16_t),                                     \
-    #ENUM, GROUP, DESC, BRIEF, FULL },
+    STR_SIZE(DESC, uint16_t),                                     \
+    #ENUM, GROUP, DESC },
 #include "clang/Basic/DiagnosticCommonKinds.inc"
 #include "clang/Basic/DiagnosticDriverKinds.inc"
 #include "clang/Basic/DiagnosticFrontendKinds.inc"
@@ -137,7 +126,7 @@ static const StaticDiagInfoRec StaticDiagInfo[] = {
 #include "clang/Basic/DiagnosticSemaKinds.inc"
 #include "clang/Basic/DiagnosticAnalysisKinds.inc"
 #undef DIAG
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
 };
 
 static const unsigned StaticDiagInfoSize =
@@ -175,7 +164,7 @@ static const StaticDiagInfoRec *GetDiagInfo(unsigned DiagID) {
 
   // Search the diagnostic table with a binary search.
   StaticDiagInfoRec Find = { static_cast<unsigned short>(DiagID),
-                             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+                             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
   const StaticDiagInfoRec *Found =
     std::lower_bound(StaticDiagInfo, StaticDiagInfo + StaticDiagInfoSize, Find);
@@ -325,22 +314,6 @@ unsigned DiagnosticIDs::getIdFromName(StringRef Name) {
   return Found->DiagID;
 }
 
-/// getBriefExplanation - Given a diagnostic ID, return a brief explanation
-/// of the issue
-StringRef DiagnosticIDs::getBriefExplanation(unsigned DiagID) {
-  if (const StaticDiagInfoRec *Info = GetDiagInfo(DiagID))
-    return Info->getBriefExplanation();
-  return StringRef();
-}
-
-/// getFullExplanation - Given a diagnostic ID, return a full explanation
-/// of the issue
-StringRef DiagnosticIDs::getFullExplanation(unsigned DiagID) {
-  if (const StaticDiagInfoRec *Info = GetDiagInfo(DiagID))
-    return Info->getFullExplanation();
-  return StringRef();
-}
-
 /// getBuiltinDiagClass - Return the class field of the diagnostic.
 ///
 static unsigned getBuiltinDiagClass(unsigned DiagID) {
index 8240360009776c0fbb3c7e1f8b45423d222b1a00..c754ef15af77c6ad6a00afcc176f6bc7623dc4d3 100644 (file)
@@ -194,14 +194,6 @@ void ClangDiagsDefsEmitter::run(raw_ostream &OS) {
   
     // Category number.
     OS << ", " << CategoryIDs.getID(getDiagnosticCategory(&R, DGParentMap));
-
-    // Brief
-    OS << ", \"";
-    OS.write_escaped(R.getValueAsString("Brief")) << '"';
-
-    // Explanation 
-    OS << ", \"";
-    OS.write_escaped(R.getValueAsString("Explanation")) << '"';
     OS << ")\n";
   }
 }