[PATCH] D39049: [analyzer] Fix wrong calculation of offset in ArrayBoundsV2
Daniel Marjamäki via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 15 13:45:47 PST 2017
danielmarjamaki added a comment.
> Could you do a similar analysis that I did above to check why does this not work for the multidimensional case? (I.e.: checking what constraints are generated and what the analyzer does with them.)
the "location.dump()" will just say "x".
the ProgramState is:
Expressions:
(0x2acd12a78a0,0x2acd1478b80) buf : &buf
(0x2acd12a78a0,0x2acd1478bf8) buf : &element{buf,0 S64b,int [3]}
(0x2acd12a78a0,0x2acd1478c10) buf[1] : &element{buf,1 S64b,int [3]}
(0x2acd12a78a0,0x2acd1478c38) x : &x
(0x2acd12a78a0,0x2acd1478c88) buf[1] : &element{element{buf,1 S64b,int [3]},0 S64b,int}
Ranges of symbol values:
reg_$0<int x> : { [4, 10] }
rawOffsetVal => 0
extentBegin => 0
For getSimplifiedOffset() , the offset is not a SymIntExpr it will just return 0.
Repository:
rL LLVM
https://reviews.llvm.org/D39049
More information about the cfe-commits
mailing list