================ @@ -40,3 +40,13 @@ struct S : public Base1<int>, public Base2<float> { // All initializers are correct, nothing to skip, diagnose 2 missing commas. S(const S &) : Base1<int>(0) ::Base2<float>(1.0) x(2) {} // expected-error2{{missing ',' between base or member initializers}} }; + +namespace GH113722 { +struct S { + void m(int x = 0; // expected-error {{unexpected end of default argument expression}} \ + expected-note {{to match this '('}} + #pragma unused(x) // expected-error {{expected ')'}} \ ---------------- erichkeane wrote:
Does this mean we can't have pragmas in the middle of a statement? It seems that something like the above is actually useful/a shame to lose. It would be wonderful if instead the ConsumeAndStoreInitializer just 'did the pragma parsing and came back', but I presume that is a lot more work? https://github.com/llvm/llvm-project/pull/139595 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits