efriedma added inline comments.

================
Comment at: lib/Sema/SemaChecking.cpp:8176
+      // underlying type, so that when someone specifies the type as
+      // "unsigned" it doesn't cause sign-conversion type warnings.
       if (!Enum->isCompleteDefinition())
----------------
Explicitly referencing sign-conversion warnings here isn't really helpful.  
Maybe something more like "Incomplete enums without definitions can have an 
explicitly specified underlying type. Use that type here to compute the range."


================
Comment at: test/SemaCXX/warn-sign-conversion-cpp11.cpp:11
+  // For a non-defined enum, use the underlying type.
+  enum u8 : char;
+  u8 foo{static_cast<u8>(0)};
----------------
The signedness of "char" can vary based on the host; probably simplest to write 
out "signed char".


https://reviews.llvm.org/D38145



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to