<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-cl support for MSVC overload of __builtin_assume_aligned"
   href="https://bugs.llvm.org/show_bug.cgi?id=42263">42263</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang-cl support for MSVC overload of __builtin_assume_aligned
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kile@microsoft.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22087" name="attach_22087" title="example">attachment 22087</a> <a href="attachment.cgi?id=22087&action=edit" title="example">[details]</a></span>
example

As part of the C++20 work for std::assume_aligned, MSVC has implemented an
intrinsic that has an already existing counterpart on clang, gcc, etc. The
declaration is almost identical to those except that it's constexpr. Function
declaration: 
constexpr void* __builtin_assume_aligned(const void*, size_t, ... ) noexcept;

Clang/GCC delcaration:
void* __builtin_assume_aligned(const void*, size_t, ... ) noexcept;

Currently the MSVC intrinsic isn't accepted due to it's constexprness (or at
least on clang-cl it's not right now) but we'd like this to work on that front
end at some point.

Current error:
error: constexpr declaration of '__builtin_assume_aligned' follows
non-constexpr declaration
constexpr void* __builtin_assume_aligned(const void*, size_t, ... /* size_t
misalignmentOffset */) noexcept;
                ^
bug.cpp(2,17): note: previous declaration is here</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>