class Diagnostic
Represents a diagnostic snapshot emitted during indexing.
Definitions
attr_reader :severity, :spelling, :location
Signature
-
attribute
r severity
-
returns
Symbol The diagnostic severity.
-
returns
-
attribute
r spelling
-
returns
String The diagnostic text.
-
returns
-
attribute
r location
-
returns
ExpansionLocation The diagnostic location.
-
returns
def initialize(pointer)
Build a diagnostic snapshot from a libclang diagnostic pointer.
Signature
-
parameter
pointerFFI::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