Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[analyzer][solver] Handle UnarySymExpr in SMTConv
Dependent patch adds UnarySymExpr, now I'd like to handle that for SMT conversions like refutation. Differential Revision: https://reviews.llvm.org/D125547
- Loading branch information
Gabor Marton
committed
May 26, 2022
1 parent
88abc50
commit cd5783d
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// RUN: %clang_analyze_cc1 %s \ | ||
// RUN: -analyzer-checker=core,debug.ExprInspection \ | ||
// RUN: -analyzer-config eagerly-assume=true \ | ||
// RUN: -verify | ||
|
||
// RUN: %clang_analyze_cc1 %s \ | ||
// RUN: -analyzer-checker=core,debug.ExprInspection \ | ||
// RUN: -analyzer-config eagerly-assume=true \ | ||
// RUN: -analyzer-config support-symbolic-integer-casts=true \ | ||
// RUN: -verify | ||
|
||
// RUN: %clang_analyze_cc1 %s \ | ||
// RUN: -analyzer-checker=core,debug.ExprInspection \ | ||
// RUN: -analyzer-config eagerly-assume=true \ | ||
// RUN: -analyzer-config crosscheck-with-z3=true \ | ||
// RUN: -verify | ||
|
||
// RUN: %clang_analyze_cc1 %s \ | ||
// RUN: -analyzer-checker=core,debug.ExprInspection \ | ||
// RUN: -analyzer-config eagerly-assume=true \ | ||
// RUN: -analyzer-config crosscheck-with-z3=true \ | ||
// RUN: -analyzer-config support-symbolic-integer-casts=true \ | ||
// RUN: -verify | ||
|
||
// REQUIRES: z3 | ||
|
||
void k(long L) { | ||
int g = L; | ||
int h = g + 1; | ||
int j; | ||
j += -h < 0; // should not crash | ||
// expected-warning@-1{{garbage}} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters