1 // RUN: %clang_cc1 %s -fsyntax-only -verify 2 3 #define a(x) enum { x } 4 a(n = 5 #undef a 6 #define a 5 7 a); 8 _Static_assert(n == 5, ""); 9 10 // header1.h 11 void fail(const char *); 12 #define MUNCH(...) \ 13 ({ int result = 0; __VA_ARGS__; if (!result) { fail(#__VA_ARGS__); }; result }) 14 15 static inline int f(int k) { 16 return MUNCH( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{returning 'void'}} 17 if (k < 3) 18 result = 24; 19 else if (k > 4) 20 result = k - 4; 21 } 22 23 #include "macro_arg_directive.h" // expected-error {{embedding a #include directive within macro arguments is not supported}} 24 25 int g(int k) { 26 return f(k) + f(k-1)); 27 } 28