// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s \
// RUN: | FileCheck %s
/**
* \brief Aaa.
*/
int global_function();
// CHECK: int global_function()
/**
* \param x1 Aaa.
*/
extern void external_function(int x1);
// CHECK: extern void external_function(int x1)
/**
* \brief global variable;
*/
int global_variable;
// CHECK: int global_variable
/**
* \brief local variable;
*/
static int static_variable;
// CHECK: static int static_variable
/**
* \brief external variable
*/
extern int external_variable;
// CHECK: extern int external_variable
int global_function() {
/**
* \brief a local variable
*/
int local = 10;
return local;
}
// CHECK: int global_function()
// CHECK: int local = 10
/**
* \brief initialized decl.
*/
int initialized_global = 100;
// CHECK: int initialized_global = 100
/**
* \brief typedef example
*/
typedef int INT_T;
// CHECK: typedef int INT_T
/**
* \brief aggregate type example
*/
struct S {
/**
* \brief iS1;
*/
int iS1;
/**
* \brief dS1;
*/
double dS1;
};
// CHECK: struct S {}
// CHECK: int iS1
// CHECK: double dS1
/**
* \brief enum e;
*/
enum e {
One,
/**
* \brief Two;
*/
Two,
Three
};
// CHECK: enum e {}
// CHECK: Two
/**
*\brief block declaration
*/
int (^Block) (int i, int j);
// CHECK: int (^Block)(int, int)
/**
*\brief block declaration
*/
int (^Block1) (int i, int j) = ^(int i, int j) { return i + j; };
// CHECK: int (^Block1)(int, int) = ^(int i, int j) {}