<p>Op 16 aug. 2011 19:20 schreef "David Blaikie" <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> het volgende:<br>
><br>
> >> IMO, no. We should get it right. One way to do so would be to emit the<br>
> >> fatal error rather than the first error that would exceed the threshold,<br>
> >> rather than following the last error that is permitted within the threshold.<br>
> >> That's probably easier in general.<br>
> ><br>
> > So lets say our limit is 1 and there is only one error in our translation<br>
> > unit. In this case we wouldn't get the fatal error?<br>
><br>
> No, I think what he's saying is rather than emitting the fatal error<br>
> when you see the <limit> error message (when you see the first error<br>
> when limit is 1, in your example) - wait until you see the <limit>+1<br>
> error and emit the fatal error then.<br>
><br>
> That seems more correct anyway - if you asked for an error limit of 3<br>
> and you only produced 3 errors you shouldn't get the fatal message<br>
> because there was no problem:<br>
><br>
> Given this:<br>
><br>
> $ clang++ foo.cpp -ferror-limit=2<br>
> foo.cpp:5:15: error: no member named 'stuff' in<br>
>      '__gnu_cxx::__normal_iterator<char *, std::basic_string<char> >'<br>
>  foo.begin().stuff();<br>
>  ~~~~~~~~~~~ ^<br>
> 1 error generated.<br>
><br>
> This seems unnecessary:<br>
><br>
> $ clang++ foo.cpp -ferror-limit=1<br>
> foo.cpp:5:15: error: no member named 'stuff' in<br>
>      '__gnu_cxx::__normal_iterator<char *, std::basic_string<char> >'<br>
>  foo.begin().stuff();<br>
>  ~~~~~~~~~~~ ^<br>
> fatal error: too many errors emitted, stopping now [-ferror-limit=]<br>
> 2 errors generated.<br>
><br>
><br>
> Too many errors were not emitted - one error was emitted so there's no<br>
> problem. If you implement -ferror-limit by waiting for the N+1th error<br>
> & outputting the fatal error instead of the N+1th error then you'll<br>
> fix this note problem & the above weirdness won't occur. I believe<br>
> that's what Doug was suggesting.</p>
<p>What about errors that produce more than one note (like c++ function overload suggestions)?<br>
><br>
> - David<br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</p>