2006-06-18 15:00:07 +08:00
|
|
|
/*
|
2007-06-27 15:26:41 +08:00
|
|
|
RUN: clang -E %s | grep bar &&
|
|
|
|
RUN: clang -E %s | grep foo &&
|
|
|
|
RUN: clang -E %s | not grep abc &&
|
|
|
|
RUN: clang -E %s | not grep xyz &&
|
2007-10-11 08:18:28 +08:00
|
|
|
RUN: clang -fsyntax-only -verify %s
|
2007-06-27 12:07:44 +08:00
|
|
|
*/
|
2006-06-18 15:00:07 +08:00
|
|
|
|
2007-07-22 07:43:37 +08:00
|
|
|
// This is a simple comment, /*/ does not end a comment, the trailing */ does.
|
|
|
|
int i = /*/ */ 1;
|
|
|
|
|
2006-06-18 15:00:07 +08:00
|
|
|
/* abc
|
|
|
|
|
2007-06-28 13:49:50 +08:00
|
|
|
next comment ends with normal escaped newline:
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* expected-warning {{escaped newline}} expected-warning {{backslash and newline}} *\
|
|
|
|
/
|
2006-06-18 15:00:07 +08:00
|
|
|
|
|
|
|
bar
|
|
|
|
|
|
|
|
/* xyz
|
|
|
|
|
2007-06-28 13:49:50 +08:00
|
|
|
next comment ends with a trigraph escaped newline: */
|
2006-06-18 15:00:07 +08:00
|
|
|
|
2007-06-28 13:49:50 +08:00
|
|
|
/* expected-warning {{escaped newline between}} expected-warning {{backslash and newline separated by space}} expected-warning {{trigraph ends block comment}} *??/
|
|
|
|
/
|
2007-06-27 12:07:44 +08:00
|
|
|
|
2007-06-28 13:49:50 +08:00
|
|
|
foo /* expected-error {{expected '=', ',', ';', 'asm', or '__attribute__' after declarator}} */
|
2006-06-18 15:00:07 +08:00
|
|
|
|