Index: cfe/trunk/lib/Sema/SemaChecking.cpp =================================================================== --- cfe/trunk/lib/Sema/SemaChecking.cpp +++ cfe/trunk/lib/Sema/SemaChecking.cpp @@ -8171,8 +8171,11 @@ // For enum types, use the known bit width of the enumerators. if (const EnumType *ET = dyn_cast(T)) { EnumDecl *Enum = ET->getDecl(); + // In C++11, enums without definitions can have an explicitly specified + // underlying type. Use this type to compute the range. if (!Enum->isCompleteDefinition()) - return IntRange(C.getIntWidth(QualType(T, 0)), false); + return IntRange(C.getIntWidth(QualType(T, 0)), + !ET->isSignedIntegerOrEnumerationType()); unsigned NumPositive = Enum->getNumPositiveBits(); unsigned NumNegative = Enum->getNumNegativeBits();