[cfe-dev] Mutli-line bug report

Ted Kremenek kremenek at apple.com
Wed Nov 3 10:39:18 PDT 2010


Jim was talking about the static analyzer, not the compiler.  The analyzer is capable of emitting diagnostics that span a path.

Sent from my iPad

On Nov 3, 2010, at 7:14 AM, Nico Weber <thakis at chromium.org> wrote:

> On Wed, Nov 3, 2010 at 5:18 AM, Jim Goodnow II <jim at thegoodnows.net> wrote:
>> Is there an easy way to generate a multi-line diagnostic in the
>> static analysis engine where one could say that a bad thing is being
>> done *here*, but it was caused by the thing you did *here* where they
>> can be on different lines? Thanks.
> 
> I think the way this is usually done is by emitting two diagnostics.
> See for example this error when you redefine a function:
> 
> test.cc:14:6: error: functions that differ only in their return type
> cannot be overloaded
> void g() {}
>     ^
> test.cc:12:5: note: previous definition is here
> int g() {}
>    ^
> 2 errors
> 
> Nico
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list