mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 11:39:35 +00:00
Revert "[analyzer] Fix crash analyzing _BitInt() in evalIntegralCast (#65887)"
This reverts commit 4898c33527
.
Lots of buildbots are failing, probably because lots of targets not supporting
large _BitInt types.
This commit is contained in:
parent
014c41d688
commit
929662b489
@ -598,9 +598,11 @@ SVal SValBuilder::evalIntegralCast(ProgramStateRef state, SVal val,
|
||||
APSIntType ToType(getContext().getTypeSize(castTy),
|
||||
castTy->isUnsignedIntegerType());
|
||||
llvm::APSInt ToTypeMax = ToType.getMaxValue();
|
||||
|
||||
NonLoc ToTypeMaxVal = makeIntVal(ToTypeMax);
|
||||
|
||||
NonLoc ToTypeMaxVal =
|
||||
makeIntVal(ToTypeMax.isUnsigned() ? ToTypeMax.getZExtValue()
|
||||
: ToTypeMax.getSExtValue(),
|
||||
castTy)
|
||||
.castAs<NonLoc>();
|
||||
// Check the range of the symbol being casted against the maximum value of the
|
||||
// target type.
|
||||
NonLoc FromVal = val.castAs<NonLoc>();
|
||||
|
@ -1,11 +0,0 @@
|
||||
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
|
||||
// RUN: -analyzer-checker=debug.ExprInspection \
|
||||
// RUN: -verify %s
|
||||
|
||||
// Don't crash when using _BitInt()
|
||||
// expected-no-diagnostics
|
||||
_BitInt(256) a;
|
||||
_BitInt(129) b;
|
||||
void c() {
|
||||
b = a;
|
||||
}
|
Loading…
Reference in New Issue
Block a user