2014-05-21 14:13:51 +08:00
|
|
|
/* RUN: %clang_cc1 -E -verify %s
|
2007-09-24 13:14:57 +08:00
|
|
|
*/
|
|
|
|
|
2014-05-21 14:13:51 +08:00
|
|
|
/* expected-error@+1 {{macro name missing}} */
|
2007-09-24 13:14:57 +08:00
|
|
|
#ifdef
|
2014-05-21 14:13:51 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* expected-error@+1 {{macro name must be an identifier}} */
|
|
|
|
#ifdef !
|
|
|
|
#endif
|
2007-09-24 13:14:57 +08:00
|
|
|
|
2014-05-21 14:13:51 +08:00
|
|
|
/* expected-error@+1 {{macro name missing}} */
|
|
|
|
#if defined
|
2007-09-24 13:14:57 +08:00
|
|
|
#endif
|
|
|
|
|
2008-01-23 03:34:51 +08:00
|
|
|
/* PR1936 */
|
2014-05-21 14:13:51 +08:00
|
|
|
/* expected-error@+2 {{unterminated function-like macro invocation}} expected-error@+2 {{expected value in expression}} expected-note@+1 {{macro 'f' defined here}} */
|
2008-01-23 03:34:51 +08:00
|
|
|
#define f(x) x
|
|
|
|
#if f(2
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int x;
|