<div dir="ltr"><div class="gmail_extra">Just FYI in case others see this:</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 25, 2015 at 8:11 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> 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"><div id=":9ed" class="" style="overflow:hidden">+    assert(ConstructorNameSet.empty() && "Failed to find all of the visible "<br>
+                                         "constructors by walking all the "<br>
+                                         "lexical members of the context.");</div></blockquote></div><br>I've got at least one case where this assert trips. It seems really obscure and only the modules selfhost bot has seen it so I've not reverted, but if this is causing anyone trouble, feel free.</div><div class="gmail_extra"><br>I've got it reproduced technically, but still digging into exactly what the right fix will be. The case looks like:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">(gdb) p ConstructorNameSet.Vector.size()</div><div class="gmail_extra">$1 = 1</div><div class="gmail_extra">(gdb) p DC->dumpLookups()</div><div class="gmail_extra">StoredDeclsMap CXXRecord 0x7fffca58e458 ''</div><div class="gmail_extra">|-DeclarationName '__count'</div><div class="gmail_extra">| `-Field 0x7fffc47da8a0 '__count' 'int'</div><div class="gmail_extra">|-DeclarationName ''</div><div class="gmail_extra">| |-CXXConstructor 0x7fffca58e8b0 '' 'void (void) noexcept'</div><div class="gmail_extra">| |-CXXConstructor 0x7fffca58e998 '' 'void (const __mbstate_t &)'</div><div class="gmail_extra">| `-CXXConstructor 0x7fffca58eb88 '' 'void (__mbstate_t &&) noexcept'</div><div class="gmail_extra">|-DeclarationName '__value'</div><div class="gmail_extra">| `-Field 0x7fffc47da900 '__value' 'union (anonymous union at /usr/include/wchar.h:85:3)':'union __mbstate_t::(anonymous at /usr/include/wchar.h:85:3)'</div><div class="gmail_extra">|-DeclarationName '~'</div><div class="gmail_extra">| `-CXXDestructor 0x7fffc47da7b0 '~' 'void (void)'</div><div class="gmail_extra">`-<undeserialized lookups></div><div class="gmail_extra">$2 = void</div><div class="gmail_extra">(gdb) p clang::Decl::castFromDeclContext(DC)->dump()</div><div class="gmail_extra">CXXRecordDecl 0x7fffca58e458 </usr/include/wchar.h:82:9, line:94:1> line:82:9 in __usr_include.wchar struct definition</div><div class="gmail_extra">|-CXXRecordDecl 0x7fffc47da950 <line:85:3, line:93:3> line:85:3 in __usr_include.wchar union definition</div><div class="gmail_extra">| |-FieldDecl 0x7fffc47db788 <<built-in>:104:23, /usr/include/wchar.h:88:19> col:19 in __usr_include.wchar __wch 'unsigned int'</div><div class="gmail_extra">| `-FieldDecl 0x7fffc47db7e8 <line:92:5, col:18> col:10 in __usr_include.wchar __wchb 'char [4]'</div><div class="gmail_extra">|-FieldDecl 0x7fffc47da8a0 <line:84:3, col:7> col:7 in __usr_include.wchar referenced __count 'int'</div><div class="gmail_extra">|-FieldDecl 0x7fffc47da900 <line:85:3, line:93:5> col:5 in __usr_include.wchar referenced __value 'union (anonymous union at /usr/include/wchar.h:85:3)':'union __mbstate_t::(anonymous at /usr/include/wchar.h:85:3)'</div><div class="gmail_extra">`-CXXDestructorDecl 0x7fffc47da7b0 <line:82:9> col:9 implicit ~ 'void (void)' inline noexcept-unevaluated 0x7fffc47da7b0</div><div class="gmail_extra">$3 = void</div><div><br></div><div><br></div><div>And the type in question is roughly:</div><div><br></div><div>typedef struct {</div><div>  int __count;</div><div>  union {</div><div>    wint_t __wch;</div><div>    char __wchb[4];</div><div>  } __value;</div><div>} __mbstate_t;</div><div><br></div><div><br></div><div>So far, naive attempts to produce a more targeted test case have failed.</div></div></div>