<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - __attribute__((noreturn)): Linker error with definition with same mangled name as another definition"
   href="https://llvm.org/bugs/show_bug.cgi?id=28909">28909</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>__attribute__((noreturn)): Linker error with definition with same mangled name as another definition
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.9
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>martongabesz@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16915" name="attach_16915" title="code snipet to reproduce the bug">attachment 16915</a> <a href="attachment.cgi?id=16915&action=edit" title="code snipet to reproduce the bug">[details]</a></span>
code snipet to reproduce the bug

The above code snippet should compile without any error, but it fails.

void f1(int) __attribute__((noreturn)); // ERROR
//void f1(int) __dead2                  // ERROR
//[[noreturn]] void f1(int);            // OK
void f2(int);

template <typename T>
void Buggy(T t) {}

void test() {
    Buggy(f1);
    Buggy(f2);
}

Comiplie with:
clang++ --std=c++11 -c NoReturnBug.cpp

Produced error message:
NoReturnBug.cpp:7:6: error: definition with same mangled name as another
definition
void Buggy(T t) {}
     ^
NoReturnBug.cpp:7:6: note: previous definition is here
1 error generated.</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>