blob: 83bdbf6eed7d002553236748369c46a2bfa7d2e6 [file] [log] [blame]
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +00001// Run lines are sensitive to line numbers and come below the code.
Douglas Gregor2e222532009-07-02 17:08:52 +00002
3//! It all starts here.
4/*! It's a little odd to continue line this,
5 *
6 * but we need more multi-line comments. */
7/// This comment comes before my other comments
8/** This is a block comment that is associated with the function f. It
9 * runs for three lines.
10 */
11void f(int, int);
12
13// NOT IN THE COMMENT
14/// This is a BCPL comment that is associated with the function g.
15/// It has only two lines.
16/** But there are other blocks that are part of the comment, too. */
17void g(int);
18
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000019void h(int); ///< This is a member comment.
20
21
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000022// RUN: clang-cc -emit-pch -o %t.ast %s
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000023
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000024// RUN: index-test %t.ast -point-at %s:11:6 > %t
25// RUN: grep "starts here" %t
26// RUN: grep "block comment" %t
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000027
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000028// RUN: index-test %t.ast -point-at %s:17:6 > %t
29// RUN: grep "BCPL" %t
30// RUN: grep "But" %t
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000031
Daniel Dunbar4fcfde42009-11-08 01:45:36 +000032// RUN: index-test %t.ast -point-at %s:19:6 > %t
33// RUN: grep "NOT" %t | count 0
Argyrios Kyrtzidis3e8efd92009-07-21 00:06:46 +000034// RUN: grep "member" %t