Maybe I’m missing something.
Imagine that we have this setup:
a.cpp, uses symbols from
| x.h
| y.h
b.cpp, uses symbols from
| x.h
| y.h
| z.h
module.cpp, contains
#include "a.cpp"
#include "b.cpp"
Now, we try building the module. We start by adding the x.h
and y.h
headers to a.cpp
and rebuild. There are no build errors in a.cpp
, but we see some undefined symbols in b.cpp
. It looks like the z.h
header is missing from b.cpp
, but we don’t get any warning that x.h
and y.h
are also used in that file, because they already got included in a.cpp
.
I think in this scenario, after running the steps you suggested, completion would still be broken in b.cpp
, (it would only include z.h
) even though the build would work.
Did I miss a step that would guarantee b.cpp
would actually get the required x.h
and y.h
includes?