Skip to content
Snippets Groups Projects
Commit 973e72a8 authored by Ted Kremenek's avatar Ted Kremenek
Browse files

Add a test case for compound assignments that lazily symbolicate the value of...

Add a test case for compound assignments that lazily symbolicate the value of the LHS when the computation type is an integer of more bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59352 91177308-0d34-0410-b5e6-96231b3b80d8
parent 60595dab
No related branches found
No related tags found
No related merge requests found
...@@ -114,3 +114,23 @@ int f9b(unsigned len) { ...@@ -114,3 +114,23 @@ int f9b(unsigned len) {
return *p++; // no-warning return *p++; // no-warning
} }
int* f10(int* p, signed char x, int y) {
// This line tests symbolication with compound assignments where the
// LHS and RHS have different bitwidths. The new symbolic value
// for 'x' should have a bitwidth of 8.
x &= y;
// This tests that our symbolication worked, and that we correctly test
// x against 0 (with the same bitwidth).
if (!x) {
if (!p) return;
*p = 10;
}
else p = 0;
if (!x)
*p = 5; // no-warning
return p;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment