diff options
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 0bac5f4f61..e01346cdb6 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1272,6 +1272,10 @@ bool Type::isPromotableIntegerType() const { case BuiltinType::UChar: case BuiltinType::Short: case BuiltinType::UShort: + case BuiltinType::WChar_S: + case BuiltinType::WChar_U: + case BuiltinType::Char16: + case BuiltinType::Char32: return true; default: return false; @@ -1284,10 +1288,7 @@ bool Type::isPromotableIntegerType() const { || ET->getDecl()->isScoped()) return false; - const BuiltinType *BT - = ET->getDecl()->getPromotionType()->getAs<BuiltinType>(); - return BT->getKind() == BuiltinType::Int - || BT->getKind() == BuiltinType::UInt; + return true; } return false; |