r186722 - Remove trailing whitespace

Craig Topper craig.topper at gmail.com
Fri Jul 19 14:43:59 PDT 2013


Author: ctopper
Date: Fri Jul 19 16:43:59 2013
New Revision: 186722

URL: http://llvm.org/viewvc/llvm-project?rev=186722&view=rev
Log:
Remove trailing whitespace

Modified:
    cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp

Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=186722&r1=186721&r2=186722&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Fri Jul 19 16:43:59 2013
@@ -51,7 +51,7 @@ public:
         Mapping[SubGroups[j]].push_back(DiagGroups[i]);
     }
   }
-  
+
   const std::vector<Record*> &getParents(const Record *Group) {
     return Mapping[Group];
   }
@@ -64,7 +64,7 @@ getCategoryFromDiagGroup(const Record *G
   // If the DiagGroup has a category, return it.
   std::string CatName = Group->getValueAsString("CategoryName");
   if (!CatName.empty()) return CatName;
-  
+
   // The diag group may the subgroup of one or more other diagnostic groups,
   // check these for a category as well.
   const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group);
@@ -99,29 +99,29 @@ namespace {
   public:
     DiagCategoryIDMap(RecordKeeper &records) : Records(records) {
       DiagGroupParentMap ParentInfo(Records);
-      
+
       // The zero'th category is "".
       CategoryStrings.push_back("");
       CategoryIDs[""] = 0;
-      
+
       std::vector<Record*> Diags =
       Records.getAllDerivedDefinitions("Diagnostic");
       for (unsigned i = 0, e = Diags.size(); i != e; ++i) {
         std::string Category = getDiagnosticCategory(Diags[i], ParentInfo);
         if (Category.empty()) continue;  // Skip diags with no category.
-        
+
         unsigned &ID = CategoryIDs[Category];
         if (ID != 0) continue;  // Already seen.
-        
+
         ID = CategoryStrings.size();
         CategoryStrings.push_back(Category);
       }
     }
-    
+
     unsigned getID(StringRef CategoryString) {
       return CategoryIDs[CategoryString];
     }
-    
+
     typedef std::vector<std::string>::iterator iterator;
     iterator begin() { return CategoryStrings.begin(); }
     iterator end() { return CategoryStrings.end(); }
@@ -198,7 +198,7 @@ static void groupDiagnostics(const std::
     for (unsigned j = 0, e = SubGroups.size(); j != e; ++j)
       GI.SubGroups.push_back(SubGroups[j]->getValueAsString("GroupName"));
   }
-  
+
   // Assign unique ID numbers to the groups.
   unsigned IDNo = 0;
   for (std::map<std::string, GroupInfo>::iterator
@@ -505,7 +505,7 @@ void EmitClangDiagsDefs(RecordKeeper &Re
 
   for (unsigned i = 0, e = Diags.size(); i != e; ++i) {
     const Record &R = *Diags[i];
-    
+
     // Check if this is an error that is accidentally in a warning
     // group.
     if (isError(R)) {
@@ -524,11 +524,11 @@ void EmitClangDiagsDefs(RecordKeeper &Re
     OS << "DIAG(" << R.getName() << ", ";
     OS << R.getValueAsDef("Class")->getName();
     OS << ", diag::" << R.getValueAsDef("DefaultMapping")->getName();
-    
+
     // Description string.
     OS << ", \"";
     OS.write_escaped(R.getValueAsString("Text")) << '"';
-    
+
     // Warning associated with the diagnostic. This is stored as an index into
     // the alphabetically sorted warning table.
     if (DefInit *DI = dyn_cast<DefInit>(R.getValueInit("Group"))) {
@@ -565,14 +565,14 @@ void EmitClangDiagsDefs(RecordKeeper &Re
         OS << ", true";
       else
         OS << ", false";
-  
+
       // Default warning show in system header bit.
       if (R.getValueAsBit("WarningShowInSystemHeader"))
         OS << ", true";
       else
         OS << ", false";
     }
-  
+
     // Category number.
     OS << ", " << CategoryIDs.getID(getDiagnosticCategory(&R, DGParentMap));
     OS << ")\n";
@@ -592,7 +592,7 @@ static std::string getDiagCategoryEnum(l
     enumName += isalnum(*I) ? *I : '_';
   return enumName.str();
 }
-  
+
 namespace clang {
 void EmitClangDiagGroups(RecordKeeper &Records, raw_ostream &OS) {
   // Compute a mapping from a DiagGroup to all of its parents.
@@ -600,7 +600,7 @@ void EmitClangDiagGroups(RecordKeeper &R
 
   std::vector<Record*> Diags =
     Records.getAllDerivedDefinitions("Diagnostic");
-  
+
   std::vector<Record*> DiagGroups
     = Records.getAllDerivedDefinitions("DiagGroup");
 
@@ -636,7 +636,7 @@ void EmitClangDiagGroups(RecordKeeper &R
       }
       OS << "-1 };\n";
     }
-    
+
     const std::vector<std::string> &SubGroups = I->second.SubGroups;
     if (!SubGroups.empty() || (IsPedantic && !GroupsInPedantic.empty())) {
       OS << "static const short DiagSubGroup" << I->second.IDNo << "[] = { ";
@@ -662,7 +662,7 @@ void EmitClangDiagGroups(RecordKeeper &R
     }
   }
   OS << "#endif // GET_DIAG_ARRAYS\n\n";
-  
+
   // Emit the table now.
   OS << "\n#ifdef GET_DIAG_TABLE\n";
   for (std::map<std::string, GroupInfo>::iterator
@@ -689,7 +689,7 @@ void EmitClangDiagGroups(RecordKeeper &R
       OS << "0, ";
     else
       OS << "DiagArray" << I->second.IDNo << ", ";
-    
+
     // Subgroups.
     const bool hasSubGroups = !I->second.SubGroups.empty() ||
                               (IsPedantic && !GroupsInPedantic.empty());
@@ -700,7 +700,7 @@ void EmitClangDiagGroups(RecordKeeper &R
     OS << " },\n";
   }
   OS << "#endif // GET_DIAG_TABLE\n\n";
-  
+
   // Emit the category table next.
   DiagCategoryIDMap CategoriesByID(Records);
   OS << "\n#ifdef GET_CATEGORY_TABLE\n";
@@ -721,18 +721,18 @@ struct RecordIndexElement
   RecordIndexElement() {}
   explicit RecordIndexElement(Record const &R):
     Name(R.getName()) {}
-  
+
   std::string Name;
 };
 
 struct RecordIndexElementSorter :
   public std::binary_function<RecordIndexElement, RecordIndexElement, bool> {
-  
+
   bool operator()(RecordIndexElement const &Lhs,
                   RecordIndexElement const &Rhs) const {
     return Lhs.Name < Rhs.Name;
   }
-  
+
 };
 
 } // end anonymous namespace.
@@ -741,19 +741,19 @@ namespace clang {
 void EmitClangDiagsIndexName(RecordKeeper &Records, raw_ostream &OS) {
   const std::vector<Record*> &Diags =
     Records.getAllDerivedDefinitions("Diagnostic");
-  
+
   std::vector<RecordIndexElement> Index;
   Index.reserve(Diags.size());
   for (unsigned i = 0, e = Diags.size(); i != e; ++i) {
-    const Record &R = *(Diags[i]);    
+    const Record &R = *(Diags[i]);
     Index.push_back(RecordIndexElement(R));
   }
-  
+
   std::sort(Index.begin(), Index.end(), RecordIndexElementSorter());
-  
+
   for (unsigned i = 0, e = Index.size(); i != e; ++i) {
     const RecordIndexElement &R = Index[i];
-    
+
     OS << "DIAG_NAME_INDEX(" << R.Name << ")\n";
   }
 }





More information about the cfe-commits mailing list