#stdout
TestTypeDefDecl Case 1:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"INT"
				},
				"Type":	{
					"_Type":	"BuiltinType",
					"Kind":	6,
					"Flags":	0
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 2:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"INT"
				},
				"Type":	{
					"_Type":	"BuiltinType",
					"Kind":	6,
					"Flags":	0
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"STANDARD_INT"
				},
				"Type":	{
					"_Type":	"Ident",
					"Name":	"INT"
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 3:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"INT"
				},
				"Type":	{
					"_Type":	"BuiltinType",
					"Kind":	6,
					"Flags":	0
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"IntPtr"
				},
				"Type":	{
					"_Type":	"PointerType",
					"X":	{
						"_Type":	"BuiltinType",
						"Kind":	6,
						"Flags":	0
					}
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"IntArr"
				},
				"Type":	{
					"_Type":	"ArrayType",
					"Elt":	{
						"_Type":	"BuiltinType",
						"Kind":	6,
						"Flags":	0
					},
					"Len":	null
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 4:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"Foo"
				},
				"Type":	{
					"_Type":	"PointerType",
					"X":	{
						"_Type":	"FuncType",
						"Params":	{
							"_Type":	"FieldList",
							"List":	[{
									"_Type":	"Field",
									"Type":	{
										"_Type":	"BuiltinType",
										"Kind":	6,
										"Flags":	0
									},
									"Doc":	null,
									"Comment":	null,
									"IsStatic":	false,
									"Access":	0,
									"Names":	null
								}, {
									"_Type":	"Field",
									"Type":	{
										"_Type":	"BuiltinType",
										"Kind":	6,
										"Flags":	0
									},
									"Doc":	null,
									"Comment":	null,
									"IsStatic":	false,
									"Access":	0,
									"Names":	null
								}, {
									"_Type":	"Field",
									"Type":	{
										"_Type":	"Variadic"
									},
									"Doc":	null,
									"Comment":	null,
									"IsStatic":	false,
									"Access":	0,
									"Names":	null
								}]
						},
						"Ret":	{
							"_Type":	"BuiltinType",
							"Kind":	6,
							"Flags":	0
						}
					}
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 5:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"Foo"
				},
				"Type":	{
					"_Type":	"PointerType",
					"X":	{
						"_Type":	"FuncType",
						"Params":	{
							"_Type":	"FieldList",
							"List":	[{
									"_Type":	"Field",
									"Type":	{
										"_Type":	"BuiltinType",
										"Kind":	6,
										"Flags":	0
									},
									"Doc":	null,
									"Comment":	null,
									"IsStatic":	false,
									"Access":	0,
									"Names":	null
								}, {
									"_Type":	"Field",
									"Type":	{
										"_Type":	"BuiltinType",
										"Kind":	6,
										"Flags":	0
									},
									"Doc":	null,
									"Comment":	null,
									"IsStatic":	false,
									"Access":	0,
									"Names":	null
								}]
						},
						"Ret":	{
							"_Type":	"BuiltinType",
							"Kind":	6,
							"Flags":	0
						}
					}
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"Bar"
				},
				"Type":	{
					"_Type":	"PointerType",
					"X":	{
						"_Type":	"FuncType",
						"Params":	{
							"_Type":	"FieldList",
							"List":	[{
									"_Type":	"Field",
									"Type":	{
										"_Type":	"PointerType",
										"X":	{
											"_Type":	"BuiltinType",
											"Kind":	0,
											"Flags":	0
										}
									},
									"Doc":	null,
									"Comment":	null,
									"IsStatic":	false,
									"Access":	0,
									"Names":	null
								}, {
									"_Type":	"Field",
									"Type":	{
										"_Type":	"PointerType",
										"X":	{
											"_Type":	"BuiltinType",
											"Kind":	0,
											"Flags":	0
										}
									},
									"Doc":	null,
									"Comment":	null,
									"IsStatic":	false,
									"Access":	0,
									"Names":	null
								}]
						},
						"Ret":	{
							"_Type":	"BuiltinType",
							"Kind":	6,
							"Flags":	0
						}
					}
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 6:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypeDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	{
					"_Type":	"Ident",
					"Name":	"A"
				},
				"Name":	{
					"_Type":	"Ident",
					"Name":	"Foo"
				},
				"Type":	{
					"_Type":	"RecordType",
					"Tag":	3,
					"Fields":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	3,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"x"
									}]
							}]
					},
					"Methods":	[]
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	{
					"_Type":	"Ident",
					"Name":	"A"
				},
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyClass"
				},
				"Type":	{
					"_Type":	"TagExpr",
					"Name":	{
						"_Type":	"ScopingExpr",
						"X":	{
							"_Type":	"Ident",
							"Name":	"Foo"
						},
						"Parent":	{
							"_Type":	"Ident",
							"Name":	"A"
						}
					},
					"Tag":	3
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	{
					"_Type":	"Ident",
					"Name":	"A"
				},
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyClassPtr"
				},
				"Type":	{
					"_Type":	"PointerType",
					"X":	{
						"_Type":	"TagExpr",
						"Name":	{
							"_Type":	"ScopingExpr",
							"X":	{
								"_Type":	"Ident",
								"Name":	"Foo"
							},
							"Parent":	{
								"_Type":	"Ident",
								"Name":	"A"
							}
						},
						"Tag":	3
					}
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	{
					"_Type":	"Ident",
					"Name":	"A"
				},
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyClassArray"
				},
				"Type":	{
					"_Type":	"ArrayType",
					"Elt":	{
						"_Type":	"TagExpr",
						"Name":	{
							"_Type":	"ScopingExpr",
							"X":	{
								"_Type":	"Ident",
								"Name":	"Foo"
							},
							"Parent":	{
								"_Type":	"Ident",
								"Name":	"A"
							}
						},
						"Tag":	3
					},
					"Len":	null
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 7:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypeDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyStruct"
				},
				"Type":	{
					"_Type":	"RecordType",
					"Tag":	0,
					"Fields":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	1,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"x"
									}]
							}]
					},
					"Methods":	[]
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 8:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypeDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyUnion"
				},
				"Type":	{
					"_Type":	"RecordType",
					"Tag":	1,
					"Fields":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	1,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"x"
									}]
							}]
					},
					"Methods":	[]
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 9:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"EnumTypeDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyEnum"
				},
				"Type":	{
					"_Type":	"EnumType",
					"Items":	[{
							"_Type":	"EnumItem",
							"Name":	{
								"_Type":	"Ident",
								"Name":	"RED"
							},
							"Value":	{
								"_Type":	"BasicLit",
								"Kind":	0,
								"Value":	"0"
							}
						}, {
							"_Type":	"EnumItem",
							"Name":	{
								"_Type":	"Ident",
								"Name":	"GREEN"
							},
							"Value":	{
								"_Type":	"BasicLit",
								"Kind":	0,
								"Value":	"1"
							}
						}, {
							"_Type":	"EnumItem",
							"Name":	{
								"_Type":	"Ident",
								"Name":	"BLUE"
							},
							"Value":	{
								"_Type":	"BasicLit",
								"Kind":	0,
								"Value":	"2"
							}
						}]
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 10:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypeDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyStruct"
				},
				"Type":	{
					"_Type":	"RecordType",
					"Tag":	0,
					"Fields":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	1,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"x"
									}]
							}]
					},
					"Methods":	[]
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyStruct2"
				},
				"Type":	{
					"_Type":	"TagExpr",
					"Name":	{
						"_Type":	"Ident",
						"Name":	"MyStruct"
					},
					"Tag":	0
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"StructPtr"
				},
				"Type":	{
					"_Type":	"PointerType",
					"X":	{
						"_Type":	"TagExpr",
						"Name":	{
							"_Type":	"Ident",
							"Name":	"MyStruct"
						},
						"Tag":	0
					}
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"StructArr"
				},
				"Type":	{
					"_Type":	"ArrayType",
					"Elt":	{
						"_Type":	"TagExpr",
						"Name":	{
							"_Type":	"Ident",
							"Name":	"MyStruct"
						},
						"Tag":	0
					},
					"Len":	null
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 11:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"EnumTypeDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyEnum"
				},
				"Type":	{
					"_Type":	"EnumType",
					"Items":	[{
							"_Type":	"EnumItem",
							"Name":	{
								"_Type":	"Ident",
								"Name":	"RED"
							},
							"Value":	{
								"_Type":	"BasicLit",
								"Kind":	0,
								"Value":	"0"
							}
						}, {
							"_Type":	"EnumItem",
							"Name":	{
								"_Type":	"Ident",
								"Name":	"GREEN"
							},
							"Value":	{
								"_Type":	"BasicLit",
								"Kind":	0,
								"Value":	"1"
							}
						}, {
							"_Type":	"EnumItem",
							"Name":	{
								"_Type":	"Ident",
								"Name":	"BLUE"
							},
							"Value":	{
								"_Type":	"BasicLit",
								"Kind":	0,
								"Value":	"2"
							}
						}]
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyEnum2"
				},
				"Type":	{
					"_Type":	"TagExpr",
					"Name":	{
						"_Type":	"Ident",
						"Name":	"MyEnum"
					},
					"Tag":	2
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"EnumPtr"
				},
				"Type":	{
					"_Type":	"PointerType",
					"X":	{
						"_Type":	"TagExpr",
						"Name":	{
							"_Type":	"Ident",
							"Name":	"MyEnum"
						},
						"Tag":	2
					}
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	null,
				"Name":	{
					"_Type":	"Ident",
					"Name":	"EnumArr"
				},
				"Type":	{
					"_Type":	"ArrayType",
					"Elt":	{
						"_Type":	"TagExpr",
						"Name":	{
							"_Type":	"Ident",
							"Name":	"MyEnum"
						},
						"Tag":	2
					},
					"Len":	null
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}

TestTypeDefDecl Case 12:
{
	"temp.h":	{
		"_Type":	"File",
		"decls":	[{
				"_Type":	"TypeDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	{
					"_Type":	"ScopingExpr",
					"X":	{
						"_Type":	"Ident",
						"Name":	"B"
					},
					"Parent":	{
						"_Type":	"Ident",
						"Name":	"A"
					}
				},
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyStruct"
				},
				"Type":	{
					"_Type":	"RecordType",
					"Tag":	0,
					"Fields":	{
						"_Type":	"FieldList",
						"List":	[{
								"_Type":	"Field",
								"Type":	{
									"_Type":	"BuiltinType",
									"Kind":	6,
									"Flags":	0
								},
								"Doc":	null,
								"Comment":	null,
								"IsStatic":	false,
								"Access":	1,
								"Names":	[{
										"_Type":	"Ident",
										"Name":	"x"
									}]
							}]
					},
					"Methods":	[]
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	{
					"_Type":	"ScopingExpr",
					"X":	{
						"_Type":	"Ident",
						"Name":	"B"
					},
					"Parent":	{
						"_Type":	"Ident",
						"Name":	"A"
					}
				},
				"Name":	{
					"_Type":	"Ident",
					"Name":	"MyStruct2"
				},
				"Type":	{
					"_Type":	"TagExpr",
					"Name":	{
						"_Type":	"ScopingExpr",
						"X":	{
							"_Type":	"Ident",
							"Name":	"MyStruct"
						},
						"Parent":	{
							"_Type":	"ScopingExpr",
							"X":	{
								"_Type":	"Ident",
								"Name":	"B"
							},
							"Parent":	{
								"_Type":	"Ident",
								"Name":	"A"
							}
						}
					},
					"Tag":	0
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	{
					"_Type":	"ScopingExpr",
					"X":	{
						"_Type":	"Ident",
						"Name":	"B"
					},
					"Parent":	{
						"_Type":	"Ident",
						"Name":	"A"
					}
				},
				"Name":	{
					"_Type":	"Ident",
					"Name":	"StructPtr"
				},
				"Type":	{
					"_Type":	"PointerType",
					"X":	{
						"_Type":	"TagExpr",
						"Name":	{
							"_Type":	"ScopingExpr",
							"X":	{
								"_Type":	"Ident",
								"Name":	"MyStruct"
							},
							"Parent":	{
								"_Type":	"ScopingExpr",
								"X":	{
									"_Type":	"Ident",
									"Name":	"B"
								},
								"Parent":	{
									"_Type":	"Ident",
									"Name":	"A"
								}
							}
						},
						"Tag":	0
					}
				}
			}, {
				"_Type":	"TypedefDecl",
				"Loc":	{
					"_Type":	"Location",
					"File":	"temp.h"
				},
				"Doc":	null,
				"Parent":	{
					"_Type":	"ScopingExpr",
					"X":	{
						"_Type":	"Ident",
						"Name":	"B"
					},
					"Parent":	{
						"_Type":	"Ident",
						"Name":	"A"
					}
				},
				"Name":	{
					"_Type":	"Ident",
					"Name":	"StructArr"
				},
				"Type":	{
					"_Type":	"ArrayType",
					"Elt":	{
						"_Type":	"TagExpr",
						"Name":	{
							"_Type":	"ScopingExpr",
							"X":	{
								"_Type":	"Ident",
								"Name":	"MyStruct"
							},
							"Parent":	{
								"_Type":	"ScopingExpr",
								"X":	{
									"_Type":	"Ident",
									"Name":	"B"
								},
								"Parent":	{
									"_Type":	"Ident",
									"Name":	"A"
								}
							}
						},
						"Tag":	0
					},
					"Len":	null
				}
			}],
		"includes":	[],
		"macros":	[]
	}
}


#stderr

#exit 0
