[PATCH] D41003: Silence GCC 7 warning by using an enum class.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 12:27:50 PST 2018


fhahn added a comment.

Thanks for having a look!



================
Comment at: lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp:95
 
+enum class ColorKind { None, Red, Black };
 
----------------
RKSimon wrote:
> (style) Worth using a CK_ prefix?
> 
> ```
> 
> enum class ColorKind { CK_None, CK_Red, CK_Black };
> ```
enum classes are strongly scoped, so any access needs to be prefixed with `ColorKind::`. With that, having a CK_ prefix seems slightly redundant to me. What do you think?


https://reviews.llvm.org/D41003





More information about the llvm-commits mailing list