[cfe-dev] Mutli-line bug report

Nico Weber thakis at chromium.org
Wed Nov 3 07:14:11 PDT 2010


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



More information about the cfe-dev mailing list