blob: 30e6d92eee22a31ee7c5d3d4dd02da01334f8799 [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001/*
2 RUN: clang -E %s | grep bar &&
3 RUN: clang -E %s | grep foo &&
4 RUN: clang -E %s | not grep abc &&
5 RUN: clang -E %s | not grep xyz &&
Chris Lattner3b427b32007-10-11 00:18:28 +00006 RUN: clang -fsyntax-only -verify %s
Reid Spencer5f016e22007-07-11 17:01:13 +00007 */
8
Chris Lattner8146b682007-07-21 23:43:37 +00009// This is a simple comment, /*/ does not end a comment, the trailing */ does.
10int i = /*/ */ 1;
11
Reid Spencer5f016e22007-07-11 17:01:13 +000012/* abc
13
14next comment ends with normal escaped newline:
15*/
16
17/* expected-warning {{escaped newline}} expected-warning {{backslash and newline}} *\
18/
19
20bar
21
22/* xyz
23
24next comment ends with a trigraph escaped newline: */
25
26/* expected-warning {{escaped newline between}} expected-warning {{backslash and newline separated by space}} expected-warning {{trigraph ends block comment}} *??/
27/
28
29foo /* expected-error {{expected '=', ',', ';', 'asm', or '__attribute__' after declarator}} */
30