<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 25, 2013, at 10:22 AM, Nico Weber <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr">On Wed, Jul 24, 2013 at 7:58 PM, Tom Honermann<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:thonermann@coverity.com" target="_blank">thonermann@coverity.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="im">On 07/24/2013 12:18 PM, Will Wilson wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Hi All,<br><br>I've discovered a rather nasty issue with -fdelayed-template-parsing<br>enabled. If this is used to build a PCH all of the stored template<br>tokens are lost leading an incomplete AST when the PCH is used to create<br>the complete TU.<br><br>Is this by design or a missing feature for the serialization code?<br></blockquote><br></div>I would guess a missing feature. Problems can be demonstrated quite easily:<br><br>$ cat t.cpp<br>template<typename T><br>T f(const T& t) {<br> <span class="Apple-converted-space"> </span>return t;<br>}<br><br>int main() {<br> <span class="Apple-converted-space"> </span>f(5);<br>}<br><br>$ clang --version<br>clang version 3.3 (tags/RELEASE_33/final)<br>Target: x86_64-unknown-linux-gnu<br>Thread model: posix<br><br># No problems without -fdelayed-template-parsing...<br>$ clang -emit-ast t.cpp<br>$ clang -o t t.ast<br><br># But with -fdelayed-template-parsing...<br>$ clang -emit-ast -fdelayed-template-parsing t.cpp<br>$ clang -o t t.ast<br>/tmp/t-YAfQmm.o: In function `main':<br>t.ast:(.text+0x14): undefined reference to `int f<int>(int const&)'<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)</blockquote><div><br></div><div>It's probably a good idea to paste this into a bug report (<a href="http://llvm.org/bugs">http://llvm.org/bugs</a>) to make sure it's not lost.</div></div></div></div></div></blockquote><br></div><div>It’s already filed as</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="http://llvm.org/bugs/show_bug.cgi?id=9992">http://llvm.org/bugs/show_bug.cgi?id=9992</a></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- Doug</div><div><br></div></body></html>