class AdLint::Cc1::NilValueDomainNarrower

Public Class Methods

new(interp, branch_group) click to toggle source
# File lib/adlint/cc1/ctrlexpr.rb, line 525
def initialize(interp, branch_group)
  super(interp, nil)
  @branch_group = branch_group
end

Public Instance Methods

prepare!() click to toggle source
# File lib/adlint/cc1/ctrlexpr.rb, line 530
def prepare!
  raise TypeError, "no preparation without expression."
end

Private Instance Methods

commit_changes(*) click to toggle source
# File lib/adlint/cc1/ctrlexpr.rb, line 535
def commit_changes(*)
  @branch_group.all_controlling_variables.each do |var|
    var.narrow_value_domain!(Operator::EQ, var.type.arbitrary_value)
  end
  true
end