diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 9248a35e0..23df1f7dd 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -530,7 +530,7 @@ _id_operator_v2 = { '()': 'cl', '[]': 'ix', '.*': 'ds', # this one is not overloadable, but we need it for expressions - '?': 'cn', + '?': 'qu', } _id_operator_unary_v2 = { '++': 'pp_', diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py index 230c97ccd..dc7ffe658 100644 --- a/tests/test_domain_cpp.py +++ b/tests/test_domain_cpp.py @@ -326,8 +326,8 @@ def test_domain_cpp_ast_expressions(): exprCheck('5 .* 42', 'dsL5EL42E') exprCheck('5 ->* 42', 'pmL5EL42E') # conditional - exprCheck('5 ? 7 : 3', 'cnL5EL7EL3E') - exprCheck('5 = 6 ? 7 = 8 : 3', 'aSL5EcnL6EaSL7EL8EL3E') + exprCheck('5 ? 7 : 3', 'quL5EL7EL3E') + exprCheck('5 = 6 ? 7 = 8 : 3', 'aSL5EquL6EaSL7EL8EL3E') # assignment exprCheck('a = 5', 'aS1aL5E') exprCheck('a *= 5', 'mL1aL5E')