> -  /// \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.


Cheers,
Rafael
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to