Skip to content

Make ConstantEvaluator truncate the result of shift operations#16597

Open
matheusaaguiar wants to merge 2 commits intodevelopfrom
ConstantEvaluator-truncate-shiftL-value
Open

Make ConstantEvaluator truncate the result of shift operations#16597
matheusaaguiar wants to merge 2 commits intodevelopfrom
ConstantEvaluator-truncate-shiftL-value

Conversation

@matheusaaguiar
Copy link
Copy Markdown
Contributor

Fix #16596.
Spotted in #16456 (comment).

))
{
TypedValue convertedValue = convertType(*value, *resultType);
TypedValue convertedValue = TokenTraits::isShiftOp(_operation.getOperator()) ?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it could be done only for left shift.

@matheusaaguiar
Copy link
Copy Markdown
Contributor Author

Not sure about a Changelog entry...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConstantEvaluator does not truncate the result of left shift operations

1 participant