dpp icon indicating copy to clipboard operation
dpp copied to clipboard

enhancement of error reporting

Open Laeeth opened this issue 5 years ago • 1 comments

foo.h includes bar.h and dpp file only includes foo.h. right now if there is an error in bar.h you won't know why it was included (because you included foo.h) and you can turn on debuginfo but it's not trivially obvious to see.

so it would be nice to show tree of include structure up to the original file included by the dpp file.

it's far from high priority though.

Laeeth avatar Aug 06 '18 13:08 Laeeth

I believe the crux is as follows: the equivalent in C for a header foo.h that includes a header bar.h with only one line that is foo foo;:

$ clang foo.c
In file included from foo.h:1,
                 from foo.c:1:
bar.h:1:1: error: unknown type name ‘foo’
 foo foo;
 ^~~

Currently with dpp:

$ d++ foo.dpp
Error: Error parsing '/tmp/fileMz7RjP':
./bar.h:1:1: error: unknown type name 'foo'

i.e. The information about foo.h including bar.h is lost.

atilaneves avatar Aug 06 '18 15:08 atilaneves