Skip to content

[Clang][Driver][Test] No negative tests for unsupported options in different drivers #119190

@Maetveis

Description

@Maetveis

Recently while exposing more options to the Fortran flang driver, some options were accidentally exposed to clang-cl and clang-dxc too. This was not caught by the test-suite because there are generally no tests to verify which options are not supported by specific drivers.

Exposing options accidentally might be a problem because configure scripts can it and change their behavior based on it. When an option is accidentally exposed it means there are no tests, and it might not even work or regress later without notice.

It should be possible to automatically generate a test that tests each unsupported option + driver flavor. Checking in the generated tests to version control would then allow for checking that only intended changes to option visibility is present during code-review.

From a high level look creating such a script should be fairly straightforward by parsing the tablegen json output of Options.td.

Metadata

Metadata

Assignees

Labels

clang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'good first issuehttps://github.com/llvm/llvm-project/contributetest-suite

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions