... and give more guidance to users.
If specifying -msve-vector-bits on a non-SVE target, clang would say:
error: '-msve-vector-bits' is not supported without SVE enabled
- The driver lacks logic for "implied features". This would result in this error being raised for -march=...+sve2, even though +sve2 implies +sve.
- Feature implication is well modelled in LLVM, so push the error down the stack.
- Hint to the user what flag they need to consider setting.
Now clang fails later, when the feature is used, saying:
aarch64-sve-vector-bits.c:42:41: error: 'arm_sve_vector_bits' attribute is not supported on targets missing 'sve'; specify an appropriate -march= or -mcpu= typedef svint32_t noflag __attribute__((arm_sve_vector_bits(256)));
Move clang/test/Sema/{neon => arm}-vector-types-support.c and put tests for
this warning together in one place.
nit: s/ feature flag//
(otherwise, for this case it should be 'feature flags' and the case below would need 'the ' in front of it, to read nicely).