<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jan 26, 2010, at 2:26 PM, Andrew Sutton wrote:</div><blockquote type="cite"><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">  bool hasUserDeclaredConstructor() const {</div></blockquote><blockquote class="gmail_quote" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; padding-left: 1ex; position: static; z-index: auto; ">
-    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></blockquote><br></div><div>I mean that, when you're serializing a CXXRecordDecl, you can ask if it's an injected class name and decide how to lay out the record decl based on that.</div><div><br></div><div>John.</div></body></html>