<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
PCH is our primary AST serialization mechanism, and many of the current and future clients of serialized ASTs are major consumers of accurate source locations.  Please preserve everything in the decl.<br></div></blockquote>
<div><br>Sounds fair. I'll see what I can do. I'm trying to leave breadcrumbs whever I'm unsure what the correct behavior is.<br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

That seems reasonable.  There's an EmptyShell class that's used to distinguish PCH constructors in the Expr classes;  that's probably a good idea here for these Create functions as well.<br></blockquote><div>
<br>That's probably a good idea. I'll check it out.<br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
--- include/clang/Frontend/PCHReader.h  (revision 94542)<br>
+++ include/clang/Frontend/PCHReader.h  (working copy)<br>
+#include "clang/AST/DeclCXX.h"<br>
<br>
You can get away with just predeclaring CXXBaseSpecifier here; same thing in PCHWriter.h.<br></blockquote><div><br>Yup. Missed that one. <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

   bool hasUserDeclaredConstructor() const {<br>
-    assert((isDefinition() ||<br>
+    // FIXME: Injected class names are troublesome and cause assertions in<br>
+    // the PCH writer if we don't allow them to be queried.<br>
+    assert((isDefinition() || isInjectedClassName() ||<br>
<br>
Probably best to just give injected class names a different layout in the PCH record;  otherwise they're going to occupy a lot of redundant space.<font color="#888888"><br></font></blockquote><div><br>That might be easier said than done. The injected class name is serialized as part of a DeclContext, just like any other nested declaration. <br>
 </div></div>Andrew Sutton<br><a href="mailto:andrew.n.sutton@gmail.com">andrew.n.sutton@gmail.com</a><br>