[PATCH] Add back 'remark' to libclang interface
Alp Toker
alp at nuanti.com
Mon Apr 28 04:08:42 PDT 2014
On 28/04/2014 11:11, Tobias Grosser wrote:
>
>
> On 28/04/2014 11:16, Alp Toker wrote:
>> CXDiagnostic with value 5 is higher than CXDiagnostic_Error and there
>> are many applications using the outlined pattern that break following
>> the change, either by crashing or mis-categorising diagnostics as fatal
>> errors.
>
> I see that the above categorizes the diagnostic as an error. This is
> obviously incorrect. Nevertheless, it should just cause an error
> message. I do not see how/why this would crash.
It hits an unreachable condition due to an unhandled case and crashes.
>
> As remarks are _only_ emitted on user request and are promoted as tool
> to understand the compilation, I would claim it is acceptable that
> older tools not supporting remarks abort with an error. The user
> should always be able to remove his '-Rpass=inline' option which the
> tools does
> not properly support anyway.
Acceptable to whom? We can't tell users to filters out -R flags
manually. Therefore those applications would need to be updated and
recompiled to work correctly. And for the first time we'd lose
source-level and binary compatibility with the stable branch. That's not
an appropriate change to make to a stable API.
This really isn't about our apps and c-index-test.c -- take a look at
Ohloh code search to see how many programs and bindings rely on the
ordering of CXDiagnosticSeverity. Going to send them all patches?
I also think it's too early to add an accessor function. The remark
feature hasn't yet settled down and could change significantly as the
original review comments get addressed.
Developers wanting access to the information can easily include the C++
libclang headers if they feel the need to experiment. For everyone else,
mapping to warning is very workable as a stopgap at this point in the
3.5 cycle.
Alp.
--
http://www.nuanti.com
the browser experts
More information about the cfe-commits
mailing list