forked from checkedc/checkedc-clang
-
Notifications
You must be signed in to change notification settings - Fork 5
Various bugs in base dir matching #327
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
Labels
Comments
Another bug I found today: 3C thinks that I'll keep all these bugs in the same GitHub issue since they seem likely to be fixed all at once. |
..
components in include paths correctly
This was referenced Feb 2, 2021
mattmccutchen-cci
added a commit
that referenced
this issue
Feb 8, 2021
mattmccutchen-cci
added a commit
that referenced
this issue
Feb 8, 2021
Also change the unimplemented canWrite constraints case from a typedef to a crazy #include in anticipation of #408.
mattmccutchen-cci
added a commit
that referenced
this issue
Feb 13, 2021
- Add -output-dir option to write updated files to a directory structure parallel to the base dir (#347). When -output-dir is used, a source file outside the base dir can't be handled because there is no way to compute its output path. For consistency, this is now an error even when -output-dir is not used. - Convert all 3C regression tests from -output-postfix to -output-dir to avoid leaving temporary files in the clang/test/3C directory (#378). - Expand "3c -help" documentation. In particular, direct the user to pass "--" when they don't want to use a compilation database to avoid accidentally using unwanted compiler options and suppress the warning if no compilation database is found (#343). - For consistency, have stdout mode output the main file even if it is unchanged (#328). - Fix bugs in matching of file paths against the base dir (#327). - Other minor bug fixes: see the pull request description for details. Co-authored-by: John Kastner <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
If a file outside the base dir is referenced via a
..
path component in an include directory (e.g.,-I
option) or an#include
path, 3C thinks that/absolute/path/to/my/base/dir/../foo.checked.c
is still under/absolute/path/to/my/base/dir
and writes the file. This is dangerous.I'd guess there's a similar problem with symlinks. We should probably be using the equivalent of
realpath
.The text was updated successfully, but these errors were encountered: