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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] Parentheses with strings inside gets put on new line in JavaScript
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          sstwcw
      </td>
    </tr>
</table>

<pre>
    When I run clang-format on this JavaScript file with the option
`-style=Google`:

```JavaScript
x = ('' +
 '');
```

I get:

```JavaScript
x =
    ('' +
 '');
```

I expect the first line break not to be there.  That is, I expect the output to be same as the input.

When the part before the parentheses is shorter than the continuation indentation, such as when I set it to 5, the break is not there.  I guess it makes sense because then it saves columns not to add the break.  When the part before the parentheses is longer than the continuation indentation, the break is there.  It also makes sense because in that case having the break saves columns.  What I don't like is that the line break is there when the part before the parentheses is exactly as wide as the continuation indentation width.  It takes exactly as many columns but wastes a line.

It seems like this is only the case with the option `AlignAfterOpenBracket: AlwaysBreak` which is the default for the Google JavaScript style.

The version I am using is:
```
clang-format version 18.0.0 (https://github.com/llvm/llvm-project.git ef888bc67c726deb8c74ea32e7c8c9ace756b667)
```

@mprobst @frigus02 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVU1v4zYQ_TX0ZRBDpmRJPuiQNEjhXlqgC_RMUSOJDUUKnJEd__uCVJzYiy6QxQIGbHqG896bLyoiMzjERuyfxP55oxYefWiI-KzPm9Z3l-afER0cISwOtFVueOh9mBSDd8CjIfhDndTfOpiZoTcW4Wx4BB4R_MzGO5E9i-xRlNkD8cWiyJ9_936wKMpM5I_v1qvP-vmMuBreQOTPIGQtZCVkBUI-rQZY_xDyIPKn74LcRj7CgPxTaO_xAX4NFt9m1Jyy0ZtADNY4hDagegXnGdhDi9EccAvwbVQMhoT8De6u-oXn5epMakJQlAzGzQtvbyF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