FFI::ClangSourceFFIClangIndexActionImportedASTFile

class ImportedASTFile

Represents an imported AST file encountered during indexing.

Definitions

attr_reader :file, :location

Signature

attribute r

file

returns File | Nil

The imported AST file.

attribute r

location

returns ExpansionLocation

The import location.

def initialize(info, translation_unit)

Build an imported AST file wrapper from low-level info.

Signature

parameter info Lib::CXIdxImportedASTFileInfo

The low-level import info.

parameter translation_unit TranslationUnit | Nil

The translation unit for derived wrappers.

Implementation

def initialize(info, translation_unit)
	@file = IncludedFile.file_from_pointer(info[:file], translation_unit)
	@location = ExpansionLocation.new(Lib.index_loc_get_source_location(info[:loc]))
	@implicit = info[:is_implicit] != 0
end

def implicit?

Check if this import was implicit.

Signature

returns Boolean

True if the import was implicit.

Implementation

def implicit?
	@implicit
end