HomePhabricator

When evaluating a __builtin_constant_p conditional, always enter

Description

When evaluating a __builtin_constant_p conditional, always enter
constant-folding mode regardless of the original evaluation mode.

In order for this to be correct, we need to track whether we're checking
for a potential constant expression or checking for undefined behavior
separately from the evaluation mode enum, since we don't want to clobber
those states when entering constant-folding mode.

Details

Committed
rsmithSep 10 2019, 2:24 PM
Parents
rL371556: [ValueTracking] Factor our common speculation suppression logic [NFC]
Branches
Unknown
Tags
Unknown