<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58067>58067</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            C# short ternary operator missing space before colon or question mark
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          3geek14
      </td>
    </tr>
</table>

<pre>
    I have a file `mwe.cs`:

    var x=cond?"A":"B";
    var y=(cond?"A":"B");
    Func(cond?"A":"B");
    (cond?"A":"B");
    cond?"A":"B";

When I run `clang-format --style=LLVM mwe.cs`, I get the output:

    var x = cond ? "A" : "B";
    var y = (cond ? "A" : "B");
    Func(cond? "A": "B");
    (cond? "A": "B");
    cond? "A" : "B";

In the variable assignments, the formatting is correct. In the function call, both spaces are missing, and the same in the following line with parentheses around the ternary expression. In the final line, only the space before the question mark is missing.

As is expected, adding spaces to the input file before the `?`s and `:`s does not change the output.

I have clang-format version 15.0.1 installed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU8Fu2zAM_Rr7QsRwZDuJDz6kLQIU6K7bWZYZW6sseZKcLn8_SnGXZlg2NIAVOeQj33shW9Odm2cY-AmBw1EqhGSTj2-YCUeXpNgn-VOSLyfQ58Qt_EyKJ2F0lxSHhLE9PSGRsYd4e7hNPlNywnZ381l9AznMWnwi_ROp_2V8Ob8NqOEZ7KyDFUJx3a-Oxo7cw2rl_FkhCXp5-foFrjaxR0L06MEPCGb20-zvWQeEjlTocoCFDN33cNfACFmE3kX900a4ir4H-FTyH5l_pX85n3X0hHRI3tJ0cedkr0fU3gXXQuxirpe6B-motLUofAYL8khCvDQaBFcqQFrjB3ATF-iAW4RRUkndhxAnfwLG8RFBLnijlHkLxZXUCG-S0BPhNAVdLGHmBebRam7PgD8ni1TU6CsLqbmKFUIfo9X50ijQgBZJAsYffszoItuR29cgZ2GXffRk70KEupBO7CLxrgsMF1XexFpS0xhddvJDh7iVBzpdlLssaXjtDGG18SAGmln8MIs33ZdtvxnsE9ogF9ZVlmdr6uw8uY1dlmKz3mzKcltvq23aNUVXFzVPvfQKm8eEFeAGY_1v68yElntj33XfOiSMoiYUvbEpna1qBu8nF3eSFvTQ0780t5kwI70odXr_Wk3WfCfX6JXqUxG6VLt8s02HZrc55nnHORdsXYijqBl2LWtFtyl3u6rgqeItKtck1UNSPaWyYTljec3qdXi2WVmVx7rjuGnrXdeKOilzHLlUWWicGduntokc2rl3FFTSeXcNXgYb8b0-nz050xQ94uu6TCPdJnL9BfBWmZU">