C++, use Itanium mangling for conditional expr

This commit is contained in:
Jakob Lykke Andersen 2022-03-27 10:41:25 +02:00
parent 2d2e0ac01a
commit a36c09a97f
2 changed files with 3 additions and 3 deletions

View File

@ -530,7 +530,7 @@ _id_operator_v2 = {
'()': 'cl', '()': 'cl',
'[]': 'ix', '[]': 'ix',
'.*': 'ds', # this one is not overloadable, but we need it for expressions '.*': 'ds', # this one is not overloadable, but we need it for expressions
'?': 'cn', '?': 'qu',
} }
_id_operator_unary_v2 = { _id_operator_unary_v2 = {
'++': 'pp_', '++': 'pp_',

View File

@ -326,8 +326,8 @@ def test_domain_cpp_ast_expressions():
exprCheck('5 .* 42', 'dsL5EL42E') exprCheck('5 .* 42', 'dsL5EL42E')
exprCheck('5 ->* 42', 'pmL5EL42E') exprCheck('5 ->* 42', 'pmL5EL42E')
# conditional # conditional
exprCheck('5 ? 7 : 3', 'cnL5EL7EL3E') exprCheck('5 ? 7 : 3', 'quL5EL7EL3E')
exprCheck('5 = 6 ? 7 = 8 : 3', 'aSL5EcnL6EaSL7EL8EL3E') exprCheck('5 = 6 ? 7 = 8 : 3', 'aSL5EquL6EaSL7EL8EL3E')
# assignment # assignment
exprCheck('a = 5', 'aS1aL5E') exprCheck('a = 5', 'aS1aL5E')
exprCheck('a *= 5', 'mL1aL5E') exprCheck('a *= 5', 'mL1aL5E')