]> granicus.if.org Git - clang/commitdiff
Document the Message parameter of getCustomDiagID()
authorAlp Toker <alp@nuanti.com>
Mon, 23 Dec 2013 21:00:35 +0000 (21:00 +0000)
committerAlp Toker <alp@nuanti.com>
Mon, 23 Dec 2013 21:00:35 +0000 (21:00 +0000)
A lot of callers have been using this facility incorrectly.

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

include/clang/Basic/Diagnostic.h
lib/Basic/DiagnosticIDs.cpp

index c057bdf634367c4106cb3ca453c790b7ee151208..4eb080601be45c6c51eb30f0faf30fedbfb2b2e6 100644 (file)
@@ -591,6 +591,9 @@ public:
   ///
   /// If this is the first request for this diagnostic, it is registered and
   /// created, otherwise the existing ID is returned.
+  ///
+  /// \param Message A fixed diagnostic format string that will be hashed and
+  /// mapped to a unique DiagID.
   unsigned getCustomDiagID(Level L, StringRef Message) {
     return Diags->getCustomDiagID((DiagnosticIDs::Level)L, Message);
   }
index 48e7317985e3d90a33f268e7466950db6c44e766..90d5ed00214c704785f6fb257f701cd1f80cca5c 100644 (file)
@@ -311,6 +311,9 @@ DiagnosticIDs::~DiagnosticIDs() {
 /// getCustomDiagID - Return an ID for a diagnostic with the specified message
 /// and level.  If this is the first request for this diagnostic, it is
 /// registered and created, otherwise the existing ID is returned.
+///
+/// \param Message A fixed diagnostic format string that will be hashed and
+/// mapped to a unique DiagID.
 unsigned DiagnosticIDs::getCustomDiagID(Level L, StringRef Message) {
   if (CustomDiagInfo == 0)
     CustomDiagInfo = new diag::CustomDiagInfo();