示例#1
0
文件: type.go 项目: zimmski/go-clang
// CanonicalType returns the canonical type for a Type.
//
// Clang's type system explicitly models typedefs and all the ways
// a specific type can be represented.  The canonical type is the underlying
// type with all the "sugar" removed.  For example, if 'T' is a typedef
// for 'int', the canonical type for 'T' would be 'int'.
func (t Type) CanonicalType() Type {
	o := C.clang_getCanonicalType(t.c)
	return Type{o}
}
示例#2
0
文件: type_gen.go 项目: go-clang/v3.4
/*
	Return the canonical type for a CXType.

	Clang's type system explicitly models typedefs and all the ways
	a specific type can be represented. The canonical type is the underlying
	type with all the "sugar" removed. For example, if 'T' is a typedef
	for 'int', the canonical type for 'T' would be 'int'.
*/
func (t Type) CanonicalType() Type {
	return Type{C.clang_getCanonicalType(t.c)}
}