================ @@ -14,12 +16,26 @@ void Func() { auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on an array or pointer type}} } +// The diagnostic message is hard-coded as 'noderef' so using a system macro doesn't change the behavior +void Func_system_macro() { + int _SYS_NODEREF i; // expected-warning{{'noderef' can only be used on an array or pointer type}} + int _SYS_NODEREF *i_ptr; + + auto _SYS_NODEREF *auto_i_ptr2 = i_ptr; + auto _SYS_NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on an array or pointer type}} +} + + // Added test for fix for P41835 #define _LIBCPP_FLOAT_ABI __attribute__((pcs("aapcs"))) struct A { _LIBCPP_FLOAT_ABI int operator()() throw(); // expected-warning{{'pcs' calling convention is not supported for this target}} }; +struct A_system_macro { + _SYS_LIBCPP_FLOAT_ABI int operator()() throw(); // expected-warning{{'_SYS_LIBCPP_FLOAT_ABI' calling convention is not supported for this target}} ---------------- rapidsna wrote:
Fwiw, my test may not be a good example. Since this is only for system-defined macro, so I'd expect the macro name should more helpful in real use cases. https://github.com/llvm/llvm-project/pull/107619 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits