summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-01-31 01:47:46 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-01-31 01:47:46 +0000
commit006bfc91e8145a10e45d647352186015550c8d06 (patch)
treedb1a3ce6045d080b82d6d1075250745601477663 /clang/lib/AST/ExprConstant.cpp
parenta4237652d223dc37c8d84bc12788422f3aa979f9 (diff)
downloadbcm5719-llvm-006bfc91e8145a10e45d647352186015550c8d06.tar.gz
bcm5719-llvm-006bfc91e8145a10e45d647352186015550c8d06.zip
constexpr: remove integral conversion overflow checking introduced in r149286.
As Eli points out, this is implementation-defined, and the way we define it makes this fine. llvm-svn: 149327
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index d2d651c97f4..50e96bdd4b5 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -1094,13 +1094,6 @@ static APSInt HandleIntToIntCast(EvalInfo &Info, const Expr *E,
// Figure out if this is a truncate, extend or noop cast.
// If the input is signed, do a sign extend, noop, or truncate.
Result = Result.extOrTrunc(DestWidth);
-
- // Check whether we overflowed. If so, fold the cast anyway.
- if (DestType->isSignedIntegerOrEnumerationType() &&
- ((Result.isNegative() && Value.isUnsigned()) ||
- Result.extOrTrunc(Value.getBitWidth()) != Value))
- (void)HandleOverflow(Info, E, Value, DestType);
-
Result.setIsUnsigned(DestType->isUnsignedIntegerOrEnumerationType());
return Result;
}
OpenPOWER on IntegriCloud