Documentation
¶
Index ¶
- func GetType(option *GetTypeOptions) (clang.Type, *clang.Index, *clang.TranslationUnit)
- func MarshalFileMap(fmap map[string]*llcppg.FileInfo) *cjson.JSON
- func MarshalPkg(pkg *llcppg.Pkg) *cjson.JSON
- func RunTest(testName string, testCases []string)
- func RunTestWithConfig(config *parse.ParseConfig)
- type GetTypeOptions
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 MarshalFileMap ¶
for test order map
func RunTestWithConfig ¶
func RunTestWithConfig(config *parse.ParseConfig)
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
}
Directories
¶
| Path | Synopsis |
|---|---|
|
complex_test
|
|
|
forwarddecl_test
command
|
|
|
preprocess_test
command
|
|
|
decl_test
|
|
|
class_test
command
|
|
|
comment_test
command
|
|
|
enum_test
command
|
|
|
func_test
command
|
|
|
scope_test
command
|
|
|
struct_test
command
|
|
|
typedef_test
command
|
|
|
union_test
command
|
|
Click to show internal directories.
Click to hide internal directories.