<br><div class="gmail_extra"><br><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 style="word-wrap:break-word">
<div>But why not instead just directly look at the initializer for theBigGiantGlobalVariable, which will be a CXXConstructExpr pointing directly to the default constructor?  You can then walk over the initializers in that constructor — which, since it's an implicitly-defined default constructor, should all be non-trivial — and see what constructors they use, etc.</div>
<div><br></div></div></blockquote><div><br></div><div>sounds reasonable.  Why not is because I didn't know enough to do this the smart way.</div><div> </div><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 style="word-wrap:break-word"><div></div><div>Anyway, this would also be a reasonable enhancement request for -Wglobal-constructors;  we could easily say:</div><div>  warning: declaration requires a global constructor</div>
<div>  ...</div><div>  note: because type 'a' has a non-trivial default constructor</div><div>  note: because type 'b' has a non-trivial default constructor</div><div>  note: because type 'nowHasConstructor' has a non-trivial default constructor</div>
<div><br></div></div></blockquote><div><br></div><div>That sounds excellent.  Is -<span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Wglobal-constructors documented?  I don't see it in the User manual?</span></div>
<div> </div></div>-- <br>Peeter<br>
</div>