ffi-clang 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +4 -0
- data/ext/rakefile.rb +4 -0
- data/ext/teapot.rb +4 -3
- data/lib/ffi/clang/clang_version.rb +9 -19
- data/lib/ffi/clang/code_completion.rb +4 -18
- data/lib/ffi/clang/comment.rb +7 -19
- data/lib/ffi/clang/compilation_database.rb +4 -18
- data/lib/ffi/clang/cursor.rb +70 -25
- data/lib/ffi/clang/diagnostic.rb +8 -21
- data/lib/ffi/clang/file.rb +4 -18
- data/lib/ffi/clang/index.rb +9 -20
- data/lib/ffi/clang/lib/clang_version.rb +5 -19
- data/lib/ffi/clang/lib/code_completion.rb +4 -18
- data/lib/ffi/clang/lib/comment.rb +7 -20
- data/lib/ffi/clang/lib/compilation_database.rb +4 -18
- data/lib/ffi/clang/lib/cursor.rb +34 -23
- data/lib/ffi/clang/lib/diagnostic.rb +7 -20
- data/lib/ffi/clang/lib/file.rb +5 -20
- data/lib/ffi/clang/lib/inclusions.rb +5 -19
- data/lib/ffi/clang/lib/index.rb +6 -20
- data/lib/ffi/clang/lib/source_location.rb +5 -20
- data/lib/ffi/clang/lib/source_range.rb +5 -22
- data/lib/ffi/clang/lib/string.rb +6 -20
- data/lib/ffi/clang/lib/token.rb +4 -18
- data/lib/ffi/clang/lib/translation_unit.rb +6 -20
- data/lib/ffi/clang/lib/type.rb +8 -20
- data/lib/ffi/clang/lib.rb +15 -20
- data/lib/ffi/clang/source_location.rb +7 -20
- data/lib/ffi/clang/source_range.rb +7 -22
- data/lib/ffi/clang/token.rb +4 -18
- data/lib/ffi/clang/translation_unit.rb +10 -20
- data/lib/ffi/clang/type.rb +7 -19
- data/lib/ffi/clang/unsaved_file.rb +6 -20
- data/lib/ffi/clang/version.rb +7 -21
- data/lib/ffi/clang.rb +9 -20
- data/license.md +38 -0
- data/readme.md +46 -0
- data.tar.gz.sig +0 -0
- metadata +71 -73
- metadata.gz.sig +2 -0
- data/.editorconfig +0 -23
- data/.gitignore +0 -19
- data/.rspec +0 -5
- data/.travis.yml +0 -30
- data/Gemfile +0 -12
- data/README.md +0 -74
- data/Rakefile +0 -12
- data/examples/docs.cpp +0 -25
- data/examples/docs.rb +0 -31
- data/ffi-clang.gemspec +0 -25
- data/spec/ffi/clang/code_completion_spec.rb +0 -181
- data/spec/ffi/clang/comment_spec.rb +0 -453
- data/spec/ffi/clang/compilation_database_spec.rb +0 -180
- data/spec/ffi/clang/cursor_spec.rb +0 -741
- data/spec/ffi/clang/diagnostic_spec.rb +0 -89
- data/spec/ffi/clang/file_spec.rb +0 -82
- data/spec/ffi/clang/fixtures/a.c +0 -7
- data/spec/ffi/clang/fixtures/canonical.c +0 -5
- data/spec/ffi/clang/fixtures/class.cpp +0 -8
- data/spec/ffi/clang/fixtures/compile_commands.json +0 -17
- data/spec/ffi/clang/fixtures/completion.cxx +0 -8
- data/spec/ffi/clang/fixtures/docs.c +0 -1
- data/spec/ffi/clang/fixtures/docs.cc +0 -1
- data/spec/ffi/clang/fixtures/docs.h +0 -54
- data/spec/ffi/clang/fixtures/list.c +0 -11
- data/spec/ffi/clang/fixtures/location1.c +0 -7
- data/spec/ffi/clang/fixtures/simple.ast +0 -0
- data/spec/ffi/clang/fixtures/simple.c +0 -3
- data/spec/ffi/clang/fixtures/test.cxx +0 -62
- data/spec/ffi/clang/index_spec.rb +0 -90
- data/spec/ffi/clang/source_location_spec.rb +0 -138
- data/spec/ffi/clang/source_range_spec.rb +0 -74
- data/spec/ffi/clang/token_spec.rb +0 -82
- data/spec/ffi/clang/translation_unit_spec.rb +0 -220
- data/spec/ffi/clang/type_spec.rb +0 -273
- data/spec/ffi/clang/version_spec.rb +0 -28
- data/spec/spec_helper.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49fb826573fff8e593fdd5671533332527ac2284b50740700134ddd7425d22dd
|
4
|
+
data.tar.gz: 00ad98e0fe43999cb523be92b759cb5c4973d9ba24726420e97d98470c734eb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ebff7af9edbd58036a10ca360c801ddf1b9a8e251f6a869f48371a971e3497186d5abc52aa2bf9d883e7207f769973b0e998fae98d7d5ef2c0f6df989de6a17
|
7
|
+
data.tar.gz: bbb56cd257720aa7fa87e12f068f9899b8f254b9cdc5d5036419744c4362f14eb21d48049418a4fa7f11ea6769806b6b758baab09c0c63a7b5ce4f2bf269b455
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1,4 @@
|
|
1
|
+
�5٣���ǵ&�
|
2
|
+
�~of�[��ɾ�r�$MWL��Е�芅�lV!`At�1�D�&o8�����~�����2ׇ�t2�M؝1ڙ�{>�����_ǡIr���d�=T>�w�����/�ol�WN#5HT�%ˆ,�W6
|
3
|
+
Y�'z����tae�_��$Me�-�"U�h�'E�dž�k�����,2�-�E\��~���<�iO���l�#l�� =�OI!E\S��wX�C�H�� +y��!; r�.I���+������E��.1Ѵ���\q�����/�qq� �J�v')ة�1;�����(}'�g�j.�(���̀|�C_$ P���D_*�!�T���~������65H�,`�X-.����
|
4
|
+
�Z�4?IcE
|
data/ext/rakefile.rb
CHANGED
data/ext/teapot.rb
CHANGED
@@ -1,22 +1,7 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2016-2022, by Samuel Williams.
|
20
5
|
|
21
6
|
require_relative 'lib/clang_version'
|
22
7
|
|
@@ -25,5 +10,10 @@ module FFI
|
|
25
10
|
def self.clang_version_string
|
26
11
|
Lib.extract_string Lib.get_clang_version
|
27
12
|
end
|
13
|
+
|
14
|
+
def self.clang_version
|
15
|
+
clang_version = self.clang_version_string.match(/\d+\.\d+\.\d+/)
|
16
|
+
Gem::Version.new(clang_version)
|
17
|
+
end
|
28
18
|
end
|
29
19
|
end
|
@@ -1,22 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
1
4
|
# Copyright, 2014, by Masahiro Sano.
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
# of this software and associated documentation files (the "Software"), to deal
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
require_relative 'lib/code_completion'
|
22
8
|
|
data/lib/ffi/clang/comment.rb
CHANGED
@@ -1,22 +1,10 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
6
|
+
# Copyright, 2014, by George Pimm.
|
7
|
+
# Copyright, 2014, by Masahiro Sano.
|
20
8
|
|
21
9
|
require_relative 'lib/cursor'
|
22
10
|
require_relative 'lib/comment'
|
@@ -1,22 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
1
4
|
# Copyright, 2014, by Masahiro Sano.
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
# of this software and associated documentation files (the "Software"), to deal
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
require_relative 'lib/compilation_database'
|
22
8
|
|
data/lib/ffi/clang/cursor.rb
CHANGED
@@ -1,24 +1,16 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Garry Marshall.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
6
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
7
|
+
# Copyright, 2013, by Dave Wilkinson.
|
8
|
+
# Copyright, 2013, by Takeshi Watanabe.
|
3
9
|
# Copyright, 2014, by Masahiro Sano.
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
10
|
+
# Copyright, 2014, by George Pimm.
|
11
|
+
# Copyright, 2014, by Niklas Therning.
|
12
|
+
# Copyright, 2019, by Michael Metivier.
|
13
|
+
# Copyright, 2022, by Motonori Iwamuro.
|
22
14
|
|
23
15
|
require_relative 'lib/cursor'
|
24
16
|
require_relative 'lib/code_completion'
|
@@ -322,10 +314,6 @@ module FFI
|
|
322
314
|
overriddens
|
323
315
|
end
|
324
316
|
|
325
|
-
def hash
|
326
|
-
Lib.get_cursor_hash(@cursor)
|
327
|
-
end
|
328
|
-
|
329
317
|
def bitfield?
|
330
318
|
Lib.is_bit_field(@cursor) != 0
|
331
319
|
end
|
@@ -354,9 +342,14 @@ module FFI
|
|
354
342
|
Lib.cursor_get_num_arguments(@cursor)
|
355
343
|
end
|
356
344
|
|
357
|
-
def
|
345
|
+
def eql?(other)
|
358
346
|
Lib.are_equal(@cursor, other.cursor) != 0
|
359
347
|
end
|
348
|
+
alias == eql?
|
349
|
+
|
350
|
+
def hash
|
351
|
+
Lib.get_cursor_hash(@cursor)
|
352
|
+
end
|
360
353
|
|
361
354
|
def find_all(*kinds)
|
362
355
|
filter do |child, parent|
|
@@ -403,6 +396,58 @@ module FFI
|
|
403
396
|
refs
|
404
397
|
end
|
405
398
|
|
399
|
+
def converting_constructor?
|
400
|
+
Lib.is_converting_constructor(@cursor) != 0
|
401
|
+
end
|
402
|
+
|
403
|
+
def copy_constructor?
|
404
|
+
Lib.is_copy_constructor(@cursor) != 0
|
405
|
+
end
|
406
|
+
|
407
|
+
def default_constructor?
|
408
|
+
Lib.is_default_constructor(@cursor) != 0
|
409
|
+
end
|
410
|
+
|
411
|
+
def move_constructor?
|
412
|
+
Lib.is_move_constructor(@cursor) != 0
|
413
|
+
end
|
414
|
+
|
415
|
+
def mutable?
|
416
|
+
Lib.is_mutable(@cursor) != 0
|
417
|
+
end
|
418
|
+
|
419
|
+
def defaulted?
|
420
|
+
Lib.is_defaulted(@cursor) != 0
|
421
|
+
end
|
422
|
+
|
423
|
+
def deleted?
|
424
|
+
Lib.is_deleted(@cursor) != 0
|
425
|
+
end
|
426
|
+
|
427
|
+
def copy_assignment_operator?
|
428
|
+
Lib.is_copy_assignment_operator(@cursor) != 0
|
429
|
+
end
|
430
|
+
|
431
|
+
def move_assignment_operator?
|
432
|
+
Lib.is_move_assignment_operator(@cursor) != 0
|
433
|
+
end
|
434
|
+
|
435
|
+
def explicit?
|
436
|
+
Lib.is_explicit(@cursor) != 0
|
437
|
+
end
|
438
|
+
|
439
|
+
def abstract?
|
440
|
+
Lib.is_abstract(@cursor) != 0
|
441
|
+
end
|
442
|
+
|
443
|
+
def enum_scoped?
|
444
|
+
Lib.is_enum_scoped(@cursor) != 0
|
445
|
+
end
|
446
|
+
|
447
|
+
def const?
|
448
|
+
Lib.is_const(@cursor) != 0
|
449
|
+
end
|
450
|
+
|
406
451
|
class PlatformAvailability < AutoPointer
|
407
452
|
def initialize(memory_pointer)
|
408
453
|
pointer = FFI::Pointer.new(memory_pointer)
|
data/lib/ffi/clang/diagnostic.rb
CHANGED
@@ -1,24 +1,11 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
7
|
+
# Copyright, 2013, by Garry Marshall.
|
8
|
+
# Copyright, 2014, by Masahiro Sano.
|
22
9
|
|
23
10
|
require_relative 'lib/diagnostic'
|
24
11
|
require_relative 'source_range'
|
data/lib/ffi/clang/file.rb
CHANGED
@@ -1,22 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
1
4
|
# Copyright, 2014, by Masahiro Sano.
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
# of this software and associated documentation files (the "Software"), to deal
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
require_relative 'lib/file'
|
22
8
|
|
data/lib/ffi/clang/index.rb
CHANGED
@@ -1,24 +1,13 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2010, by Jari Bakken.
|
5
|
+
# Copyright, 2012, by Hal Brodigan.
|
6
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
7
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
8
|
+
# Copyright, 2013, by Dave Wilkinson.
|
9
|
+
# Copyright, 2013, by Takeshi Watanabe.
|
3
10
|
# Copyright, 2014, by Masahiro Sano.
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
11
|
|
23
12
|
require_relative 'lib/index'
|
24
13
|
|
@@ -1,22 +1,8 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2014, by Masahiro Sano.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
require_relative 'string'
|
22
8
|
|
@@ -1,22 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
1
4
|
# Copyright, 2014, by Masahiro Sano.
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
# of this software and associated documentation files (the "Software"), to deal
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
require_relative 'cursor'
|
22
8
|
require_relative 'diagnostic'
|
@@ -1,23 +1,10 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
6
|
+
# Copyright, 2014, by George Pimm.
|
7
|
+
# Copyright, 2014, by Masahiro Sano.
|
21
8
|
|
22
9
|
module FFI
|
23
10
|
module Clang
|
@@ -1,22 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
1
4
|
# Copyright, 2014, by Masahiro Sano.
|
2
|
-
#
|
3
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
# of this software and associated documentation files (the "Software"), to deal
|
5
|
-
# in the Software without restriction, including without limitation the rights
|
6
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
# copies of the Software, and to permit persons to whom the Software is
|
8
|
-
# furnished to do so, subject to the following conditions:
|
9
|
-
#
|
10
|
-
# The above copyright notice and this permission notice shall be included in
|
11
|
-
# all copies or substantial portions of the Software.
|
12
|
-
#
|
13
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2014-2022, by Samuel Williams.
|
20
6
|
|
21
7
|
module FFI
|
22
8
|
module Clang
|
data/lib/ffi/clang/lib/cursor.rb
CHANGED
@@ -1,25 +1,16 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
# Copyright,
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013, by Garry Marshall.
|
5
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
6
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
7
|
+
# Copyright, 2013, by Dave Wilkinson.
|
8
|
+
# Copyright, 2013, by Takeshi Watanabe.
|
9
|
+
# Copyright, 2013-2014, by Masahiro Sano.
|
10
|
+
# Copyright, 2014, by George Pimm.
|
11
|
+
# Copyright, 2014, by Niklas Therning.
|
12
|
+
# Copyright, 2019, by Michael Metivier.
|
13
|
+
# Copyright, 2020, by Luikore.
|
23
14
|
|
24
15
|
require_relative 'translation_unit'
|
25
16
|
require_relative 'diagnostic'
|
@@ -29,6 +20,9 @@ require_relative 'type'
|
|
29
20
|
module FFI
|
30
21
|
module Clang
|
31
22
|
module Lib
|
23
|
+
# In Clang 15 the enum value changed from 300 to 350!
|
24
|
+
CUSOR_TRANSLATION_UNIT = Clang.clang_version < Gem::Version.new('15.0.0') ? 300 : 350
|
25
|
+
|
32
26
|
enum :cursor_kind, [
|
33
27
|
:cursor_unexposed_decl, 1,
|
34
28
|
:cursor_struct, 2,
|
@@ -241,7 +235,7 @@ module FFI
|
|
241
235
|
:cursor_omp_depobj_directive, 286,
|
242
236
|
:cursor_omp_scan_directive, 287,
|
243
237
|
# :cursor_last_stmt, :cursor_omp_scan_directive,
|
244
|
-
:cursor_translation_unit,
|
238
|
+
:cursor_translation_unit, CUSOR_TRANSLATION_UNIT,
|
245
239
|
:cursor_first_attr, 400,
|
246
240
|
:cursor_unexposed_attr, 400,
|
247
241
|
:cursor_ibaction_attr, 401,
|
@@ -482,6 +476,23 @@ module FFI
|
|
482
476
|
attach_function :get_enum_type, :clang_getEnumDeclIntegerType, [CXCursor.by_value], CXType.by_value
|
483
477
|
|
484
478
|
attach_function :get_num_args, :clang_Cursor_getNumArguments, [CXCursor.by_value], :int
|
479
|
+
|
480
|
+
attach_function :is_converting_constructor, :clang_CXXConstructor_isConvertingConstructor, [CXCursor.by_value], :uint
|
481
|
+
attach_function :is_copy_constructor, :clang_CXXConstructor_isCopyConstructor, [CXCursor.by_value], :uint
|
482
|
+
attach_function :is_default_constructor, :clang_CXXConstructor_isDefaultConstructor, [CXCursor.by_value], :uint
|
483
|
+
attach_function :is_move_constructor, :clang_CXXConstructor_isMoveConstructor, [CXCursor.by_value], :uint
|
484
|
+
attach_function :is_mutable, :clang_CXXField_isMutable, [CXCursor.by_value], :uint
|
485
|
+
attach_function :is_defaulted, :clang_CXXMethod_isDefaulted, [CXCursor.by_value], :uint
|
486
|
+
attach_function :is_abstract, :clang_CXXRecord_isAbstract, [CXCursor.by_value], :uint
|
487
|
+
attach_function :is_enum_scoped, :clang_EnumDecl_isScoped, [CXCursor.by_value], :uint
|
488
|
+
attach_function :is_const, :clang_CXXMethod_isConst, [CXCursor.by_value], :uint
|
489
|
+
|
490
|
+
if Clang.clang_version >= Gem::Version.new('16.0.0')
|
491
|
+
attach_function :is_deleted, :clang_CXXMethod_isDeleted, [CXCursor.by_value], :uint
|
492
|
+
attach_function :is_copy_assignment_operator, :clang_CXXMethod_isCopyAssignmentOperator, [CXCursor.by_value], :uint
|
493
|
+
attach_function :is_move_assignment_operator, :clang_CXXMethod_isMoveAssignmentOperator, [CXCursor.by_value], :uint
|
494
|
+
attach_function :is_explicit, :clang_CXXMethod_isExplicit, [CXCursor.by_value], :uint
|
495
|
+
end
|
485
496
|
end
|
486
497
|
end
|
487
498
|
end
|
@@ -1,23 +1,10 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in
|
12
|
-
# all copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2013, by Garry Marshall.
|
6
|
+
# Copyright, 2014, by Masahiro Sano.
|
7
|
+
# Copyright, 2020, by Luikore.
|
21
8
|
|
22
9
|
require_relative 'translation_unit'
|
23
10
|
require_relative 'source_location'
|
data/lib/ffi/clang/lib/file.rb
CHANGED
@@ -1,24 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2013-2022, by Samuel Williams.
|
5
|
+
# Copyright, 2013, by Carlos Martín Nieto.
|
3
6
|
# Copyright, 2014, by Masahiro Sano.
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
7
|
|
23
8
|
require_relative 'string'
|
24
9
|
require_relative 'translation_unit'
|