<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 29, 2015 at 8:04 PM, Nathan Wilson via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p dir="ltr">Hi,</p>
<p dir="ltr">Would someone mind explaining when (or when not) to mark a declaration, i.e. FunctionDecl or VarDecl, an invalid declaration?</p><p>Then, if the declaration is marked invalid, at what do we look at/use that information?</p></div></blockquote><div>Here are some guidelines:</div><div><br></div><div>  * You must not mark a declaration as invalid unless you have emitted an error.</div><div>  * If you emitted an error with a fix-it hint, you should not mark the declaration as invalid (and you should recover as if the fix-it hint were applied). We would like this to be a hard rule, but there are existing cases where we don't follow this.</div><div>  * You should mark a declaration as invalid if you think it's sufficiently far from the user's intent that follow-on diagnostics should be suppressed.</div><div>  * You must mark a declaration as invalid if it does not correspond to anything like a valid declaration (if it would be unreasonable to expect downstream code to do the right thing with it).</div></div></div></div>