Skip to content
Commit e37726be authored by Denys Petrov's avatar Denys Petrov
Browse files

[analyzer] Implemented RangeSet::Factory::castTo function to perform...

[analyzer] Implemented RangeSet::Factory::castTo function to perform promotions, truncations and conversions.

Summary: Handle casts for ranges working similarly to APSIntType::apply function but for the whole range set. Support promotions, truncations and conversions.
Example:
promotion: char [0, 42] -> short [0, 42] -> int [0, 42] -> llong [0, 42]
truncation: llong [4295033088, 4295033130] -> int [65792, 65834] -> short [256, 298] -> char [0, 42]
conversion: char [-42, 42] -> uint [0, 42]U[4294967254, 4294967295] -> short[-42, 42]

Differential Revision: https://reviews.llvm.org/D103094
parent 25c218be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment