dpp
dpp copied to clipboard
enhancement of error reporting
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.
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.