diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-05 00:17:43 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-05 00:17:43 +0000 |
commit | 5a914a8c631a35edae2e5e90319f5c9c1484c0bf (patch) | |
tree | 29d18ef38ed9c1220a89cc3ebd4c0ec1a6ab93c3 /clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp | |
parent | ceebe8659b4b58fd58f5334ff312ed25b5f6efe7 (diff) | |
download | bcm5719-llvm-5a914a8c631a35edae2e5e90319f5c9c1484c0bf.tar.gz bcm5719-llvm-5a914a8c631a35edae2e5e90319f5c9c1484c0bf.zip |
ADT: Add int64_t interoperability to APSInt
Add some API to `APSInt` to make it easier to compare with `int64_t`.
- `APSInt::compareValues(APSInt, APSInt)` returns 1, -1 or 0 for
greater, lesser, or equal, doing the right thing for mismatched
"has-sign" and bitwidths. This is just like `isSameValue()` (and is
now the implementation of it).
- `APSInt::get(int64_t)` gets a signed `APSInt`.
- `operator<(int64_t)`, etc., are implemented trivially via `get()`
and `compareValues()`.
- Also added `APSInt::getUnsigned(uint64_t)` to make it easier to test
`compareValues()`.
llvm-svn: 228239
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp')
0 files changed, 0 insertions, 0 deletions