<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 24, 2013, at 9:18 AM, Will Wilson <<a href="mailto:will@indefiant.com">will@indefiant.com</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">Hi All,<div><br></div><div>I've discovered a rather nasty issue with -fdelayed-template-parsing enabled. If this is used to build a PCH all of the stored template tokens are lost leading an incomplete AST when the PCH is used to create the complete TU.</div><div><br></div><div>Is this by design or a missing feature for the serialization code?</div><div><br></div><div>Unfortunately, due to a huge body of MSVC targeted code and a need to use PCH files to maintain acceptable performance I need to make this work seamlessly. The data that would need preserving is currently stored in the Parser and is a map of <span class="">const</span><span class=""> </span>FunctionDecl<span class="">* to </span>LateParsedTemplatedFunction<span class="">*. The </span>LateParsedTemplatedFunction is essentially a SmallVector of Tokens.</div><div><br></div><div>Before I dive in and attempt to add support for serializing this, is there anything I should know?</div></div></div></blockquote><br></div><div>It’s a missing feature. One will need to serialize the actual tokens for each of the late-parsed FunctionDecl’s, and be able to lazily deserialize and then parse the tokens when an actual definition is needed.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>- Doug</div><div><br></div><br></body></html>