<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-format produces ugly results after rearranging function arguments containing raw strings."
   href="https://bugs.llvm.org/show_bug.cgi?id=32928">32928</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-format produces ugly results after rearranging function arguments containing raw strings.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Formatter
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lukasza@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Given the following (manually formatted) snippet:

  test_app_dir.WriteManifest(
      base::StringPrintf(R"({
                           "name": "Hosted App vs TDI Test",
                           "version": "1",
                           "manifest_version": 2,
                           "app": {
                             "launch": {
                               "web_url": "%s"
                             },
                             "urls": ["*://app.site.com/frame_tree"]
                           }
                         })",
                         url.spec().c_str()));

clang-format changes it to:

  test_app_dir.WriteManifest(base::StringPrintf(R"({
                           "name": "Hosted App vs TDI Test",
                           "version": "1",
                           "manifest_version": 2,
                           "app": {
                             "launch": {
                               "web_url": "%s"
                             },
                             "urls": ["*://app.site.com/frame_tree"]
                           }
                         })",
                                                url.spec().c_str()));


I am not sure if the original formatting conforms to Google C++ Style Guide,
but I kind of like it.  I am sure that I dislike the result of clang-format -
the indent of the 2nd argument of base::StringPrintf seems wrong (even though
it is technically correct, by virtue of starting on the same column as the 1st
argument).</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>