#stdout
TestFuncDecl Case 1:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"FuncDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"foo"
				},
				"MangledName":	"_Z3foov",
				"Type":	{
					"_Type":	"FuncType",
					"Params":	{
						"_Type":	"FieldList",
						"List":	null
					},
					"Ret":	{
						"_Type":	"BuiltinType",
						"Kind":	0,
						"Flags":	0
					}
				},
				"IsInline":	false,
				"IsStatic":	false,
				"IsConst":	false,
				"IsExplicit":	false,
				"IsConstructor":	false,
				"IsDestructor":	false,
				"IsVirtual":	false,
				"IsOverride":	false
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestFuncDecl Case 2:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"FuncDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"foo"
				},
				"MangledName":	"_Z3fooi",
				"Type":	{
					"_Type":	"FuncType",
					"Params":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	0,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"a"
									}]
							}]
					},
					"Ret":	{
						"_Type":	"BuiltinType",
						"Kind":	0,
						"Flags":	0
					}
				},
				"IsInline":	false,
				"IsStatic":	false,
				"IsConst":	false,
				"IsExplicit":	false,
				"IsConstructor":	false,
				"IsDestructor":	false,
				"IsVirtual":	false,
				"IsOverride":	false
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestFuncDecl Case 3:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"FuncDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"foo"
				},
				"MangledName":	"_Z3fooiz",
				"Type":	{
					"_Type":	"FuncType",
					"Params":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	0,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"a"
									}]
							}, {
								"_Type":	"Field",
								"Type":	{
									"_Type":	"Variadic"
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	0,
								"Names":	null
							}]
					},
					"Ret":	{
						"_Type":	"BuiltinType",
						"Kind":	0,
						"Flags":	0
					}
				},
				"IsInline":	false,
				"IsStatic":	false,
				"IsConst":	false,
				"IsExplicit":	false,
				"IsConstructor":	false,
				"IsDestructor":	false,
				"IsVirtual":	false,
				"IsOverride":	false
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestFuncDecl Case 4:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"FuncDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"foo"
				},
				"MangledName":	"_Z3fooid",
				"Type":	{
					"_Type":	"FuncType",
					"Params":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	0,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"a"
									}]
							}, {
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	8,
									"Flags":	16
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	0,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"b"
									}]
							}]
					},
					"Ret":	{
						"_Type":	"PointerType",
						"X":	{
							"_Type":	"BuiltinType",
							"Kind":	8,
							"Flags":	0
						}
					}
				},
				"IsInline":	false,
				"IsStatic":	false,
				"IsConst":	false,
				"IsExplicit":	false,
				"IsConstructor":	false,
				"IsDestructor":	false,
				"IsVirtual":	false,
				"IsOverride":	false
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestFuncDecl Case 5:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"FuncDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"add"
				},
				"MangledName":	"_ZL3addii",
				"Type":	{
					"_Type":	"FuncType",
					"Params":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	0,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"a"
									}]
							}, {
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	0,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"b"
									}]
							}]
					},
					"Ret":	{
						"_Type":	"BuiltinType",
						"Kind":	6,
						"Flags":	0
					}
				},
				"IsInline":	true,
				"IsStatic":	true,
				"IsConst":	false,
				"IsExplicit":	false,
				"IsConstructor":	false,
				"IsDestructor":	false,
				"IsVirtual":	false,
				"IsOverride":	false
			}],
		"includes":	[],
		"macros":	[]
	}
}


#stderr

#exit 0
