diff --git a/AST/Expr.cpp b/AST/Expr.cpp index 5fcd31a590..8f1335c333 100644 --- a/AST/Expr.cpp +++ b/AST/Expr.cpp @@ -305,6 +305,9 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx, Result.setIsUnsigned(!getType()->isSignedIntegerType()); break; } + case TypesCompatibleExprClass: + Result = cast(this)->typesAreCompatible(); + break; case DeclRefExprClass: if (const EnumConstantDecl *D = dyn_cast(cast(this)->getDecl())) { diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 0e3ea58967..ada076dc74 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -738,7 +738,7 @@ public: QualType getArgType1() { return Type1; } QualType getArgType2() { return Type2; } - int typesAreCompatible() { return Type::typesAreCompatible(Type1,Type2); } + int typesAreCompatible() const { return Type::typesAreCompatible(Type1,Type2); } virtual SourceRange getSourceRange() const { return SourceRange(BuiltinLoc, RParenLoc);