1// RUN: rm -rf %t 2// RUN: mkdir %t 3// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s \ 4// RUN: | FileCheck %s 5 6/** 7 * \brief Aaa. 8*/ 9int global_function(); 10// CHECK: <Declaration>int global_function()</Declaration> 11 12/** 13 * \param x1 Aaa. 14*/ 15extern void external_function(int x1); 16// CHECK: <Declaration>extern void external_function(int x1)</Declaration> 17 18/** 19 * \brief global variable; 20*/ 21int global_variable; 22// CHECK: <Declaration>int global_variable</Declaration> 23 24/** 25 * \brief local variable; 26*/ 27static int static_variable; 28// CHECK: <Declaration>static int static_variable</Declaration> 29 30/** 31 * \brief external variable 32*/ 33extern int external_variable; 34// CHECK: <Declaration>extern int external_variable</Declaration> 35 36int global_function() { 37 /** 38 * \brief a local variable 39 */ 40 int local = 10; 41 return local; 42} 43// CHECK: <Declaration>int global_function()</Declaration> 44// CHECK: <Declaration>int local = 10</Declaration> 45 46/** 47 * \brief initialized decl. 48*/ 49int initialized_global = 100; 50// CHECK: <Declaration>int initialized_global = 100</Declaration> 51 52/** 53 * \brief typedef example 54*/ 55typedef int INT_T; 56// CHECK: <Declaration>typedef int INT_T</Declaration> 57 58/** 59 * \brief aggregate type example 60*/ 61struct S { 62/** 63 * \brief iS1; 64*/ 65 int iS1; 66/** 67 * \brief dS1; 68*/ 69 double dS1; 70}; 71// CHECK: <Declaration>struct S {}</Declaration> 72// CHECK: <Declaration>int iS1</Declaration> 73// CHECK: <Declaration>double dS1</Declaration> 74 75/** 76 * \brief enum e; 77*/ 78enum e { 79 One, 80/** 81 * \brief Two; 82*/ 83 Two, 84 Three 85}; 86// CHECK: <Declaration>enum e {}</Declaration> 87// CHECK: <Declaration>Two</Declaration> 88 89/** 90 *\brief block declaration 91*/ 92int (^Block) (int i, int j); 93// CHECK: <Declaration>int (^Block)(int, int)</Declaration> 94 95/** 96 *\brief block declaration 97*/ 98int (^Block1) (int i, int j) = ^(int i, int j) { return i + j; }; 99// CHECK: <Declaration>int (^Block1)(int, int) = ^(int i, int j) {\n}</Declaration> 100