mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-04 16:41:43 +00:00

This change fixes a crash in RangedConstraintManager.cpp:assumeSym due to an unhandled BO_Div case. clang: <root>clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp:51: virtual clang::ento::ProgramStateRef clang::ento::RangedConstraintManager::assumeSym(clang::ento::ProgramStateRef, clang::ento::SymbolRef, bool): Assertion `BinaryOperator::isComparisonOp(Op)' failed. Reviewed By: NoQ Differential Revision: https://reviews.llvm.org/D122277
15 lines
254 B
C
15 lines
254 B
C
// RUN: %clang_analyze_cc1 -analyzer-checker=core %s \
|
|
// RUN: -triple x86_64-pc-linux-gnu -verify
|
|
|
|
// don't crash
|
|
// expected-no-diagnostics
|
|
|
|
int a, b;
|
|
int c(void) {
|
|
unsigned d = a;
|
|
--d;
|
|
short e = b / b - a;
|
|
++e;
|
|
return d <= 0 && e && e;
|
|
}
|