This issue was copied from checkedc/checkedc-clang#1093
This is an updated implementation of the dataflow analysis for bounds widening.
In addition to the existing support for bounds widening on a conditional
dereferencing a null-terminated array at its upper bound this implementation
also supports bounds widening in presence of _Where clauses. For example:
_Nt_array_ptr<char> p : bounds(p, p + 1);
int x = strlen(p) _Where p : bounds(p, p + x); // Bounds of p widened to bounds(p, p + x).
This issue was copied from checkedc/checkedc-clang#1093
This is an updated implementation of the dataflow analysis for bounds widening.
In addition to the existing support for bounds widening on a conditional
dereferencing a null-terminated array at its upper bound this implementation
also supports bounds widening in presence of _Where clauses. For example: