Skip to content
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

drop irritating warnings about compilation db #259

Closed
mwhicks1 opened this issue Sep 8, 2020 · 4 comments
Closed

drop irritating warnings about compilation db #259

mwhicks1 opened this issue Sep 8, 2020 · 4 comments
Assignees
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@mwhicks1
Copy link
Member

mwhicks1 commented Sep 8, 2020

Every time you run 3C with a compilation DB, you get this warning:

Error while trying to load a compilation database:
Could not auto-detect compilation database for file "fptrarrstructcallee.c"
No compilation database found in /home/cc/checkedc-clang/clang/test/CheckedCRewriter or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.

Can we somehow make it so that these error messages are not shown unless the -verbose flag is on?

@mwhicks1 mwhicks1 added the enhancement New feature or request label Sep 8, 2020
@mattmccutchen-cci
Copy link
Member

I assume that was supposed to be "without"...

Is there a way we can know whether the user intended to use a compilation DB? If the user did and it doesn't exist, we should report the error.

@mattmccutchen-cci
Copy link
Member

There was a little more discussion in Slack.

@mattmccutchen-cci
Copy link
Member

mattmccutchen-cci commented Feb 3, 2021

After some research, the standard LibTooling answer is: if the user knows they do not want to use a compilation database, they should pass -- at the end of the command line. This will suppress the error and ensure that 3c doesn't detect an unintended compilation database by accident. We can discuss on #343 whether we want to just document this design or change it.

@mattmccutchen-cci
Copy link
Member

Duplicate of #343

@mattmccutchen-cci mattmccutchen-cci marked this as a duplicate of #343 Feb 3, 2021
@mattmccutchen-cci mattmccutchen-cci added the duplicate This issue or pull request already exists label Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants