<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>This patch seemed related so I gave it a try, but unfortunately the issue persists:
<br>
</p>
<p><a href="https://github.com/llvm-mirror/clang/commit/de0c61bab9ebf86a08a18b281fe018f3a5eed358" class="OWAAutoLink" id="LPlnk793065" previewremoved="true">https://github.com/llvm-mirror/clang/commit/de0c61bab9ebf86a08a18b281fe018f3a5eed358</a></p>
<p><br>
</p>
<p>It might gives some clues as a to a fix though. <br>
</p>
<p><br>
</p>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">
<div class="gmail_quote">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Gaetano Checinski</b> <span dir="ltr"><<a href="mailto:gaetano.checinski@gmail.com" target="_blank">gaetano.checinski@gmail.com</a>></span><br>
Date: 2017-01-09 13:49 GMT+00:00<br>
Subject: ASTImporter triggers assertions in some cases.<br>
To: <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<br>
<br>
<div dir="ltr">
<div>Hi Guys,</div>
<div>I've noticed that the ASTImporter fails to import some named decls from <iostream> due to an invalid linkagecache (in TagDecl::setTypedefNameFor<wbr>AnonDecl()).</div>
<div>Running with assertions disabled never terminates.</div>
<div>However, while trying to build an minimal reproducible example, i stumbled on a different error regarding templated structs with frienddecls.</div>
<div>I think they may be related because i found this commit: </div>
<div><a href="https://mailtrack.io/trace/link/3bfa5f729eac3d7d441cda522b04d9aa06778eec?url=https%3A%2F%2Fpublic.cdl.uni-saarland.de%2Fnoise%2Fclang%2Fcommit%2Fad0e27b18b0cefab049121d4bfd7b12216e7de6e&signature=1e3968956e628307" target="_blank">https://public.cdl.uni-saarlan<wbr>d.de/noise/clang/commit/ad0e27<wbr>b18b0cefab049121d4bfd7b12216e7<wbr>de6e</a></div>
<div><br>
</div>
<div><br>
</div>
<div>The following test fails:</div>
<div> </div>
<div>> // svn: E155007</div>
<div>> // unittests/AST/ASTImporterTest.<wbr>cpp</div>
<div>
<div>> TEST(ImportExpr, TemplatedStructFriend) {</div>
<div>>  MatchVerifier<Decl> Verifier;</div>
<div>>  EXPECT_TRUE(testImport(</div>
<div>>  "void foo() {}; \n"</div>
<div>>  "inline namespace D {\n"</div>
<div>>  "  template<class>\n"</div>
<div>>  "  struct declToImport {\n"</div>
<div>>  "    friend bool f(const declToImport &);\n"</div>
<div>>  "  };\n"</div>
<div>>  "  template class declToImport<int>;\n"</div>
<div>>  "}\n", Lang_CXX, "", Lang_CXX, Verifier, decl()));</div>
<div>> }</div>
<div><br>
</div>
<div>stacktrace: </div>
> clang/llvm/tools/clang/lib/AST<wbr>/DeclFriend.cpp, line 43.
<div>> 0  ASTTests                 0x0000000104f8e135 l </div>
<div>> lvm::sys::PrintStackTrace(llvm<wbr>::raw_ostream&) + 101</div>
<div>> 1  ASTTests                 0x0000000104f8e779 PrintStackTraceSignalHandler(v<wbr>oid*) + 25</div>
<div>> 2  ASTTests                 0x0000000104f8a6d9 llvm::sys::RunSignalHandlers() + 425</div>
<div>> 3  ASTTests                 0x0000000104f8ec92 SignalHandler(int) + 354</div>
<div>> 4  libsystem_platform.dylib 0x00007fff9e3eebba _sigtramp + 26</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div>Gaetano Checinski</div>
<div><br>
</div>
<div><br>
</div>
</div>
<img class="m_949905899553282684mt-old-signature" style="-moz-user-select: none;" width="0" height="0" src=""></div>
</div>
<br>
<br>
<br>
<br>
<div class="m_949905899553282684mt-signature"><img style="-moz-user-select: none;" width="16" height="14" src="https://s3-eu-west-1.amazonaws.com/mailtrack-crx/icon-signature.png"> <font class="m_949905899553282684mt-signature-text" color="#999999">Sent with
<a href="https://mailtrack.io/install?source=signature&lang=en&referral=gaetano.checinski@gmail.com&idSignature=22" class="m_949905899553282684mt-install" target="_blank">
Mailtrack</a></font></div>
<img class="m_949905899553282684mailtrack-img" style="-moz-user-select: none;" width="0" height="0" src="https://mailtrack.io/trace/mail/41c2ec6d7577fc14ab57a359d0e0cffaa352b7f8.png?u=931501"></div>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>