On Fri, Oct 31, 2014 at 6:26 AM, Brad King <[email protected]> wrote:
> On 10/30/2014 09:06 PM, Richard Smith wrote: > >> One can see that both B::B() and C::C() get errors as desired. > > > > That is not guaranteed, and will no longer be the case when we > > fix the bug described above. > > Interesting. Please help me understand this: the docs of setInvalidDecl > say it is for "graceful error recovery". From the point of view of a > compiler that sounds like once one error has been emitted the failed > declaration is marked as invalid and any further error resulting from > encountering the invalid declaration should not be emitted. That way > users do not see errors that are only caused by earlier errors. Is that > the goal? Yes, that's the goal and the intent. > In that case the current behavior does appear to be a bug. I think so. There seem to be a few bugs here: we shouldn't mark an instantiated function as invalid because instantiating the body failed (there's nothing wrong with the declaration); we should use a different mechanism to track that we shouldn't try to instantiate it again. And we shouldn't give overload resolution errors if our candidate set contained an invalid declaration.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
