clangutils

package
v0.0.0-...-e5409a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TEMP_FILE = "temp.h"

Variables

This section is empty.

Functions

func BuildScopingParts

func BuildScopingParts(cursor clang.Cursor) []string

Traverse up the semantic parents

func CreateTranslationUnit

func CreateTranslationUnit(config *Config) (*clang.Index, *clang.TranslationUnit, error)

func GetInclusions

func GetInclusions(unit *clang.TranslationUnit, visitor InclusionVisitor)

func GetLocation

func GetLocation(loc clang.SourceLocation) (file clang.File, line c.Uint, column c.Uint, offset c.Uint)

func VisitChildren

func VisitChildren(cursor clang.Cursor, fn Visitor) c.Uint

Types

type Config

type Config struct {
	File  string
	Temp  bool
	Args  []string
	IsCpp bool
	Index *clang.Index
}

type InclusionVisitor

type InclusionVisitor func(included_file clang.File, inclusions []clang.SourceLocation)

type Visitor

type Visitor func(cursor, parent clang.Cursor) clang.ChildVisitResult

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL