Skip to content

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

@secure-sw-dev-bot

Description

@secure-sw-dev-bot

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions