Martin Storsjö d7282c56cd
[llvm-rc] Add support for multiplication and division in expressions (#143373)
This is supported by GNU windres. MS rc.exe does accept these
expressions, but doesn't evalulate them correctly, it only returns the
left hand side.

This fixes one aspect of
https://github.com/llvm/llvm-project/issues/143157.
2025-06-10 23:34:26 +03:00

21 lines
465 B
Plaintext

LANGUAGE 3 + 2, 3 - 2
LANGUAGE 3 | 2, 3 & 2
LANGUAGE -3, ~3
LANGUAGE 1|1&0, 0&0|1
LANGUAGE 3+4-5, 3-4+5
LANGUAGE 1+2|3, 3|1+2
LANGUAGE 6&~5, 6&-8
LANGUAGE 7/3, 7*3
LANGUAGE 5/2*2, 5*3/2
LANGUAGE 1+2*3, (1+2)*3
LANGUAGE 100/12/5*5, 1+1+1+1*4
LANGUAGE 9/(1+3), (4+5)/4
LANGUAGE -1, --1
LANGUAGE ----1, -----1
LANGUAGE ~1, ~~1
LANGUAGE ~~~~1, ~~~~~1
LANGUAGE 5-(1+2), 1|(1&0)
LANGUAGE ~(3-7), -(3+~7)
LANGUAGE 0, (1+3)|(2+11)
LANGUAGE (((((((5))))))), (((((((7)))))))