Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetType ¶
func GetType(option *GetTypeOptions) (clang.Type, *clang.Index, *clang.TranslationUnit)
GetType returns the clang.Type of the given type code Need to dispose the index and unit after using e.g. index.Dispose(), unit.Dispose()
func RunTestWithConfig ¶
func RunTestWithConfig(config *clangutils.Config)
Types ¶
type GetTypeOptions ¶
type GetTypeOptions struct { TypeCode string // e.g. "char*", "char**" // ExpectTypeKind specifies the expected type kind (optional) // Use clang.Type_Invalid to accept any type (default behavior) // *For complex types (when <complex.h> is included), specifying this is crucial // to filter out the correct type, as there will be multiple VarDecl fields present ExpectTypeKind clang.TypeKind // Args contains additional compilation arguments passed to Clang (optional) // These are appended after the default language-specific arguments // Example: []string{"-std=c++11"} Args []string // IsCpp indicates whether the code should be treated as C++ (true) or C (false) // This affects the default language arguments passed to Clang: // - For C++: []string{"-x", "c++"} // - For C: []string{"-x", "c"} // *For complex C types, C Must be specified IsCpp bool }
Click to show internal directories.
Click to hide internal directories.