r210518 - Improve diagnostic mapping terminology

Justin Bogner mail at justinbogner.com
Wed Jun 11 22:50:43 PDT 2014


Alp Toker <alp at nuanti.com> writes:
> --- cfe/trunk/include/clang/Basic/DiagnosticIDs.h (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticIDs.h Tue Jun 10 04:31:37 2014
> @@ -60,28 +60,28 @@ namespace clang {
>      /// (emit a warning), MAP_ERROR (emit as an error).  It allows clients to
>      /// map errors to MAP_ERROR/MAP_DEFAULT or MAP_FATAL (stop emitting
>      /// diagnostics after this one).
> -    enum Mapping {
> +    enum Severity {
>        // NOTE: 0 means "uncomputed".
> -      MAP_IGNORE  = 1,     ///< Map this diagnostic to nothing, ignore it.
> -      MAP_REMARK  = 2,     ///< Map this diagnostic to a remark.
> -      MAP_WARNING = 3,     ///< Map this diagnostic to a warning.
> -      MAP_ERROR   = 4,     ///< Map this diagnostic to an error.
> -      MAP_FATAL   = 5      ///< Map this diagnostic to a fatal error.
> +      MAP_IGNORE = 1,  ///< Map this diagnostic to nothing, ignore it.
> +      MAP_REMARK = 2,  ///< Map this diagnostic to a remark.
> +      MAP_WARNING = 3, ///< Map this diagnostic to a warning.
> +      MAP_ERROR = 4,   ///< Map this diagnostic to an error.
> +      MAP_FATAL = 5    ///< Map this diagnostic to a fatal error.
>      };
>    }

Seems a bit strange to have an enum called "Severity" with values tagged
"MAP_", doesn't it?



More information about the cfe-commits mailing list