-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalize handling of .d
files: Accept .d
files with multiple targets, eat -MF
arguments to preprocessor
#557
Conversation
What type of files does this happen for? I'm thinking maybe we should instead of #530 only include |
It is a perfectly normal |
I think then we should actually add support such that |
I think we might have misunderstood each other. What happens is:
|
Oh, I see what the real problem is there: the command line already provides some |
.d
file if there is no .d
file for an entry in the compilation database.d
files: Accept .d
files with multiple targets, eat -MF
arguments to preprocessor
Now, we try to fix the call to the compiler if it contains
|
I'm starting to doubt this approach. You added The extended Makefile parsing is also becoming more of a hack because the command line still contains other
All these I think the other approach I suggested in #535 would be much more robust and less error-prone: extend |
I am a bit skeptical whether this is the general solution it appears to be though: If a header file itself contains no declarations but only includes other header files, we would not see it in this process at all. However, if this file changes to now include different things, we would have to re-run the preprocessor anyway. Or am I missing something here? |
Why not? If something is included, there will be a What wouldn't work is iterating over all the globals in the preprocessed file and collecting the filenames from their locations. |
The case that I was worried about was the one similar to the following one. File #include "1.h"
int main() {
int i =0;
int j = 0;
for(; i<5; i++) {
j += i*i;
}
assert(i == 5);
} File #include "2.h" File int blarg(); Since But apparently it does:
|
Closing in favor of #587. |
Skip instead of failing if there is no
.d
file for some entry in the compilation database.Needed for goblint/bench#9 after #535