danielmarjamaki added a comment.

I believe there is pointless code in relativeIntSizes etc. If there is for 
instance "a+b" then the result can't be a char type.

  static int relativeIntSizes(BuiltinType::Kind Kind) {
    switch (Kind) {
    case BuiltinType::UChar:
      return 1;
    case BuiltinType::SChar:
      return 1;
    case BuiltinType::Char_U:
      return 1;
    case BuiltinType::Char_S:
      return 1;
    case BuiltinType::UShort:
      return 2;
    case BuiltinType::Short:
      return 2;
    case BuiltinType::UInt:
      return 3;
    case BuiltinType::Int:
      return 3;
    case BuiltinType::ULong:
      return 4;
    case BuiltinType::Long:
      return 4;
    case BuiltinType::ULongLong:
      return 5;
    case BuiltinType::LongLong:
      return 5;
    case BuiltinType::UInt128:
      return 6;
    case BuiltinType::Int128:
      return 6;
    default:
      return 0;
    }
  }


Repository:
  rL LLVM

https://reviews.llvm.org/D31097



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

Reply via email to