Suppress Wsign-conversion for enums with matching underlying type
authorErich Keane <erich.keane@intel.com>
Thu, 21 Sep 2017 19:58:55 +0000 (19:58 +0000)
committerErich Keane <erich.keane@intel.com>
Thu, 21 Sep 2017 19:58:55 +0000 (19:58 +0000)
commit69dbbb0bca7c4eb1bc3e15412393d7d23fffbdd2
treeb6890d620b52943dc14ce4094e5eaa437dc5fce4
parent4fbaa62b60b872654a5e2dbfd68337dc34b5f8cc
Suppress Wsign-conversion for enums with matching underlying type

As reported here: https://bugs.llvm.org/show_bug.cgi?id=34692

A non-defined enum with a backing type was always defaulting to
being treated as a signed type. IN the case where it IS defined,
the signed-ness of the actual items is used.

This patch uses the underlying type's signed-ness in the non-defined
case to test signed-comparision.

Differential Revision: https://reviews.llvm.org/D38145

llvm-svn: 313907
clang/lib/Sema/SemaChecking.cpp