[cfe-commits] r156192 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td utils/TableGen/ClangDiagnosticsEmitter.cpp

Richard Smith richard-llvm at metafoo.co.uk
Fri May 4 12:05:50 PDT 2012


Author: rsmith
Date: Fri May  4 14:05:50 2012
New Revision: 156192

URL: http://llvm.org/viewvc/llvm-project?rev=156192&view=rev
Log:
Remove DiagGroups from notes, and add a TableGen assertion to catch them.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=156192&r1=156191&r2=156192&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri May  4 14:05:50 2012
@@ -1328,10 +1328,8 @@
 def warn_delegating_ctor_cycle : Warning<
   "constructor for %0 creates a delegation cycle">, DefaultError,
   InGroup<DelegatingCtorCycles>;
-def note_it_delegates_to : Note<
-  "it delegates to">, InGroup<DelegatingCtorCycles>;
-def note_which_delegates_to : Note<
-  "which delegates to">, InGroup<DelegatingCtorCycles>;
+def note_it_delegates_to : Note<"it delegates to">;
+def note_which_delegates_to : Note<"which delegates to">;
 
 // C++11 range-based for loop
 def err_for_range_decl_must_be_var : Error<
@@ -1720,8 +1718,7 @@
   "mutex '%0' is locked exclusively and shared in the same scope">,
   InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
 def note_lock_exclusive_and_shared : Note<
-  "the other lock of mutex '%0' is here">,
-  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
+  "the other lock of mutex '%0' is here">;
 def warn_variable_requires_lock : Warning<
   "%select{reading|writing}2 variable '%0' requires locking "
   "%select{'%1'|'%1' exclusively}2">,
@@ -5299,8 +5296,7 @@
 def warn_empty_switch_body : Warning<
   "switch statement has empty body">, InGroup<EmptyBody>;
 def note_empty_body_on_separate_line : Note<
-  "put the semicolon on a separate line to silence this warning">,
-  InGroup<EmptyBody>;
+  "put the semicolon on a separate line to silence this warning">;
 
 def err_va_start_used_in_non_variadic_function : Error<
   "'va_start' used in function with fixed args">;

Modified: cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=156192&r1=156191&r2=156192&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp Fri May  4 14:05:50 2012
@@ -135,6 +135,8 @@
     const Record *R = Diags[i];
     DefInit *DI = dynamic_cast<DefInit*>(R->getValueInit("Group"));
     if (DI == 0) continue;
+    assert(R->getValueAsDef("Class")->getName() != "CLASS_NOTE" &&
+           "Note can't be in a DiagGroup");
     std::string GroupName = DI->getDef()->getValueAsString("GroupName");
     DiagsInGroup[GroupName].DiagsInGroup.push_back(R);
   }





More information about the cfe-commits mailing list