Class: Clangc::Diagnostic

Inherits:
Object
  • Object
show all
Defined in:
ext/clangc/clangc.c,
lib/clangc.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) category

- (Object) category_name

- (Object) category_text

- (Object) format

- (Object) num_fixits

- (Object) num_ranges

- (Object) option

- (Object) severity

- (Object) source_location

- (Object) source_range

- (Object) source_ranges

:call-seq:

Clangc::Diagnostic#source_ranges => Array

Returns an array of Clangc::SourceRange for the current Clangc::Diagnostic. The array is empty if there is no Clangc::SourceRange



54
55
56
57
58
59
60
61
62
63
# File 'lib/clangc.rb', line 54

def source_ranges
  num = num_ranges
  sr = []
  return sr if num == 0

  for i in 0..(num - 1) do
    sr << source_range(i)
  end
  sr
end

- (Object) spelling