blob: d049c028726e5473e832d05e9e351b10c026293d [file] [log] [blame]
Chris Lattner4b009652007-07-25 00:24:17 +00001/*
Ted Kremenek88bec0f2008-09-03 21:22:16 +00002 RUN: clang -E -trigraphs %s | grep bar &&
3 RUN: clang -E -trigraphs %s | grep foo &&
4 RUN: clang -E -trigraphs %s | not grep abc &&
5 RUN: clang -E -trigraphs %s | not grep xyz &&
6 RUN: clang -fsyntax-only -trigraphs -verify %s
7*/
Chris Lattner4b009652007-07-25 00:24:17 +00008
9// This is a simple comment, /*/ does not end a comment, the trailing */ does.
10int i = /*/ */ 1;
11
12/* 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
Chris Lattnerc6f830c2009-02-27 17:15:01 +000029foo /* expected-error {{invalid token after top level declarator}} */
Chris Lattner4b009652007-07-25 00:24:17 +000030
Chris Lattnerc3697802008-12-12 07:34:39 +000031
32// rdar://6060752 - We should not get warnings about trigraphs in comments:
33// '????'
34/* ???? */
35
36
37
38