On 26/01/2014 06:41, Rafael Espíndola wrote:
-  /// \brief Return an ID for a diagnostic with the specified message and 
level.
+  /// \brief Return an ID for a diagnostic with the specified format string 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 getCustomDiagID(Level L, StringRef Message) {
-    return Diags->getCustomDiagID((DiagnosticIDs::Level)L, Message);
+  template <unsigned N>
+  unsigned getCustomDiagID(Level L, const char (&FormatString)[N]) {
+    return Diags->getCustomDiagID((DiagnosticIDs::Level)L,
+                                  StringRef(FormatString, N));
    }
This now warns:

/home/espindola/llvm/llvm/tools/clang/include/clang/Basic/Diagnostic.h:596:14:
warning: parameter 'Message' not found in the function declaration
[-Wdocumentation]
   /// \param Message A fixed diagnostic format string that will be hashed and
              ^~~~~~~
1 warning generated.

Docstrings updated in r200137.

It the builders are enforcing -Wdocumentation it should really also be enabled in the default CMake configuration.

Alp.




Cheers,
Rafael

--
http://www.nuanti.com
the browser experts

_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to