<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 - Format options for attributes, ability to specify custom attributes."
   href="https://bugs.llvm.org/show_bug.cgi?id=46623">46623</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Format options for attributes, ability to specify custom attributes.
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>alliepiper16@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clang-format currently does not have options to control attribute formatting.

Some projects prefer to put prefix attributes on a separate line, eg:

[[nodiscard]]
int foo();

instead of:

[[nodiscard]] int foo();

Additionally, it would be useful to be able to provide a list of regexes that
identify custom attributes. Maintaining an exhaustive list of attributes in
clang-format proper would be daunting, as many projects hide them behind macros
for backward compatibility, or rely on platform-specific attributes. Allowing
projects to extend the list of recognized attributes would be quite useful.

My personal interest in this stems from using clang-format on CUDA projects,
where `__host__ __device__` annotations are frequently used and commonly placed
on the line above a function definition. Being able to achieve this common
formatting style would ease adoption of clang-format by CUDA projects.</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>