Class: FFI::Clang::IndexAction::Diagnostic

Inherits:
Object
  • Object
show all
Defined in:
lib/ffi/clang/index_action.rb

Overview

Represents a diagnostic snapshot emitted during indexing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pointer) ⇒ Diagnostic

Build a diagnostic snapshot from a libclang diagnostic pointer.



33
34
35
36
37
# File 'lib/ffi/clang/index_action.rb', line 33

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

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



29
# File 'lib/ffi/clang/index_action.rb', line 29

attr_reader :severity, :spelling, :location

#severityObject (readonly)



29
30
31
# File 'lib/ffi/clang/index_action.rb', line 29

def severity
  @severity
end

#spellingObject (readonly)



29
# File 'lib/ffi/clang/index_action.rb', line 29

attr_reader :severity, :spelling, :location