<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 --- - Assertion `isInlined() && "expected to get called on an inlined function!"' failed."
   href="https://llvm.org/bugs/show_bug.cgi?id=22959">22959</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `isInlined() && "expected to get called on an inlined function!"' failed.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rtrieu@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Repro:
template<typename T> class S;
const S<double> Foo();

template <typename T>
class S {
 public: 
  friend const S<double> Foo();
};
inline const S<double> Foo() { return S<double>(); }


clang-3.5: ../tools/clang/lib/AST/Decl.cpp:2724: bool
clang::FunctionDecl::isMSExternInline() const: Assertion `isInlined() &&
"expected to get called on an inlined function!"' failed.
#0 0x14be2aa llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/clang-3.5+0x14be2aa)
#1 0x14bf78b SignalHandler(int) (/usr/local/bin/clang-3.5+0x14bf78b)
#2 0x7fd5d1c99340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#3 0x7fd5d11c5cc9 gsignal
/build/buildd/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x7fd5d11c90d8 abort /build/buildd/eglibc-2.19/stdlib/abort.c:91:0
#5 0x7fd5d11beb86 __assert_fail_base
/build/buildd/eglibc-2.19/assert/assert.c:92:0
#6 0x7fd5d11bec32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#7 0x2787d61 (/usr/local/bin/clang-3.5+0x2787d61)
#8 0x270307d clang::ASTContext::GetGVALinkageForFunction(clang::FunctionDecl
const*) const (/usr/local/bin/clang-3.5+0x270307d)
#9 0x2703671 clang::ASTContext::DeclMustBeEmitted(clang::Decl const*)
(/usr/local/bin/clang-3.5+0x2703671)
#10 0x1935799 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
(/usr/local/bin/clang-3.5+0x1935799)
#11 0x193839b clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
(/usr/local/bin/clang-3.5+0x193839b)
#12 0x18da03f (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/usr/local/bin/clang-3.5+0x18da03f)
#13 0x18ce947 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(/usr/local/bin/clang-3.5+0x18ce947)
#14 0x1e67c33 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/bin/clang-3.5+0x1e67c33)</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>