Skip to content

Assignments within conditional expressions should kill widened bounds #895

Closed
@kkjeer

Description

@kkjeer

Expressions within a conditional operator that modify variables used in a widened bounds expression currently do not kill the widened bounds. For example,

void f(nt_array_ptr<char> p : count(i), unsigned i, int flag) {
  if (*(p + i)) {
    // The i++ expression should kill the widened bounds of p.
    flag ? i++ : i;
  }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions