FFI::ClangSourceFFIClangIndexActionDiagnostic

class Diagnostic

Represents a diagnostic snapshot emitted during indexing.

Definitions

attr_reader :severity, :spelling, :location

Signature

attribute r

severity

returns Symbol

The diagnostic severity.

attribute r

spelling

returns String

The diagnostic text.

attribute r

location

returns ExpansionLocation

The diagnostic location.

def initialize(pointer)

Build a diagnostic snapshot from a libclang diagnostic pointer.

Signature

parameter pointer FFI::Pointer

The libclang diagnostic pointer.

Implementation

def initialize(pointer)
	@severity = Lib.get_diagnostic_severity(pointer)
	@spelling = Lib.extract_string(Lib.get_diagnostic_spelling(pointer))
	@location = ExpansionLocation.new(Lib.get_diagnostic_location(pointer))
end