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

Only allow the Checked C extension flag for C. #16

Closed
secure-sw-dev-bot opened this issue Jan 16, 2022 · 3 comments
Closed

Only allow the Checked C extension flag for C. #16

secure-sw-dev-bot opened this issue Jan 16, 2022 · 3 comments

Comments

@secure-sw-dev-bot
Copy link

This issue was copied from checkedc/checkedc-clang#16


This change only allows the -fcheckedc-extension flag to be used for C programs
in clang. The clang driver will reject the use of -fcheckedc-extension for
other C family languages supported by clang, including C++, Objective
C, OpenCL, and CUDA. This addresses issue #9 in the checked-clang Github repo.

We are currently not modifying clang to support these other languages, which
is why need to disallow using the extension with them.

Testing:

  • Add 4 new tests to clang. They test that use of the extension flag is
    rejected for C++, Objective C, CUDA, and OpenCL.
  • As recommended by the clang documentation, I placed the tests in with
    other similar tests in the test tree.
  • I updated the testing baselines to reflect the new tests. I also updated
    the documentation to reflect the fact that we have Checked C specific tests
    in clang. We need to take the new tests into account when updating to new
    versions of the clang/LLVM sources.
@secure-sw-dev-bot
Copy link
Author

Comment from @msftclas:

Hi @dtarditi, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (David Tarditi). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@secure-sw-dev-bot
Copy link
Author

Comment from @reubeno:

Finished taking a pass over this; my main question is around the overhead to maintain the expected test counts for tests we add. Apart from that, this looks good. (And thanks for putting in the effort to add those test cases!)

@secure-sw-dev-bot
Copy link
Author

Comment from @dtarditi:

I've updated the documentation so that we will not maintain expected passing test counts, which could add overhead. Instead we'll just make sure that there are no unexpected test failures. I addressed your other comments and updated the issue9 branch. One neat thing: we're now checking that clang-cl understands the -fcheckedc-extension flag when it is passed using the -Xclang option to clang-cl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant