================ @@ -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}} ---------------- zygoloid wrote:
Yes, if we're always pointing the caret at the attribute itself so we get an 'expanded from macro' note, that seems fine. 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