[Clang][Driver][Test] No negative tests for unsupported options in different drivers
#119.190 aberto em 9 de dez. de 2024
Métricas do repositório
- Stars
- (26.378 stars)
- Métricas de merge de PR
- (Mesclagem média 1d 2h) (1.000 fundiu PRs em 30d)
Description
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.