diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -15902,10 +15902,9 @@ // If the types are still not compatible, we need to test whether the // promoted type and the underlying type are the same except for - // signedness except for boolean. Ask the AST for the correctly corresponding - // type and see if that's compatible. - if (!PromoteType.isNull() && - !UnderlyingType->isBooleanType() && + // signedness except for boolean. Ask the AST for the correctly + // corresponding type and see if that's compatible. + if (!PromoteType.isNull() && !UnderlyingType->isBooleanType() && PromoteType->isUnsignedIntegerType() != UnderlyingType->isUnsignedIntegerType()) { UnderlyingType =