Class: FFI::Clang::IndexAction::Diagnostic
- Inherits:
-
Object
- Object
- FFI::Clang::IndexAction::Diagnostic
- Defined in:
- lib/ffi/clang/index_action.rb
Overview
Represents a diagnostic snapshot emitted during indexing.
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
- #severity ⇒ Object readonly
- #spelling ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(pointer) ⇒ Diagnostic
constructor
Build a diagnostic snapshot from a libclang diagnostic pointer.
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
#location ⇒ Object (readonly)
Returns the value of attribute location.
29 |
# File 'lib/ffi/clang/index_action.rb', line 29 attr_reader :severity, :spelling, :location |
#severity ⇒ Object (readonly)
29 30 31 |
# File 'lib/ffi/clang/index_action.rb', line 29 def severity @severity end |
#spelling ⇒ Object (readonly)
29 |
# File 'lib/ffi/clang/index_action.rb', line 29 attr_reader :severity, :spelling, :location |