[PATCH] Add back 'remark' to libclang interface
Dmitri Gribenko
gribozavr at gmail.com
Mon Apr 28 02:19:39 PDT 2014
On Mon, Apr 28, 2014 at 10:11 AM, Tobias Grosser <tobias at grosser.es> wrote:
> The concerns raised in the revert commit where:
>
> It trivially broke almost any stable application checking for
> Severity >= CXDiagnostic_Error or indeed any other kind of severity
> comparison upon encountering a 'remark'.
>
> To not misunderstand this comment, if the user does not explicitly enable
> 'remarks', libclang based applications are _not_ broken and continue to
> work.
>
> An issue may appear if both the user enables 'remark' diagnostics explicitly
> and an application assumes that the set of diagnostic
> types does never change and, based on this assumption, contains code that
> checks the diagnostic type without handling unknown diagnostic types
> gracefully.
>
> This can be seen as backward compatibility issue, but my personal
> interpretation is that the application is relying here on undocumented
> assumptions. As possible issues only manifest in case the user
> explicitly requests remarks, I believe the proposed patch is fine.
Hi Tobias,
This was my first thought when I saw revert as well, but because we
have this kind comparison code in c-index-test, I would say that it
comparing numeric values is not an unreasonable assumption in other
projects -- they could have just copied it from c-index-test.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list