diff --git a/completion/core/src/completion-c.adb b/completion/core/src/completion-c.adb
index 9cd004b2c0..bc79f95856 100644
--- a/completion/core/src/completion-c.adb
+++ b/completion/core/src/completion-c.adb
@@ -15,8 +15,6 @@
-- of the license. --
------------------------------------------------------------------------------
-with Language.Libclang;
-
package body Completion.C is
---------------------------------
@@ -27,27 +25,9 @@ package body Completion.C is
(Manager : access C_Completion_Manager;
Context : Completion_Context) return Completion_List
is
- New_Context : constant Completion_Context :=
- new C_Completion_Context'(Buffer => Context.Buffer,
- Start_Offset => Context.Start_Offset,
- End_Offset => Context.End_Offset,
- Lang => Context.Lang,
- File => Context.File,
- Expression => Null_Parsed_Expression);
-
- Result : Completion_List;
+ Result : Completion_List;
begin
- if Language.Libclang.Is_Module_Active then
- for Item of Manager.Ordered_Resolvers loop
- Get_Completion_Root
- (Resolver => Item,
- Offset => Context.End_Offset,
- Context => New_Context,
- Result => Result);
- end loop;
- end if;
-
return Result;
end Get_Initial_Completion_List;
diff --git a/completion/ui/src/completion-c-libclang.adb b/completion/ui/src/completion-c-libclang.adb
deleted file mode 100644
index 507d4c3fc8..0000000000
--- a/completion/ui/src/completion-c-libclang.adb
+++ /dev/null
@@ -1,441 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2014-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with System;
-with System.Address_Image;
-with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
-
--- with Glib; use Glib;
--- with Glib.Unicode; use Glib.Unicode;
-
-with GPS.Editors; use GPS.Editors;
-
-with Language; use Language;
-
-with GNATCOLL.Traces; use GNATCOLL.Traces;
-with GNATCOLL.Utils; use GNATCOLL.Utils;
-
-with clang_c_Index_h; use clang_c_Index_h;
-with Language.Libclang; use Language.Libclang;
-with GPS.Core_Kernels; use GPS.Core_Kernels;
-with Glib.Unicode; use Glib.Unicode;
-with Glib; use Glib;
-with String_Utils; use String_Utils;
-
-package body Completion.C.Libclang is
-
- Me : constant Trace_Handle :=
- GNATCOLL.Traces.Create
- ("GPS.COMPLETION.LIBCLANG_COMPLETION");
-
- ---------------
- -- Proposals --
- ---------------
-
- type Libclang_Completion is new Completion_Proposal
- with record
- Label : Unbounded_String;
- Documentation : Unbounded_String;
- Completion : Unbounded_String;
- Category : Language_Category;
- end record;
-
- overriding procedure Free (Proposal : in out Libclang_Completion) is null;
-
- overriding function Deep_Copy
- (Proposal : Libclang_Completion)
- return Completion_Proposal'Class is (Libclang_Completion'(Proposal));
-
- overriding function Match
- (Proposal : Libclang_Completion;
- Dummy_Context : Completion_Context;
- Dummy_Offset : String_Index_Type) return Boolean is (True);
- -- This function is not actually used, need to be clarified some day ???
-
- overriding function Get_Visibility
- (Proposal : Libclang_Completion) return Construct_Visibility
- is (Visibility_Public);
- -- Libclang only returns visible (eg. public) entities already, so
- -- everything will be public
-
- overriding function Get_Completion
- (Proposal : Libclang_Completion;
- Dummy_Db : access Xref.General_Xref_Database_Record'Class)
- return Basic_Types.UTF8_String is (+Proposal.Completion);
- -- Return stored completion string
-
- overriding function Get_Category
- (Proposal : Libclang_Completion) return Language_Category
- is (Proposal.Category);
- -- Return the category of the object proposed for the completion
-
- overriding function Get_Documentation
- (Proposal : Libclang_Completion)
- return String is (To_String (Proposal.Documentation));
- -- Return stored documentation directly
-
- overriding function Get_Custom_Icon_Name
- (Proposal : Libclang_Completion) return String is ("");
- -- No custom icon
-
- overriding function Get_Label
- (Proposal : Libclang_Completion;
- Dummy_Db : access Xref.General_Xref_Database_Record'Class)
- return String is (To_String (Proposal.Label));
- -- Return stored label directly
-
- overriding function To_Completion_Id
- (Proposal : Libclang_Completion)
- return Completion_Id;
-
- package Completion_Proposal_Lists
- is new Ada.Containers.Doubly_Linked_Lists
- (Libclang_Completion);
-
- ----------------------
- -- Lazy computation --
- ----------------------
-
- -- The following implements a virtual list binding to a Libclang object
- -- which is capable of computing lazily a list of completion proposals.
-
- type Libclang_Component is
- new Completion_List_Pckg.Virtual_List_Component
- with record
- Resolver : access Libclang_Resolver;
- end record;
-
- type Libclang_Iterator is
- new Completion_List_Pckg.Virtual_List_Component_Iterator
- with record
- Resolver : access Libclang_Resolver;
- Next_Num : Natural := 0;
- Pending_Results : Completion_Proposal_Lists.List;
- -- The number of the next item to get.
- end record;
-
- overriding function First (List : Libclang_Component)
- return Completion_List_Pckg.Virtual_List_Component_Iterator'Class;
- overriding function At_End (It : Libclang_Iterator) return Boolean;
- overriding procedure Next (It : in out Libclang_Iterator);
- overriding function Get
- (It : in out Libclang_Iterator) return Completion_Proposal'Class;
-
- -----------
- -- First --
- -----------
-
- overriding
- function First
- (List : Libclang_Component)
- return Completion_List_Pckg.Virtual_List_Component_Iterator'Class
- is
- Iterator : Libclang_Iterator;
- begin
- Iterator.Resolver := List.Resolver;
- Iterator.Next_Num := 0;
- Next (Iterator);
- return Iterator;
- end First;
-
- ------------------
- -- Compute_Next --
- ------------------
-
- procedure Compute_Next (It : in out Libclang_Iterator);
- procedure Compute_Next (It : in out Libclang_Iterator)
- is
- The_Res : constant Clang_Completion_Result :=
- It.Resolver.Completions_Array (It.Next_Num);
- Strs : constant Completion_Strings := Spellings (The_Res);
- begin
-
- -- Since we sorted the results by priority, the first result is gonna
- -- be the current parameter completion (highest priority) if there is
- -- a current parameter completion.
-
- if It.Next_Num = 1
- and then Is_Parameter_Completion (It.Resolver.Completions_Array (1))
- then
-
- -- In this case we create a custom completion that informs the user
- -- about the current parameter. If he triggers it, it will insert a
- -- /* */ comment containing the name of the parameter
-
- declare
- C : constant Clang_Completion_Result :=
- It.Resolver.Completions_Array (1);
- Param_Index : constant Natural := Get_Current_Param_Index (C);
- Param_Name : constant String := Extract_Param_Name_From_Chunk
- (Get_Chunks (C) (Param_Index));
- begin
- It.Pending_Results.Append
- ((Resolver => It.Resolver,
- Label => +(Param_Name & " (param)"),
- Completion => +("/* " & Param_Name & " = */"),
- Documentation => Strs.Doc,
- Category => Cat_Parameter));
- end;
-
- else
-
- -- In the other (regular) case we just fill the completion proposal
- -- with the needed information
-
- It.Pending_Results.Append
- ((Resolver => It.Resolver,
- Label => Strs.Completion,
- Completion => Strs.Completion,
- Documentation => Strs.Doc,
- Category =>
- (case Kind (The_Res) is
- when CXCursor_EnumDecl
- | CXCursor_EnumConstantDecl => Cat_Literal,
- when CXCursor_FieldDecl => Cat_Field,
- when CXCursor_FunctionDecl
- | CXCursor_FunctionTemplate => Cat_Function,
- when CXCursor_ParmDecl => Cat_Parameter,
- when CXCursor_TypedefDecl
- | CXCursor_TypeAliasDecl => Cat_Type,
- when CXCursor_VarDecl => Cat_Variable,
- when others => Cat_Unknown)));
- end if;
- end Compute_Next;
-
- ----------
- -- Next --
- ----------
-
- overriding procedure Next (It : in out Libclang_Iterator) is
- begin
- loop
- It.Pending_Results.Delete_First;
-
- if It.Pending_Results.Is_Empty then
- It.Next_Num := It.Next_Num + 1;
- exit when It.Next_Num > It.Resolver.Completions_Array'Length;
- Compute_Next (It);
- end if;
-
- exit
- when Starts_With
- (To_String
- (Libclang_Completion (It.Get).Label),
- It.Resolver.Prefix.all);
- end loop;
- end Next;
-
- ------------
- -- At_End --
- ------------
-
- overriding function At_End (It : Libclang_Iterator) return Boolean is
- begin
- return It.Next_Num > Num_Results (It.Resolver.Completions)
- and then It.Pending_Results.Is_Empty;
- end At_End;
-
- ---------
- -- Get --
- ---------
-
- overriding function Get
- (It : in out Libclang_Iterator) return Completion_Proposal'Class
- is
- begin
- return
- (if not It.Pending_Results.Is_Empty
- then Completion_Proposal'Class (It.Pending_Results.First_Element)
- else Null_Completion_Proposal);
- end Get;
-
- ----------------------
- -- To_Completion_Id --
- ----------------------
-
- overriding function To_Completion_Id
- (Proposal : Libclang_Completion)
- return Completion_Id is
- begin
- return (Length (Proposal.Completion),
- "LIBCLANG",
- +Proposal.Completion,
- GNATCOLL.VFS.No_File, 0, 0);
- end To_Completion_Id;
-
- --------------------------------------
- -- New_Libclang_Completion_Resolver --
- --------------------------------------
-
- function New_Libclang_Completion_Resolver
- (Kernel : Kernel_Handle;
- Current_File : Virtual_File)
- return Completion_Resolver_Access
- is
- pragma Unreferenced (Current_File);
- R : Libclang_Resolver;
- begin
- R.Manager := null;
- R.Kernel := Kernel;
-
- return new Libclang_Resolver'(R);
- end New_Libclang_Completion_Resolver;
-
- -------------------------
- -- Get_Completion_Root --
- -------------------------
-
- overriding procedure Get_Completion_Root
- (Resolver : access Libclang_Resolver;
- Offset : String_Index_Type;
- Context : Completion_Context;
- Result : in out Completion_List)
- is
- pragma Unreferenced (Offset);
- Loc : Editor_Location'Class :=
- Get_Current_Location (Resolver.Kernel, Context.File);
-
- Filename : constant String := +Context.File.Full_Name.all;
- Component : Libclang_Component;
-
- function Unichar_To_UTF8 (Char : Gunichar) return String;
- function Unichar_To_UTF8 (Char : Gunichar) return String is
- The_Char : String (1 .. 6);
- Last : Natural;
- begin
- Unichar_To_UTF8 (Char, The_Char, Last);
- return The_Char (1 .. Last);
- end Unichar_To_UTF8;
-
- begin
- -- Find the prefix of the word
-
- declare
- Unichar : Gunichar;
- Prefix : Unbounded_String;
- begin
- loop
- Loc := Loc.Forward_Char (-1);
- Unichar := Gunichar (Loc.Get_Char);
-
- -- Exit when we are out of an identifier, eg. the current char is
- -- neither an alphanumeric character, neither an underscore
-
- exit when not
- (Is_Alnum (Unichar) or else Unichar = Character'Pos ('_'));
-
- Insert (Prefix, 1, Unichar_To_UTF8 (Unichar));
-
- -- Exit here if we are on the beginning of the buffer
-
- exit when Loc.Offset = 0;
- end loop;
-
- Resolver.Prefix := new String'(+Prefix);
- end;
-
- Trace (Me, "Completion prefix: " & Resolver.Prefix.all);
- Trace (Me, "Completion at " & Loc.Line'Img & " : "
- & Natural'Image (Loc.Line_Offset + 2));
- Component.Resolver := Resolver;
-
- declare
- Unsaved_Files : constant Unsaved_File_Array :=
- (1 => Create_Unsaved_File
- (Filename,
- Ada.Strings.Unbounded.String_Access (Context.Buffer)));
- begin
- Resolver.TU := Translation_Unit
- (Core_Kernel (Resolver.Kernel), Context.File);
-
- Resolver.Unsaved_File_Inst := Unsaved_Files (1);
- Resolver.Completions := Complete_At
- (Resolver.TU,
- Filename => +Context.File.Full_Name,
- Line => Loc.Line,
- Column => Loc.Line_Offset + 2,
- Unsaved_Files => Unsaved_Files,
- Options =>
- (Include_Macros
- or Include_Code_Patterns or Include_Brief_Comments));
-
- declare
- use Completion_Results_Arrays;
-
- function "<"
- (Left, Right : Clang_Completion_Result) return Boolean;
- -- We want to store completion results:
- -- * First by libclang given priorities
- -- * Second by lexical order
-
- function "<"
- (Left, Right : Clang_Completion_Result) return Boolean
- is
- P_Left : constant Natural := Priority (Left);
- P_Right : constant Natural := Priority (Right);
- begin
- if P_Left = P_Right then
- return Typed_Text (Left) < Typed_Text (Right);
- else
- return P_Left < P_Right;
- end if;
- end "<";
-
- procedure Sort is new In_Place_Sort_Gen ("<");
-
- Completions_Array : Completion_Results_Array
- (1 .. Num_Results (Resolver.Completions));
- begin
- for I in 1 .. Num_Results (Resolver.Completions) loop
- Completions_Array (I) :=
- Nth_Result (Resolver.Completions, I);
- end loop;
-
- Sort (Completions_Array);
-
- Resolver.Completions_Array :=
- new Completion_Results_Array'(Completions_Array);
- end;
- end;
-
- Completion_List_Pckg.Append (Result.List, Component);
- end Get_Completion_Root;
-
- ------------
- -- Get_Id --
- ------------
-
- overriding function Get_Id
- (Resolver : Libclang_Resolver)
- return String is
- begin
- return "libclang" & System.Address_Image (Resolver'Address);
- end Get_Id;
-
- ----------
- -- Free --
- ----------
-
- overriding procedure Free (This : in out Libclang_Resolver) is
- begin
- Dispose (This.Completions);
- Free (This.Prefix);
- Destroy_Unsaved_File (This.Unsaved_File_Inst);
- Completion_Results_Arrays.Free (This.Completions_Array);
- end Free;
-
-end Completion.C.Libclang;
diff --git a/completion/ui/src/completion-c-libclang.ads b/completion/ui/src/completion-c-libclang.ads
deleted file mode 100644
index b58edc3526..0000000000
--- a/completion/ui/src/completion-c-libclang.ads
+++ /dev/null
@@ -1,65 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2014-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
--- A completion resolver based on libclang
-
-with GPS.Kernel; use GPS.Kernel;
-with Libclang.Index; use Libclang.Index;
-with Array_Utils;
-
-package Completion.C.Libclang is
-
- type Libclang_Resolver is new Completion_Resolver with private;
-
- function New_Libclang_Completion_Resolver
- (Kernel : Kernel_Handle;
- Current_File : Virtual_File) return Completion_Resolver_Access;
- -- Create a new resolver based on the analyzed file
-
- overriding
- procedure Get_Completion_Root
- (Resolver : access Libclang_Resolver;
- Offset : String_Index_Type;
- Context : Completion_Context;
- Result : in out Completion_List);
- -- See inherited documentation
-
- overriding
- function Get_Id (Resolver : Libclang_Resolver) return String;
- -- See inherited documentation
-
- overriding procedure Free (This : in out Libclang_Resolver);
- -- Free the data associated to a construct completion resolver
-
-private
-
- package Completion_Results_Arrays
- is new Array_Utils (Clang_Completion_Result);
- subtype Completion_Results_Array is Completion_Results_Arrays.Array_Type;
- subtype Completion_Results_Array_Access
- is Completion_Results_Arrays.Array_Type_Access;
-
- type Libclang_Resolver is new Completion_Resolver with record
- Kernel : Kernel_Handle;
- TU : Clang_Translation_Unit := No_Translation_Unit;
- Completions : Clang_Complete_Results := No_Complete_Results;
- Completions_Array : Completion_Results_Array_Access;
- Prefix : String_Access;
- Unsaved_File_Inst : Unsaved_File;
- end record;
-
-end Completion.C.Libclang;
diff --git a/cpp_module/cpp_module.gpr b/cpp_module/cpp_module.gpr
index 51076dd9fe..6e20b9e0d2 100644
--- a/cpp_module/cpp_module.gpr
+++ b/cpp_module/cpp_module.gpr
@@ -1,6 +1,5 @@
with "../shared";
with "../prj_editor/prj_editor";
-with "../libclang/libclang";
project Cpp_Module is
diff --git a/cpp_module/src/cpp_module.adb b/cpp_module/src/cpp_module.adb
index f871f61a65..cc59d16596 100644
--- a/cpp_module/src/cpp_module.adb
+++ b/cpp_module/src/cpp_module.adb
@@ -21,7 +21,6 @@ with GNATCOLL.Traces; use GNATCOLL.Traces;
with Case_Handling; use Case_Handling;
with Foreign_Naming_Editors; use Foreign_Naming_Editors;
with GPS.Intl; use GPS.Intl;
-with GPS.Core_Kernels; use GPS.Core_Kernels;
with GPS.Kernel; use GPS.Kernel;
with GPS.Kernel.Hooks; use GPS.Kernel.Hooks;
with GPS.Kernel.Project; use GPS.Kernel.Project;
@@ -31,8 +30,6 @@ with Language.Cpp; use Language.Cpp;
with Language_Handlers; use Language_Handlers;
with Project_Viewers; use Project_Viewers;
with Projects; use Projects;
-with Language.Libclang;
-with Language.Libclang_Tree; use Language.Libclang_Tree;
package body Cpp_Module is
Me : constant Trace_Handle := Create ("GPS.CPP.MODULE");
@@ -174,17 +171,6 @@ package body Cpp_Module is
" a new line or if it should also format the current line.",
Label => -"Action on new line");
- if Language.Libclang.Is_Module_Active then
- -- Register tree providers based on clang for both C and C++
- -- languages
- Kernel.Register_Tree_Provider
- (C_Lang,
- new Clang_Tree_Provider'(Kernel => Core_Kernel (Kernel)));
- Kernel.Register_Tree_Provider
- (Cpp_Lang,
- new Clang_Tree_Provider'(Kernel => Core_Kernel (Kernel)));
- end if;
-
Hook := new On_Pref_Changed;
Preferences_Changed_Hook.Add (Hook);
Hook.Execute (Kernel, null);
diff --git a/gnatstudio/src/gps-main.adb b/gnatstudio/src/gps-main.adb
index 6946f9e968..ce35e7d5ff 100644
--- a/gnatstudio/src/gps-main.adb
+++ b/gnatstudio/src/gps-main.adb
@@ -193,7 +193,6 @@ with VCS2.Module;
with VFS_Module;
with Vdiff2_Module;
with Vsearch;
-with Language.Libclang;
with Ada_Semantic_Tree.Lang;
with GPS.Traces;
with GPS.Valgrind;
@@ -2537,11 +2536,6 @@ procedure GPS.Main is
VFS_Module.Register_Module (GPS_Main.Kernel);
end if;
- -- Register the libclang module for C and C++ semantic support
- if not GPS.LSP_Module.LSP_Cpp_Support_Trace_Is_Active then
- Language.Libclang.Register_Module (GPS_Main.Kernel);
- end if;
-
if Active (Codefix_Trace) then
Codefix_Module.Register_Module (GPS_Main.Kernel);
end if;
diff --git a/kernel/kernel.gpr b/kernel/kernel.gpr
index 676fe5fd24..6e07289a77 100644
--- a/kernel/kernel.gpr
+++ b/kernel/kernel.gpr
@@ -7,7 +7,6 @@ with "../gnatcoll_extras/gnatcoll_extras";
with "../refactoring/core/refactoring_core";
with "../toolchains_editor/core/toolchains_core";
with "xmlada";
-with "../libclang/libclang";
project Kernel is
diff --git a/kernel/src/language-libclang-utils.adb b/kernel/src/language-libclang-utils.adb
deleted file mode 100644
index 9e6b35d4a7..0000000000
--- a/kernel/src/language-libclang-utils.adb
+++ /dev/null
@@ -1,142 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2015-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
-
-with GNATCOLL.VFS; use GNATCOLL.VFS;
-with GNAT.Strings; use GNAT.Strings;
-with GNATCOLL.Scripts; use GNATCOLL.Scripts;
-
-package body Language.Libclang.Utils is
-
- ----------------------------------------
- -- Get_Compiler_Search_Paths_Switches --
- ----------------------------------------
-
- function Get_Compiler_Search_Paths_Switches
- (Kernel : Core_Kernel;
- Project : Project_Type;
- Language : String) return Unbounded_String_Array
- is
- Python : constant Scripting_Language :=
- Lookup_Scripting_Language (Kernel.Scripts, "python");
- C : Callback_Data'Class := Python.Create (2);
- begin
-
- -- This function is implemented in python, because the spawning logic
- -- *and* the string massaging were both easier to express.
-
- C.Set_Nth_Arg (1, Project.Name);
- C.Set_Nth_Arg (2, Language);
- C.Execute_Command ("GPS.__get_compiler_search_paths");
-
- declare
- L : constant List_Instance'Class := C.Return_Value;
- begin
- return A : Unbounded_String_Array (1 .. L.Number_Of_Arguments) do
- for J in A'Range loop
- A (J) := To_Unbounded_String ("-I" & String'(L.Nth_Arg (J)));
- end loop;
- end return;
- end;
-
- end Get_Compiler_Search_Paths_Switches;
-
- -----------------------------
- -- Get_Project_Source_Dirs --
- -----------------------------
-
- Source_Dirs_Root : Project_Type;
- Source_Dirs_Lang : GNAT.Strings.String_Access;
- Source_Dirs_Result : Unbounded_String_Array (1 .. 2048);
- Source_Dirs_Index : Natural;
- -- ??? Another horrible cache, this should be reworked
-
- function Get_Project_Source_Dirs
- (Kernel : Core_Kernel;
- Project : Project_Type;
- Language : String) return Unbounded_String_Array
- is
- P : Project_Type;
- It : Project_Iterator;
-
- Result : Unbounded_String_Array (1 .. 2048);
- First_Free : Natural := 1;
-
- -- ??? We do not support more than 2048 source directories
- begin
- if Source_Dirs_Lang /= null
- and then Source_Dirs_Lang.all = Language
- and then Source_Dirs_Root = Project
- then
- -- Return the cached result
- return Source_Dirs_Result (1 .. Source_Dirs_Index);
- end if;
-
- if Project = No_Project then
- -- We are opening a source file which is not in the project
- -- hierarchy. This can be the case when the user has navigated
- -- to the system includes, or if the user has opened a file from
- -- the disk directly.
- -- We do not know here which case this is, so we try to be helpful
- -- and add all -I's corresponding to the loaded hierarchy.
- It := Start (Kernel.Registry.Tree.Root_Project,
- Recursive => True,
- Direct_Only => False,
- Include_Extended => True);
- else
- It := Start (Project,
- Recursive => True,
- Direct_Only => False,
- Include_Extended => True);
- end if;
-
- P := Current (It);
-
- while P /= No_Project loop
- if Has_Language (P, Language) then
- declare
- Dirs : constant File_Array :=
- Source_Dirs (P, Recursive => False);
- begin
- for D in Dirs'Range loop
- Result (First_Free) := To_Unbounded_String
- ("-I" & (+Dirs (D).Full_Name));
- First_Free := First_Free + 1;
- end loop;
- end;
- end if;
-
- Next (It);
- P := Current (It);
- end loop;
-
- -- Cache the results
-
- Source_Dirs_Root := Project;
- if Source_Dirs_Lang /= null then
- Free (Source_Dirs_Lang);
- end if;
-
- Source_Dirs_Lang := new String'(Language);
- Source_Dirs_Result := Result;
- Source_Dirs_Index := First_Free - 1;
-
- return Result (Result'First .. First_Free - 1);
- end Get_Project_Source_Dirs;
-
-end Language.Libclang.Utils;
diff --git a/kernel/src/language-libclang-utils.ads b/kernel/src/language-libclang-utils.ads
deleted file mode 100644
index b907d54d07..0000000000
--- a/kernel/src/language-libclang-utils.ads
+++ /dev/null
@@ -1,39 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2015-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
--- Utilities for integrating with libclang
-
-with GNATCOLL.Projects; use GNATCOLL.Projects;
-with GNATCOLL.Utils; use GNATCOLL.Utils;
-
-package Language.Libclang.Utils is
-
- function Get_Compiler_Search_Paths_Switches
- (Kernel : Core_Kernel;
- Project : Project_Type;
- Language : String) return Unbounded_String_Array;
- -- Return the search path for the given language as a set of "-I" switches
-
- function Get_Project_Source_Dirs
- (Kernel : Core_Kernel;
- Project : Project_Type;
- Language : String) return Unbounded_String_Array;
- -- Go through all the source directories in the project hierarchy, and
- -- return a list of all those who might contain sources of the given
- -- language. The result array is returned as a set of "-I" switches.
-
-end Language.Libclang.Utils;
diff --git a/kernel/src/language-libclang.adb b/kernel/src/language-libclang.adb
deleted file mode 100644
index b4097fca1e..0000000000
--- a/kernel/src/language-libclang.adb
+++ /dev/null
@@ -1,1696 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2015-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with Ada.IO_Exceptions;
-with Ada.Unchecked_Deallocation;
-with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;
-with Ada.Text_IO; use Ada.Text_IO;
-with Ada.Exceptions; use Ada.Exceptions;
-with Ada.Real_Time;
-with Ada.Unchecked_Conversion;
-with Interfaces.C.Strings;
-with GNAT.Regpat; use GNAT.Regpat;
-with GNAT.Traceback.Symbolic;
-with System.Multiprocessors; use System.Multiprocessors;
-
-with GNATCOLL.Scripts; use GNATCOLL.Scripts;
-with GNATCOLL.Utils; use GNATCOLL.Utils;
-
-with Commands; use Commands;
-with Commands.Generic_Asynchronous;
-with Default_Preferences; use Default_Preferences;
-with String_Utils; use String_Utils;
-
-with GPS.Editors; use GPS.Editors;
-with GPS.Kernel.Hooks; use GPS.Kernel.Hooks;
-with GPS.Kernel; use GPS.Kernel;
-with GPS.Kernel.Task_Manager; use GPS.Kernel.Task_Manager;
-with GPS.Kernel.Scripts; use GPS.Kernel.Scripts;
-
-with Language.Libclang_Tree; use Language.Libclang_Tree;
-with Language.Libclang.Utils; use Language.Libclang.Utils;
-with Clang_Xref; use Clang_Xref;
-
-package body Language.Libclang is
-
- LRU_Size_Preference : Integer_Preference;
- -- Number of translation units that will be kept in the LRU cache at all
- -- times.
-
- Nb_Tasks_Preference : Integer_Preference;
- -- Number of concurrent tasks used for parsing.
-
- Me : constant Trace_Handle := GNATCOLL.Traces.Create
- ("GPS.KERNEL.LIBCLANG");
- -- Main libclang trace
-
- Cache_Constant_Marker : constant Natural := 123454321;
- -- An integer to allow us to recognize cache files that are recent enough
- -- to have our version identifier.
-
- Libclang_Queue_Id : constant String := "libclang parsing files";
- -- Name of the queue in the task manager running the command to parse
- -- files.
-
- Diagnostics : constant Trace_Handle :=
- GNATCOLL.Traces.Create ("GPS.KERNEL.LIBCLANG_DIAGNOSTICS", Off);
- -- Whether diagnostics should be shown in the traces or not
-
- Activate_Clang_XRef : constant Trace_Handle :=
- GNATCOLL.Traces.Create ("GPS.INTERNAL.LIBCLANG_XREF", On);
- -- Whether clang-based cross references should be activated or not
-
- type Translation_Unit_Wrapper
- is new Ada.Finalization.Controlled with record
- Cache : TU_Cache_Access;
- end record;
-
- function Get_Blocking
- (Self : Translation_Unit_Wrapper'Class) return Clang_Translation_Unit;
- -- Block until the Translation_Unit_Wrapper has a TU, then return it
-
- function Has_TU (File_Name : String) return Boolean;
- -- Whether we have a translation unit for File_Name in the cache or not
-
- function Get_TU (File_Name : String) return Translation_Unit_Wrapper'Class;
- -- Return the translation unit wrapper associated with File_Name. This will
- -- always return, irrespective of whether the translation_unit_wrapper
- -- contains a TU or not.
-
- function Parsing_Timeout_Handler return Boolean;
- -- Handler that will handle re-index files that have been parsed.
- -- Underneath will just call Index_One_File until the end of times.
-
- procedure Enqueue_Translation_Unit
- (Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- Unsaved_Files : Unsaved_File_Array := No_Unsaved_Files;
- Options : Clang_Translation_Unit_Flags := Default_Clang_Options;
- Default_Lang : String := "c++";
- Prio : Parsing_Request_Priority := Low;
- Callback : Parse_Callback_Access := null);
- -- Helper for the high level Enqueue_Translation_Unit procedure, that will
- -- take an Unsaved_Files array as parameter. This array is computed by the
- -- higher level Enqueue_Translation_Unit.
-
- procedure Unchecked_Free
- is new Ada.Unchecked_Deallocation (TU_Maps.Map, Tu_Map_Access);
- procedure Unchecked_Free
- is new Ada.Unchecked_Deallocation (LRU_Lists.List, LRU_Vector_Access);
- procedure Unchecked_Free
- is new Ada.Unchecked_Deallocation (TU_Cache_Record, TU_Cache_Access);
- procedure Unchecked_Free
- is new Ada.Unchecked_Deallocation
- (Clang_Crossrefs_Cache_Type, Clang_Crossrefs_Cache);
- procedure Unchecked_Free
- is new Ada.Unchecked_Deallocation
- (File_Cache_Record, File_Cache_Access);
- procedure Unchecked_Free is new Ada.Unchecked_Deallocation
- (File_Cache_Array, File_Cache_Array_Access);
- -- Deallocation procedures
-
- procedure Python_Get_TU
- (Data : in out Callback_Data'Class; Command : String);
- -- Command handler for the Libclang.get_translation_unit shell command.
- -- This handler will pass back addresses corresponding to the index and the
- -- translation, that will then be used on the python side to create a real
- -- python clang TranslationUnit
-
- function Construct_Cache_Key
- (File_Name : String;
- Switches : Unbounded_String_Array) return File_Key;
- -- Helper procedure, that will construct a File_Key cache key from a file
- -- name and a list of switches
-
- procedure Index_One_File;
- -- This procedure will index one file placed in the clang response queue,
- -- meaning traverse its tree and put the cross references information in
- -- the global cache
-
- type Parse_Files_Data_Type is record
- Max_Idx, Current_Idx : Natural := 0;
- Kernel : Core_Kernel;
- end record;
- type Parse_Files_Data_Type_Access is access all Parse_Files_Data_Type;
-
- procedure Unchecked_Free is new Ada.Unchecked_Deallocation
- (Parse_Files_Data_Type, Parse_Files_Data_Type_Access);
-
- package Parse_Files_Command is
- new Commands.Generic_Asynchronous (Parse_Files_Data_Type_Access,
- Free => Unchecked_Free);
-
- type On_Project_View_Changed is new Simple_Hooks_Function with null record;
- overriding procedure Execute
- (Self : On_Project_View_Changed;
- Kernel : not null access Kernel_Handle_Record'Class);
- -- Command executed when the project view is changed. This will handle
- -- recomputing the clang cache.
-
- procedure Save_Crossrefs_Cache (Kernel : Core_Kernel);
- -- This procedure is used to save the crossref cache on disk. Since the
- -- cache is global, it just needs the kernel to get some global information
- -- about the state of GNAT Studio
-
- procedure Initialize_Crossrefs_Cache (Kernel : Core_Kernel);
- -- This procedure is used to initialize the crossref cache, and load it
- -- from disk if a persistence file exists.
-
- procedure Add_TU_To_Cache
- (File_Name : String;
- Translation_Unit : Clang_Translation_Unit;
- Version : Integer := 0);
- -- Helper procedure, used to add a translation unit to the LRU cache after
- -- it has been computed.
-
- procedure Destroy (S : in out File_Cache_Access);
- -- Destroy a file cache
-
- function Get_Switches
- (Kernel : Core_Kernel;
- File : Virtual_File;
- Project : Project_Type := No_Project;
- Default_Lang : String := "c++";
- Include_Compiler_Switches : Boolean := True)
- return Unbounded_String_Array;
- -- Helper procedure that will return the switches for a given file and
- -- project
-
- function Get_Cache_File (Kernel : Core_Kernel) return Virtual_File;
- -- Return the Virtual file corresponding to the clang crossref cache file
- -- for the root project
-
- use Streamable_Decl_Info_Vectors_Accesses;
- use Streamable_Ref_Info_Vectors_Accesses;
-
- procedure Empty_Cache_Map (Map : in out Symbol_To_Location_Maps.Map);
- -- Free memory associated to Map
-
- ---------------------
- -- Empty_Cache_Map --
- ---------------------
-
- procedure Empty_Cache_Map (Map : in out Symbol_To_Location_Maps.Map) is
- begin
- for El of Map loop
- if El.Refs /= null then
- Free (El.Refs);
- end if;
- if El.Decls /= null then
- Free (El.Decls);
- end if;
- end loop;
- Map.Clear;
- end Empty_Cache_Map;
-
- -------------
- -- Destroy --
- -------------
-
- procedure Destroy (S : in out File_Cache_Access) is
- begin
- Empty_Cache_Map (S.Map);
- Unchecked_Free (S);
- end Destroy;
-
- ------------
- -- Has_TU --
- ------------
-
- function Has_TU (File_Name : String) return Boolean is
- begin
- return Clang_Module_Id.TU_Cache.Contains (+File_Name)
- and then Clang_Module_Id.TU_Cache.Element (+File_Name) /= null
- and then Clang_Module_Id.TU_Cache.Element
- (+File_Name).TU /= No_Translation_Unit;
- end Has_TU;
-
- ------------
- -- Get_TU --
- ------------
-
- function Get_TU
- (File_Name : String) return Translation_Unit_Wrapper'Class
- is
- U_File_Name : constant Unbounded_String := +File_Name;
- Cache : TU_Cache_Access;
- begin
- return Ret : Translation_Unit_Wrapper do
- if Clang_Module_Id.TU_Cache.Contains (U_File_Name) then
- Cache := Clang_Module_Id.TU_Cache.Element (U_File_Name);
- else
- Cache :=
- new TU_Cache_Record'(TU => No_Translation_Unit, Version => 0,
- Is_Ready => False);
- Clang_Module_Id.TU_Cache.Include (+File_Name, Cache);
- end if;
- Ret.Cache := Cache;
- end return;
- end Get_TU;
-
- ---------------------
- -- Add_TU_To_Cache --
- ---------------------
-
- procedure Add_TU_To_Cache
- (File_Name : String;
- Translation_Unit : Clang_Translation_Unit;
- Version : Integer := 0)
- is
- U_File_Name : constant Unbounded_String := +File_Name;
- Cache : TU_Cache_Access;
- use LRU_Lists;
- begin
- Trace (Me, "Adding TU to cache " & File_Name);
-
- if Clang_Module_Id.TU_Cache.Contains (U_File_Name) then
- Cache := Clang_Module_Id.TU_Cache.Element (U_File_Name);
-
- Trace (Me, "SELF CONTAINS TU, "
- & Boolean'Image (Cache.TU /= No_Translation_Unit) & " "
- & Boolean'Image (Cache.TU /= Translation_Unit));
-
- if Cache.TU /= No_Translation_Unit
- and then Cache.TU /= Translation_Unit
- then
- Trace (Me, "Freeing old TU " & File_Name);
- Dispose (Cache.TU);
- end if;
-
- Cache.TU := Translation_Unit;
- Cache.Is_Ready := True;
- else
- Cache :=
- new TU_Cache_Record'(TU => Translation_Unit, Version => Version,
- Is_Ready => True);
- Clang_Module_Id.TU_Cache.Include (U_File_Name, Cache);
- end if;
-
- -- Handle LRU bookkeeping
-
- declare
- C : LRU_Lists.Cursor := Clang_Module_Id.LRU.Find (U_File_Name);
- begin
- -- If the file name is already in the LRU, we want to put it back at
- -- the beginning of the list, so remove the existing element
-
- if C /= No_Element then
- Delete (Clang_Module_Id.LRU.all, C);
- end if;
-
- -- In every case, append the file name at the end of the list
- Clang_Module_Id.LRU.Append (U_File_Name);
- Trace (Me, "Adding " & (+U_File_Name) & " to cache");
- end;
-
- -- Remove elements from the cache if > LRU_Size
-
- if Clang_Module_Id.LRU.Length >
- Count_Type (Integer'(LRU_Size_Preference.Get_Pref))
- then
- declare
- F : constant Unbounded_String := Clang_Module_Id.LRU.First_Element;
- begin
- -- First, let's remove the element from the LRU
- Clang_Module_Id.LRU.Delete_First;
-
- Trace (Me, "Removing " & (+F) & " from cache");
- begin
- -- We are not actually removing element from the cache, so that
- -- we can trace dangling pointers
- Dispose (Clang_Module_Id.TU_Cache.Element (F).TU);
- Clang_Module_Id.TU_Cache.Element (F).Is_Ready := False;
- exception
- when E : others =>
- Trace (Me, "Exception !");
- Trace (Me, GNAT.Traceback.Symbolic.Symbolic_Traceback (E));
- end;
- end;
- end if;
- end Add_TU_To_Cache;
-
- type Indexer_Data is record
- Syms_To_Locs : File_Cache_Access;
- end record;
-
- procedure Index_Reference
- (Client_Data : in out Indexer_Data;
- Info : Clang_Ref_Info);
-
- function Info_Vector
- (FC : File_Cache_Access; Sym : Clang_Symbol) return Info_Vectors;
-
- procedure Index_Declaration
- (Client_Data : in out Indexer_Data;
- Info : Clang_Decl_Info);
-
- -----------------
- -- Abort_Query --
- -----------------
-
- function Abort_Query
- (Dummy_Client_Data : in out Indexer_Data) return Boolean is (False);
-
- ----------------
- -- Diagnostic --
- ----------------
-
- procedure Diagnostic
- (Client_Data : in out Indexer_Data;
- Diags : Clang_Diagnostic_Set);
-
- procedure Diagnostic
- (Client_Data : in out Indexer_Data;
- Diags : Clang_Diagnostic_Set)
- is
- pragma Unreferenced (Client_Data);
- begin
- for I in 0 .. clang_getNumDiagnosticsInSet (Diags) loop
- declare
- D : constant CXDiagnostic :=
- clang_getDiagnosticInSet (Diags, I);
- use type Interfaces.C.unsigned;
- begin
- Trace
- (Diagnostics,
- To_String
- (clang_formatDiagnostic
- (D, CXDiagnostic_DisplaySourceLocation
- or CXDiagnostic_DisplayColumn
- or CXDiagnostic_DisplaySourceRanges)));
- end;
- end loop;
- end Diagnostic;
-
- procedure Entered_Main_File
- (Client_Data : in out Indexer_Data;
- File : GNATCOLL.VFS.Virtual_File) is null;
-
- procedure Included_File
- (Client_Data : in out Indexer_Data;
- Included_File_Info : Clang_Included_File_Info) is null;
-
- procedure Started_Translation_Unit
- (Client_Data : in out Indexer_Data) is null;
-
- -----------------
- -- Info_Vector --
- -----------------
-
- function Info_Vector
- (FC : File_Cache_Access; Sym : Clang_Symbol) return Info_Vectors
- is
- Info_Vector : Info_Vectors;
- begin
- if not FC.Map.Contains (Sym) then
- Info_Vector := (new Decl_Info_Vectors.Vector,
- new Ref_Info_Vectors.Vector);
- FC.Map.Include (Sym, Info_Vector);
- else
- Info_Vector := FC.Map.Element (Sym);
- end if;
- return Info_Vector;
- end Info_Vector;
-
- -----------------------
- -- Index_Declaration --
- -----------------------
-
- procedure Index_Declaration
- (Client_Data : in out Indexer_Data;
- Info : Clang_Decl_Info)
- is
- use Interfaces.C.Strings;
- use Interfaces.C;
- use Cursors_Arrays;
-
- Loc : constant Clang_Location := +Info.loc;
- Sym : Clang_Symbol;
- begin
- if Is_From_Main_File (Loc) then
-
- -- Add info for base specifiers references in C++ class declarations,
- -- because for some reasons they're not visited as references by the
- -- clang indexing process.
-
- if Info.entityInfo.kind = CXIdxEntity_CXXClass then
- for C of
- Get_Children
- (Clang_Cursor (Info.cursor), CXCursor_CXXBaseSpecifier)
- loop
- Sym :=
- Clang_Symbol_Table.Find (USR (Referenced (C)));
- Info_Vector (Client_Data.Syms_To_Locs, Sym).Refs.Append
- (Ref_Info'
- (To_Offset_T (Location (C)),
- Small_Cursor_Kind (Kind (C))));
- end loop;
- end if;
-
- Sym := Clang_Symbol_Table.Find (Value (Info.entityInfo.USR));
-
- Info_Vector (Client_Data.Syms_To_Locs, Sym).Decls.Append
- (Decl_Info'(To_Offset_T (Loc), Info.isDefinition /= 0,
- Small_Cursor_Kind (Info.cursor.kind)));
-
- end if;
- end Index_Declaration;
-
- ---------------------
- -- Index_Reference --
- ---------------------
-
- procedure Index_Reference
- (Client_Data : in out Indexer_Data;
- Info : Clang_Ref_Info)
- is
- use Interfaces.C.Strings;
- use Interfaces.C;
- Loc : constant Clang_Location := +Info.loc;
- Sym : Clang_Symbol;
- begin
- if Is_From_Main_File (Loc) then
- Sym :=
- Clang_Symbol_Table.Find (Value (Info.referencedEntity.USR));
-
- Info_Vector (Client_Data.Syms_To_Locs, Sym).Refs.Append
- (Ref_Info'(To_Offset_T (Loc),
- Small_Cursor_Kind (Info.cursor.kind)));
-
- end if;
- end Index_Reference;
-
- package Indexer is new Source_File_Indexer
- (Client_Data_T => Indexer_Data);
-
- function Full_Name (F : Virtual_File) return String
- is (String (F.Full_Name (Normalize => True).all));
-
- ------------------------------
- -- Enqueue_Translation_Unit --
- ------------------------------
-
- procedure Enqueue_Translation_Unit
- (Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- Reparse : Boolean := False;
- Options : Clang_Translation_Unit_Flags := Default_Clang_Options;
- Default_Lang : String := "c++";
- Prio : Parsing_Request_Priority := Low;
- Callback : in out Parse_Callback_Access)
- is
- Buffer : constant Editor_Buffer'Class :=
- Kernel.Get_Buffer_Factory.Get (File, False, False, False, False);
- Full_File_Name : constant String := Full_Name (File);
- begin
-
- -- If we're in reparse mode, we want to check if the buffer is open in
- -- an editor, which would imply that we potentially have a newer version
- -- than the one on disk.
-
- if Reparse
- and then Buffer /= Nil_Editor_Buffer
- and then Has_TU (Full_File_Name)
- then
- declare
- Cache_Val : constant Translation_Unit_Wrapper'Class
- := Get_TU (Full_File_Name);
- begin
- if Cache_Val.Cache.Version < Buffer.Version then
- declare
- Buffer_Text : Ada.Strings.Unbounded.String_Access :=
- new String'(Buffer.Get_Chars);
- begin
- Enqueue_Translation_Unit
- (Kernel,
- File,
- Unsaved_Files =>
- (0 =>
- Create_Unsaved_File (Full_Name (File), Buffer_Text)),
- Default_Lang => Default_Lang,
- Prio => Prio,
- Callback => Callback,
- Options => Options);
- Cache_Val.Cache.Version := Buffer.Version;
- Ada.Strings.Unbounded.Free (Buffer_Text);
- return;
- end;
- else
- if Callback /= null then
- Callback.Call (File, Cache_Val.Cache.TU);
- Free (Callback);
- end if;
- end if;
- end;
- elsif Has_TU (Full_Name (File)) then
-
- -- Since the files are reparsed incrementally, and here we're
- -- parsing the file itself, we're confident that we have an up to
- -- date TU. In this case we just want to call the callbacks with
- -- the existing TU.
-
- declare
- Cache_Val : constant Translation_Unit_Wrapper'Class
- := Get_TU (Full_File_Name);
- begin
- if Callback /= null then
- Callback.Call (File, Cache_Val.Cache.TU);
- Free (Callback);
- end if;
- end;
- else
-
- -- If we don't have a TU for this file, it's probably the first
- -- time we're parsing it. Let's enqueue a request.
-
- Enqueue_Translation_Unit
- (Kernel, File, No_Unsaved_Files,
- Prio => Prio,
- Callback => Callback);
-
- end if;
- end Enqueue_Translation_Unit;
-
- ----------------------
- -- Translation_Unit --
- ----------------------
-
- function Translation_Unit
- (Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- Project : Project_Type := No_Project;
- Reparse : Boolean := False;
- Options : Clang_Translation_Unit_Flags := Default_Clang_Options;
- Default_Lang : String := "c++")
- return Clang_Translation_Unit
- is
- pragma Unreferenced (Project);
- Callback : Parse_Callback_Access := null;
- begin
- Enqueue_Translation_Unit
- (Kernel, File, Reparse,
- Options => Options,
- Default_Lang => Default_Lang,
- Prio => High,
- Callback => Callback);
-
- if Clang_Module_Id /= null then
- return Get_TU (Full_Name (File)).Get_Blocking;
- end if;
-
- return No_Translation_Unit;
- end Translation_Unit;
-
- -----------------------------------
- -- Has_Translation_Unit_In_Cache --
- -----------------------------------
-
- function Has_Translation_Unit_In_Cache
- (File : GNATCOLL.VFS.Virtual_File) return Boolean is
- begin
- return Get_TU (Full_Name (File)).Cache.Is_Ready;
- end Has_Translation_Unit_In_Cache;
-
- ---------------------
- -- Crossrefs_Cache --
- ---------------------
-
- function Crossrefs_Cache return Clang_Crossrefs_Cache
- is
- begin
- return Clang_Module_Id.Refs;
- end Crossrefs_Cache;
-
- Empty_String_Array : constant GNATCOLL.Utils.Unbounded_String_Array (1 .. 0)
- := (others => <>);
-
- Cpp_Header_Regex : constant Regpat.Pattern_Matcher :=
- Compile (".*?include\/c\+\+\/\d\..*?\/.*$");
-
- ------------------------------
- -- Enqueue_Translation_Unit --
- ------------------------------
-
- procedure Enqueue_Translation_Unit
- (Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- Unsaved_Files : Unsaved_File_Array := No_Unsaved_Files;
- Options : Clang_Translation_Unit_Flags := Default_Clang_Options;
- Default_Lang : String := "c++";
- Prio : Parsing_Request_Priority := Low;
- Callback : Parse_Callback_Access := null)
- is
- -- ??? We should fill other unsaved_files! ??? Or should we ? I think
- -- that filling the current file as unsaved is enough. We can, at
- -- least in the first iteration of libclang, ask the user to save
- -- the other files if he expects to get completion. RA
-
- File_Name : constant String := Full_Name (File);
- Request : Parsing_Request;
-
- begin
-
- declare
- TU : Clang_Translation_Unit;
- TU_Wrapper : constant Translation_Unit_Wrapper'Class
- := Get_TU (File_Name);
-
- Switches : constant Unbounded_String_Array :=
- Get_Switches (Kernel, File, Default_Lang => Default_Lang);
-
- File_Project : constant Project_Type :=
- File_Info'Class
- (Kernel.Registry.Tree.Info_Set
- (File).First_Element).Project;
- begin
-
- if Has_TU (File_Name) then
-
- -- If the key is in the cache, we know that File_Content is not
- -- null, so we want to reparse
-
- TU := TU_Wrapper.Cache.TU;
- TU_Wrapper.Cache.TU := No_Translation_Unit;
- TU_Wrapper.Cache.Is_Ready := False;
-
- Request := new Parsing_Request_Record'
- (TU => TU,
- Context => Kernel,
- Indexer => Clang_Module_Id.Clang_Indexer,
- Kind => Reparse,
- Unsaved_Files => new Unsaved_File_Array'(Unsaved_Files),
- Options => Options,
- File_Name => +File_Name,
- Prio => Prio,
- Project_Name => +(Full_Name (File_Project.Project_Path)),
- Callbacks => <>);
-
- if Callback /= null then
- Request.Callbacks.Append (Callback);
- end if;
-
- Trace (Me, "Enqueuing request for file " & File_Name);
- Parsing_Request_Queue.Enqueue (Request);
-
- else
- -- In the other case, this is the first time we're parsing this
- -- file
-
- Request := new Parsing_Request_Record'
- (Kind => Parse,
- Context => Kernel,
- Indexer => Clang_Module_Id.Clang_Indexer,
- File_Name => +File_Name,
- Switches => new Unbounded_String_Array'(Switches),
- Options => Options,
- Prio => Prio,
- Project_Name => +(Full_Name (File_Project.Project_Path)),
- Callbacks => <>);
-
- if Callback /= null then
- Request.Callbacks.Append (Callback);
- end if;
-
- Trace (Me, "Enqueuing request for file " & File_Name);
- Parsing_Request_Queue.Enqueue (Request);
- end if;
-
- end;
- end Enqueue_Translation_Unit;
-
- package Virtual_File_Vectors is new Ada.Containers.Vectors
- (Positive, Virtual_File);
-
- -------------------------
- -- Parse_Files_Iterate --
- -------------------------
-
- procedure Parse_Files_Iterate
- (Data : in out Parse_Files_Data_Type_Access;
- Command : Command_Access;
- Result : out Command_Return_Type);
-
- procedure Parse_Files_Iterate
- (Data : in out Parse_Files_Data_Type_Access;
- Command : Command_Access;
- Result : out Command_Return_Type)
- is
- begin
- Command.Set_Progress
- (Progress_Record'(Running, Data.Current_Idx, Data.Max_Idx));
-
- if Data.Current_Idx = Data.Max_Idx then
- Result := Success;
- Save_Crossrefs_Cache (Data.Kernel);
- else
- Result := Execute_Again;
- end if;
- end Parse_Files_Iterate;
-
- package Parse_Callback_Package is
- type Parse_For_Cache is new Parse_Callback with record
- Command : Parse_Files_Data_Type_Access;
- Start_Time : Ada.Calendar.Time;
- end record;
-
- overriding procedure Call
- (Self : access Parse_For_Cache;
- File : Virtual_File;
- TU : Clang_Translation_Unit);
- end Parse_Callback_Package;
-
- package body Parse_Callback_Package is
- overriding procedure Call
- (Self : access Parse_For_Cache;
- File : Virtual_File;
- TU : Clang_Translation_Unit) is
- pragma Unreferenced (TU);
- use Ada.Calendar;
- begin
- Trace (Me, "Finished parsing " & Full_Name (File));
-
- -- Check whether the command is still active.
- Self.Command.Current_Idx := Self.Command.Current_Idx + 1;
-
- if Self.Command.Current_Idx = Self.Command.Max_Idx then
- Trace (Me, "Total indexing time: "
- & Duration'Image (Clock - Self.Start_Time));
- end if;
-
- end Call;
- end Parse_Callback_Package;
-
- ----------------------
- -- Print_File_Cache --
- ----------------------
-
- procedure Print_File_Cache (File_Cache : File_Cache_Access) is
- begin
- Put_Line ("File : " & (+File_Cache.File_Name));
- Put_Line (" Elements : ");
- for C2 in File_Cache.Map.Iterate loop
- declare
- S : constant Clang_Symbol := Symbol_To_Location_Maps.Key (C2);
- IV : constant Info_Vectors :=
- Symbol_To_Location_Maps.Element (C2);
- begin
- Put (" " & Clang_Symbol_Table_Pkg.Get (S).all);
-
- Put ("[");
- for I in IV.Decls.First_Index .. IV.Decls.Last_Index loop
- Print_Decl_Info (IV.Decls.Element (I));
- Put (" ");
- end loop;
- Put ("] ");
-
- Put ("[");
- for I in IV.Refs.First_Index .. IV.Refs.Last_Index loop
- Print_Ref_Info (IV.Refs.Element (I));
- Put (" ");
- end loop;
- Put_Line ("]");
- end;
- end loop;
-
- end Print_File_Cache;
-
- ---------------------
- -- Print_Decl_Info --
- ---------------------
-
- procedure Print_Decl_Info (D : Decl_Info) is
- begin
- Put ("(" & D.Loc'Img & ", " & D.Is_Def'Img & ", " & D.Kind'Img & ")");
- end Print_Decl_Info;
-
- --------------------
- -- Print_Ref_Info --
- --------------------
-
- procedure Print_Ref_Info (D : Ref_Info) is
- begin
- Put ("(" & D.Loc'Img & ", " & D.Cursor_Kind'Img & ")");
- end Print_Ref_Info;
-
- -----------------
- -- Print_Cache --
- -----------------
-
- procedure Print_Cache (Cache : Clang_Crossrefs_Cache) is
- begin
- Put_Line ("========= Printing the cache =========");
- for C in Cache.Map.Iterate loop
- declare
- K : constant File_Key := File_To_Refs_Maps.Key (C);
- begin
- Put_Line ("Cache entry :" & (+Unbounded_String (K)));
- Print_File_Cache (File_To_Refs_Maps.Element (C));
- Put_Line ("=================================================");
- end;
- end loop;
- end Print_Cache;
-
- --------------------
- -- Get_Cache_File --
- --------------------
-
- function Get_Cache_File (Kernel : Core_Kernel) return Virtual_File
- is
- Project : constant Project_Type := Kernel.Get_Project_Tree.Root_Project;
- begin
- return Project.Artifacts_Dir / (+"clang_ref_cache.db");
- end Get_Cache_File;
-
- --------------------------------
- -- Initialize_Crossrefs_Cache --
- --------------------------------
-
- procedure Initialize_Crossrefs_Cache (Kernel : Core_Kernel)
- is
- Cache_File : Ada.Streams.Stream_IO.File_Type;
- Cache_Stream : Stream_Access;
- Cache_VFS : constant Virtual_File := Get_Cache_File (Kernel);
- begin
- if Cache_VFS = No_File then
- return;
- end if;
-
- Trace (Me, "Loading the db: " & Full_Name (Cache_VFS));
-
- if not Cache_VFS.Is_Regular_File then
- Trace (Me, "No database file");
- return;
- end if;
-
- begin
- Ada.Streams.Stream_IO.Open
- (Cache_File, In_File, Full_Name (Cache_VFS));
- exception
- when E : others =>
- Trace (Me, "Couldn't stream to file");
- Trace (Me, Exception_Information (E));
- return;
- end;
-
- begin
- Cache_Stream := Stream (Cache_File);
- exception
- when E : others =>
- Trace (Me, "Failed to create a stream from file");
- Trace (Me, Exception_Information (E));
- return;
- end;
-
- declare
- Dummy : Boolean;
- begin
- for M of Clang_Module_Id.Refs.Map loop
- Destroy (M);
- end loop;
-
- Trace (Me, "Reading our special marker and version number");
- declare
- Marker : Natural;
- Version : String (1 .. 10);
- Validated : Boolean := False;
- begin
- Marker := Natural'Input (Cache_Stream);
- if Marker /= Cache_Constant_Marker then
- Trace (Me, "Cache marker not found - removing this cache");
- else
- Version := String'Input (Cache_Stream);
- if Version = clang_c_Index_h.Version then
- Validated := True;
- else
- Trace (Me, "Cache version: " & Version & ASCII.LF
- & "Clang version: " & clang_c_Index_h.Version
- & ASCII.LF & "... removing this cache");
- end if;
- end if;
-
- if not Validated then
- Close (Cache_File);
- Cache_VFS.Delete (Dummy);
- return;
- end if;
- end;
-
- Clang_Module_Id.Refs := Clang_Crossrefs_Cache'Input (Cache_Stream);
- exception
- when E : others =>
- Trace (Me, "Failed loading the database from cache");
- Trace (Me, Exception_Information (E));
- Cache_VFS.Delete (Dummy);
- end;
-
- Close (Cache_File);
- end Initialize_Crossrefs_Cache;
-
- --------------------------
- -- Save_Crossrefs_Cache --
- --------------------------
-
- procedure Save_Crossrefs_Cache (Kernel : Core_Kernel)
- is
- Cache_VFS : constant Virtual_File := Get_Cache_File (Kernel);
- Cache_File : Ada.Streams.Stream_IO.File_Type;
- Cache_Stream : Stream_Access;
-
- Dummy : Boolean;
- begin
- if Cache_VFS = No_File then
- return;
- end if;
-
- if Clang_Module_Id.Refs.Map.Is_Empty then
- return;
- end if;
-
- Trace (Me, "Saving the crossref cache " & Full_Name (Cache_VFS));
-
- -- Remove the file if it already exists
-
- if Cache_VFS.Is_Regular_File then
- Trace (Me, "Removing existing file");
- Cache_VFS.Delete (Dummy);
- end if;
-
- begin
- Ada.Streams.Stream_IO.Create
- (Cache_File, Out_File, Full_Name (Cache_VFS));
- exception
- when Error : others =>
- Trace (Me, "ERROR: Cannot open database file for writing");
- Trace (Me, Exception_Information (Error));
- return;
- end;
-
- begin
- Cache_Stream := Stream (Cache_File);
- exception
- when Error : Ada.IO_Exceptions.Status_Error =>
- Trace (Me, "ERROR: Cannot open database stream for writing");
- Trace (Me, Exception_Information (Error));
- return;
- end;
-
- Trace (Me, "Writing our special marker and version number to cache");
- Natural'Output (Cache_Stream, Cache_Constant_Marker);
- String'Output (Cache_Stream, clang_c_Index_h.Version);
-
- Trace (Me, "Writing the cache to disk");
- Clang_Crossrefs_Cache'Output
- (Cache_Stream, Clang_Module_Id.Refs);
-
- Close (Cache_File);
- end Save_Crossrefs_Cache;
-
- -------------
- -- Execute --
- -------------
-
- overriding procedure Execute
- (Self : On_Project_View_Changed;
- Kernel : not null access Kernel_Handle_Record'Class)
- is
- pragma Unreferenced (Self);
-
- P_Tree : constant GNATCOLL.Projects.Project_Tree_Access
- := Kernel.Get_Project_Tree;
-
- RP : constant GNATCOLL.Projects.Project_Type
- := P_Tree.Root_Project;
-
- Files : File_Array_Access;
- Filtered_Files : Virtual_File_Vectors.Vector;
- Dummy : Boolean;
- begin
- Trace (Me, "In Libclang project reload");
- Initialize_Crossrefs_Cache (Core_Kernel (Kernel));
-
- -- Stop all the tasks first.
- for I in Clang_Module_Id.Parsing_Tasks'Range loop
- Trace (Me, "Stopping task " & I'Img);
- select
- Clang_Module_Id.Parsing_Tasks (I).Stop;
- or
- delay 1.0;
- Trace (Me, "ERROR : Task " & I'Img & " seems to be dead !");
- end select;
- end loop;
-
- -- Remove all the pending requests. It's important that we stop the
- -- tasks first so that we don't block indefinitely on trying to dequeue
- -- a request that has been taken by a task.
- declare
- Dummy_Request : Parsing_Request;
- begin
- Trace (Me, "Dequeuing requests");
- while Parsing_Request_Queue.Length > 0 loop
- select
- Parsing_Request_Queue.Dequeue (Dummy_Request);
- or
- -- We don't wait long here. If we can't dequeue it means that
- -- another task is dequeuing requests, and we're supposed to
- -- have stopped them all, so there is a logic error.
- delay 0.1;
- Trace (Me, "LOGIC ERROR : Can't dequeue request");
- end select;
-
- Free (Dummy_Request);
- end loop;
- exception
- when E : others =>
- Trace (Me, "Cannot dequeue requests");
- Trace (Me, Exception_Information (E));
- end;
-
- -- Remove all the pending responses. We do that the simple way for the
- -- moment but we don't need to index at this stage
- begin
- Trace (Me, "Remove all libclang pending responses");
- Dummy := Parsing_Timeout_Handler;
- exception
- when E : others =>
- Trace (Me, "Exception when indexing");
- Trace (Me, Exception_Information (E));
- end;
-
- -- Stop the potential command showing the status of the indexing
- -- process.
- Interrupt_Queue (Kernel, Libclang_Queue_Id);
-
- -- Put all the existing cache entries to inactive
- for Cache of Clang_Module_Id.Refs.Map loop
- if Cache /= null then
- Cache.Active := False;
- end if;
- end loop;
-
- Unchecked_Free (Clang_Module_Id.Active_Files);
-
- -- Restart all the tasks
-
- for I in 1 .. Nb_Tasks_Preference.Get_Pref loop
- Clang_Module_Id.Parsing_Tasks (I).Start;
- end loop;
-
- -- We actually only want to index if cross refs are activated
-
- if not Active (Activate_Clang_XRef) then
- return;
- end if;
-
- -- Fetch all of the project's files
- Trace (Me, "Fetching C and C++ files for libclang xref cache");
- Files := RP.Source_Files (Recursive => True);
-
- -- Only keep those who are relevant to libclang
- for F of Files.all loop
- declare
- Info_Set : constant File_Info_Set := P_Tree.Info_Set (F);
- Language : constant String :=
- File_Info (Info_Set.First_Element).Language;
- Cache_Key : File_Key;
- begin
- if Language in "c" | "cpp" | "c++" then
- Cache_Key := Construct_Cache_Key (Core_Kernel (Kernel), F);
-
- if Clang_Module_Id.Refs.Map.Contains (Cache_Key) then
- -- The cache already contains an entry for this file with
- -- these switches.
-
- declare
- Cache : constant File_Cache_Access :=
- Clang_Module_Id.Refs.Map.Element (Cache_Key);
- use type Ada.Calendar.Time;
- begin
- -- Check if the time stamp is the same
- if Cache.File_Time_Stamp /= F.File_Time_Stamp then
-
- -- If it's not the same, we'll recompute the cache
- Filtered_Files.Append (F);
- Trace (Me, "Queuing " & Full_Name (F)
- & " for parsing");
-
- else
-
- -- If it is the same, we just reactivate the cache key
- Cache.Active := True;
-
- end if;
- end;
-
- Trace (Me, "Loading " & Full_Name (F) & " from cache");
- else
- Filtered_Files.Append (F);
- Trace (Me, "Queuing " & Full_Name (F) & " for parsing");
- end if;
- end if;
- end;
- end loop;
-
- Unchecked_Free (Files);
-
- Trace (Me, "Sending files to parsing tasks");
- declare
- Command : Parse_Files_Command.Generic_Asynchronous_Command_Access;
- Command_Data : constant Parse_Files_Data_Type_Access
- := new Parse_Files_Data_Type;
- begin
- -- Call Translation_Unit on them to populate the cache for the file
- Command_Data.Max_Idx := Natural (Filtered_Files.Length);
- Command_Data.Kernel := Core_Kernel (Kernel);
-
- for F of Filtered_Files loop
- declare
- Callback : Parse_Callback_Access :=
- new Parse_Callback_Package.Parse_For_Cache'
- (Command => Command_Data,
- Start_Time => Ada.Calendar.Clock);
- begin
- Enqueue_Translation_Unit
- (Core_Kernel (Kernel), F, False, Callback => Callback);
- end;
- end loop;
-
- -- Only start the monitoring command if there actually are files to
- -- parse
- if not Filtered_Files.Is_Empty then
- Trace (Me, "Starting libclang parsing files command");
-
- Parse_Files_Command.Create
- (Command, "libclang parsing files",
- Command_Data,
- Parse_Files_Iterate'Access);
-
- Launch_Background_Command
- (Kernel => Kernel,
- Command => Command,
- Active => False,
- Show_Bar => True,
- Block_Exit => False,
- Queue_Id => Libclang_Queue_Id);
- end if;
- end;
- exception
- when E : others =>
- Trace (Me, "Unexpected exception in libclang project reload");
- Trace (Me, Exception_Information (E));
- end Execute;
-
- --------------------
- -- Index_One_File --
- --------------------
-
- procedure Index_One_File is
- use Ada.Real_Time;
-
- T1 : constant Ada.Real_Time.Time := Clock;
- Response : Parsing_Response;
- begin
- if Parsing_Response_Queue.Current_Use = 0 then
- return;
- end if;
-
- select
- Parsing_Response_Queue.Dequeue (Response);
- or
- -- If we get here, there is a logic error in the tasking code.
- delay 0.1;
- Trace (Me, "LOGIC ERROR : Another thread is dequeuing responses");
- return;
- end select;
-
- Add_TU_To_Cache (+Response.File_Name, Response.TU);
-
- if Clang_Module_Id.Indexing_Active then
-
- -- Reset the references cache for file, and get the new cache
- declare
- use File_To_Refs_Maps;
-
- Cache_Key : constant File_Key :=
- Construct_Cache_Key
- (Response.Context, Create (+(+Response.File_Name)));
- Refs : File_Cache_Access;
- C : File_To_Refs_Maps.Cursor;
- begin
-
- C := Clang_Module_Id.Refs.Map.Find (Cache_Key);
- if C = No_Element then
- Refs := new File_Cache_Record;
- Refs.File_Name := Response.File_Name;
- Clang_Module_Id.Refs.Map.Include (Cache_Key, Refs);
- else
- Refs := Element (C);
- Empty_Cache_Map (Refs.Map);
- end if;
-
- Refs.File_Time_Stamp :=
- Create (+(+Response.File_Name)).File_Time_Stamp;
-
- Trace (Me, "Start indexing for file " & (+Response.File_Name));
- Indexer.Index_Translation_Unit
- (Index_Action =>
- Clang_Module_Id.Index_Action,
- Client_Data =>
- Indexer_Data'(Syms_To_Locs => Refs),
- Index_Options => CXIndexOpt_None,
- TU =>
- Clang_Module_Id.TU_Cache.Element (Response.File_Name).TU);
- end;
- end if;
-
- -- Call all the callbacks and free them
- for CB of Response.Callbacks loop
- CB.Call (Create (Filesystem_String (+Response.File_Name)),
- Response.TU);
- Free (CB);
- end loop;
-
- Trace (Me, "Indexing finished, took "
- & Duration'Image (To_Duration (Clock - T1)));
- end Index_One_File;
-
- -----------------------------
- -- Parsing_Timeout_Handler --
- -----------------------------
-
- function Parsing_Timeout_Handler return Boolean is
- begin
- while Parsing_Response_Queue.Current_Use > 0 loop
- Index_One_File;
- end loop;
-
- return True;
- end Parsing_Timeout_Handler;
-
- Libclang_Class_Name : constant String := "Libclang";
-
- -------------------
- -- Python_Get_TU --
- -------------------
-
- procedure Python_Get_TU
- (Data : in out Callback_Data'Class; Command : String)
- is
- pragma Unreferenced (Command);
-
- Kernel : constant Kernel_Handle := Get_Kernel (Data);
-
- File : constant Virtual_File := Get_Data
- (Nth_Arg
- (Data, 1, Get_File_Class (Kernel),
- Default => No_Class_Instance, Allow_Null => True));
-
- -- ??? TEMPORARY HACK: Don't use the project passed by the user, because
- -- we don't support aggregate projects correctly for the moment.
- -- Project : GNATCOLL.Projects.Project_Type := Get_Data (Data, 2);
- Project : constant GNATCOLL.Projects.Project_Type := No_Project;
-
- CTU : constant Clang_Translation_Unit := Translation_Unit
- (Kernel => Core_Kernel (Get_Kernel (Data)),
- File => File,
- Project => Project);
-
- function To_Address is new Ada.Unchecked_Conversion
- (Clang_Translation_Unit, System.Address);
- begin
-
- Set_Return_Value_As_List (Data);
- Set_Address_Return_Value (Data, To_Address (CTU));
- Set_Address_Return_Value
- (Data, System.Address (Clang_Module_Id.Clang_Indexer));
- end Python_Get_TU;
-
- ---------------------
- -- Register_Module --
- ---------------------
-
- procedure Register_Module
- (Kernel : access GPS.Kernel.Kernel_Handle_Record'Class)
- is
- Language_Class : constant Class_Type :=
- New_Class (Kernel, Libclang_Class_Name);
-
- Idx : constant Clang_Index :=
- Create_Index
- (True,
- -- We never want to display diagnostics via libclang,
- -- because it will just dump them on stdout
- Display_Diagnostics => False);
-
- begin
-
- -- Register the "Clang advanced settings" group explicitly, because we
- -- want it to be the last group on the C & C++ page.
-
- Kernel.Get_Preferences.Get_Registered_Page
- ("Editor/C & C++/", Create_If_Needed => True).Register_Group
- ("Clang advanced settings", new Preferences_Group_Record, -10, True);
-
- LRU_Size_Preference := Default_Preferences.Create
- (Manager => Kernel.Get_Preferences,
- Name => "Libclang-LRU-Size",
- Label => "Cache size",
- Doc => "Number of compilation units kept in memory.",
- Path => "Editor/C & C++:Clang advanced settings",
- Default => 8, Minimum => 1, Maximum => 128);
-
- Nb_Tasks_Preference := Default_Preferences.Create
- (Manager => Kernel.Get_Preferences,
- Name => "Libclang-Nb-Parsing-Tasks",
- Label => "Parsing tasks count",
- Doc => "Number of concurrent tasks to parse files.",
- Path => "Editor/C & C++:Clang advanced settings",
-
- Default => Natural'Max
- (Natural'Min (Natural (Number_Of_CPUs + 1) / 2, Max_Nb_Tasks), 1),
-
- -- We prefer to be conservative on the number of tasks allocated to
- -- clang parsing, in order to not provoke freezes on user's machines.
- -- This expression will give the following transfer:
- --
- -- +---------------+------------------+
- -- | Nb processors | Nb parsing tasks |
- -- | 1 | 1 |
- -- | 2 | 1 |
- -- | 3 | 2 |
- -- | 4 | 2 |
- -- | 5 | 3 |
- -- | 6 | 3 |
- -- | 7 | 4 |
- -- | 8 | 4 |
- -- +---------------+------------------+
-
- Minimum => 1, Maximum => Max_Nb_Tasks);
-
- Register_Command
- (Kernel.Scripts, "_get_translation_unit",
- (Param ("file"), Param ("project")),
- Python_Get_TU'Access,
- Language_Class,
- Static_Method => True);
-
- -- Register cross references databases for c and c++
- if Active (Activate_Clang_XRef) then
- Kernel.Databases.Lang_Specific_Databases.Include
- ("c", Clang_Database'(null record));
-
- Kernel.Databases.Lang_Specific_Databases.Include
- ("c++", Clang_Database'(null record));
- end if;
-
- Clang_Module_Id :=
- new Clang_Module_Record (Nb_Tasks_Preference.Get_Pref);
-
- Register_Module
- (Clang_Module_Id, Kernel, "clang_module", Default_Priority);
-
- Clang_Module_Id.Parsing_Timeout_Id :=
- Glib.Main.Timeout_Add (100, Parsing_Timeout_Handler'Access);
-
- Project_View_Changed_Hook.Add (new On_Project_View_Changed);
-
- for I in Clang_Module_Id.Parsing_Tasks'Range loop
- Clang_Module_Id.Parsing_Tasks (I) := new Parsing_Task;
- end loop;
-
- Clang_Module_Id.Clang_Indexer := Idx;
- Clang_Module_Id.TU_Cache := new TU_Maps.Map;
- Clang_Module_Id.LRU := new LRU_Lists.List;
- Clang_Module_Id.Index_Action := Create (Idx);
- Clang_Module_Id.Refs := new Clang_Crossrefs_Cache_Type;
- end Register_Module;
-
- ----------------------
- -- Is_Module_Active --
- ----------------------
-
- function Is_Module_Active return Boolean
- is
- (Clang_Module_Id /= null);
-
- -------------
- -- Destroy --
- -------------
-
- overriding procedure Destroy (Id : in out Clang_Module_Record) is
- begin
- Trace (Me, "Cleaning all cache for libclang");
-
- -- Kill all tasks *before* we deallocate any resources
- for T of Clang_Module_Id.Parsing_Tasks loop
- T.Finish;
- end loop;
-
- Unchecked_Free (Id.Active_Files);
-
- for C of Id.TU_Cache.all loop
- Destroy (C);
- end loop;
- Id.TU_Cache.Clear;
- Unchecked_Free (Id.TU_Cache);
- Unchecked_Free (Id.LRU);
-
- for M of Id.Refs.Map loop
- Destroy (M);
- end loop;
- Unchecked_Free (Id.Refs);
-
- Dispose (Id.Index_Action);
- clang_disposeIndex (Id.Clang_Indexer);
-
- Clang_Symbol_Table.Free;
- end Destroy;
-
- -------------
- -- Destroy --
- -------------
-
- procedure Destroy (Tu_Cache : in out TU_Cache_Access) is
- begin
- if Tu_Cache.TU /= No_Translation_Unit then
- Dispose (Tu_Cache.TU);
- end if;
- Unchecked_Free (Tu_Cache);
- end Destroy;
-
- ------------------
- -- Get_Blocking --
- ------------------
-
- function Get_Blocking
- (Self : Translation_Unit_Wrapper'Class) return Clang_Translation_Unit
- is
- begin
- loop
- if Self.Cache.Is_Ready = False then
-
- -- While waiting on the translation unit to be ready, we'll index
- -- one file at a time, and eventually our request will have been
- -- processed.
-
- Index_One_File;
- delay 0.005;
- else
- return Self.Cache.TU;
- end if;
- end loop;
- end Get_Blocking;
-
- ------------------
- -- Get_Switches --
- ------------------
-
- function Get_Switches
- (Kernel : Core_Kernel;
- File : Virtual_File;
- Project : Project_Type := No_Project;
- Default_Lang : String := "c++";
- Include_Compiler_Switches : Boolean := True)
- return Unbounded_String_Array
- is
-
- Kernel_Lang : constant String :=
- Kernel.Lang_Handler.Get_Language_From_File (File);
-
- function Lang return String;
- function Lang return String is
- begin
- if Match (Cpp_Header_Regex, Full_Name (File)) then
- return "c++";
- elsif Kernel_Lang = "" then
- return Default_Lang;
- else
- return Kernel_Lang;
- end if;
- end Lang;
-
- Ignored : Boolean;
-
- File_Project : constant Project_Type :=
- (if Project /= No_Project then Project
- else
- File_Info'Class
- (Kernel.Registry.Tree.Info_Set
- (File).First_Element).Project);
-
- function Get_File_Switches return Unbounded_String_Array;
- -- Wrap the fetching of file switches for this file and project as
- -- unbounded string array
-
- function Get_File_Switches return Unbounded_String_Array is
- C_Switches : GNAT.Strings.String_List_Access;
- begin
- -- Retrieve the switches for this file
- Switches
- (File_Project, "compiler", File, Lang, C_Switches, Ignored);
- return S : Unbounded_String_Array (C_Switches.all'Range) do
- for J in C_Switches'Range loop
- S (J) := +C_Switches (J).all;
- end loop;
- GNAT.Strings.Free (C_Switches);
- end return;
- end Get_File_Switches;
-
- Switches : constant GNATCOLL.Utils.Unbounded_String_Array
- :=
-
- -- We pass to libclang a list of switches made of:
- -- ... the C/C++ switches specified in this project
- Get_File_Switches
-
- -- ... a -I
for each directory in the subprojects
- -- of this project
- & Get_Project_Source_Dirs
- (Kernel, File_Project, Lang)
-
- -- ... a -I for each dir in the compiler search path
- & (if Include_Compiler_Switches
- then Get_Compiler_Search_Paths_Switches (Kernel, File_Project, Lang)
- else Empty_String_Array)
-
- & (if Lang in "c++" | "cpp" then (+"-x", +"c++")
- else Empty_String_Array);
- begin
-
- Trace (Diagnostics, "=== File : " & Full_Name (File));
- Trace (Diagnostics, "=== Language : " & Lang);
- Trace (Diagnostics, "======= Begin switches ==============");
- for Sw of Switches loop
- Trace (Diagnostics, +Sw);
- end loop;
- Trace (Diagnostics, "======= End switches ==============");
-
- return Switches;
- end Get_Switches;
-
- -------------------------
- -- Construct_Cache_Key --
- -------------------------
-
- function Construct_Cache_Key
- (Kernel : Core_Kernel;
- File : Virtual_File;
- Project : Project_Type := No_Project) return File_Key
- is
- begin
- return Construct_Cache_Key
- (Full_Name (File),
- Get_Switches
- (Kernel, File, Project,
- -- We don't want to include compiler switches in the cache key, we
- -- presume that they are always the same
- Include_Compiler_Switches => False));
- end Construct_Cache_Key;
-
- -------------------------
- -- Construct_Cache_Key --
- -------------------------
-
- function Construct_Cache_Key
- (File_Name : String;
- Switches : Unbounded_String_Array) return File_Key
- is
- Result : Unbounded_String;
- begin
- Append (Result, +File_Name);
-
- for Switch of Switches loop
- Append (Result, Switch);
- end loop;
-
- return File_Key (Result);
- end Construct_Cache_Key;
-
- ----------------------
- -- Get_Active_Files --
- ----------------------
-
- function Get_Active_Files return File_Cache_Array
- is
- F : File_Cache_Array (1 .. Positive (Clang_Module_Id.Refs.Map.Length));
- I : Positive := 1;
-
- function Filter (FCA : File_Cache_Access) return Boolean is (FCA.Active);
- begin
- if Clang_Module_Id.Active_Files = null then
- for El of Clang_Module_Id.Refs.Map loop
- F (I) := El;
- I := I + 1;
- end loop;
-
- Clang_Module_Id.Active_Files
- := new File_Cache_Array'
- (File_Type_Arrays.Filter (F, Filter'Access));
- end if;
-
- return Clang_Module_Id.Active_Files.all;
- end Get_Active_Files;
-
- ----------------
- -- Initialize --
- ----------------
-
- overriding procedure Initialize (Self : in out Use_Index) is
- pragma Unreferenced (Self);
- begin
- Clang_Module_Id.Indexing_Active := False;
- end Initialize;
-
- --------------
- -- Finalize --
- --------------
-
- overriding procedure Finalize (Self : in out Use_Index) is
- pragma Unreferenced (Self);
- begin
- Clang_Module_Id.Indexing_Active := True;
- end Finalize;
-
- ----------------------
- -- Get_Index_Action --
- ----------------------
-
- function Get_Index_Action return Clang_Index_Action is
- begin
- return Clang_Module_Id.Index_Action;
- end Get_Index_Action;
-
-end Language.Libclang;
diff --git a/kernel/src/language-libclang.ads b/kernel/src/language-libclang.ads
deleted file mode 100644
index e034621680..0000000000
--- a/kernel/src/language-libclang.ads
+++ /dev/null
@@ -1,381 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2015-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with Ada.Containers; use Ada.Containers;
-with Ada.Containers.Doubly_Linked_Lists;
-with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
-with Ada.Strings.Unbounded.Hash;
-with Ada.Finalization;
-with Ada.Containers.Hashed_Maps;
-with Ada.Containers.Vectors;
-with Ada.Calendar;
-
-with GNATCOLL.Projects; use GNATCOLL.Projects;
-with GNATCOLL.VFS; use GNATCOLL.VFS;
-with GNATCOLL.Symbols.Streamable_Symbol_Table;
-
-with Streamable_Access_Type;
-with Array_Utils;
-
-with Glib.Main;
-
-with GPS.Core_Kernels; use GPS.Core_Kernels;
-with GPS.Kernel;
-with GPS.Kernel.Modules; use GPS.Kernel.Modules;
-
-with Libclang.Task_Parser_Pool; use Libclang.Task_Parser_Pool;
-with clang_c_Index_h; use clang_c_Index_h;
-with Libclang.Index; use Libclang.Index;
-
------------------------
--- Language.Libclang --
------------------------
-
-package Language.Libclang is
-
- -- This is the gate through which users wishing to use libclang will get
- -- the translation unit for a given file. IMPORTANT : EVERY translation
- -- unit parsing should go through this, even though the clang primitives
- -- are not hidden (yet)
-
- -- Translation units are stored in a cache with a fixed size, and each
- -- time a translation unit is parsed, a distinct reference cache is filled.
- -- This cache can be used to implement semantic search operations more
- -- efficiently, which is a necessity on big projects to keep a reasonnable
- -- run time.
-
- -- The reference cache has the following (simplified) structure:
- --
- -- File -> USR -> [Vector of references information]
- --
- -- Files are stored at the top level of the cache, so that it is easy to
- -- invalidate the cache for a given file. If will in turn make the search
- -- for references to a given USR longer than if the cache was the other way
- -- around, but this is a good compromise
-
- -- TODO ??? At some point, translation_unit should expose an async,
- -- non blocking way of getting the translation units, and GNAT Studio
- -- should be adjusted to not block on semantic operations. This will be
- -- done by means of a task
-
- type Clang_Module_Record (<>) is new Module_ID_Record with private;
- type Clang_Module_Access is access all Clang_Module_Record'Class;
-
- Clang_Module_Id : Clang_Module_Access;
-
- --------------------------------
- -- Cache information records --
- --------------------------------
-
- -- NOTE: Those two types store Offsets for space efficiency reasons
-
- subtype Small_Cursor_Kind is CXCursorKind;
-
- type Decl_Info is record
- Loc : Offset_T;
- Is_Def : Boolean;
- Kind : Small_Cursor_Kind;
- end record;
- -- This is the record for declarations information stored in the reference
- -- cache. Important because in C a single entity can have several
- -- declarations AND bodies
-
- type Ref_Info is record
- Loc : Offset_T;
- Cursor_Kind : Small_Cursor_Kind;
- end record;
- -- This is the record for references information stored in the reference
- -- cache
-
- ----------------------------
- -- Cache data structures --
- ----------------------------
-
- package Ref_Info_Vectors is
- new Ada.Containers.Vectors (Positive, Ref_Info);
- package Streamable_Ref_Info_Vectors_Accesses
- is new Streamable_Access_Type (Ref_Info_Vectors.Vector);
- subtype Ref_Info_Vector is Streamable_Ref_Info_Vectors_Accesses.Access_Type;
- -- A vector of references information
-
- package Decl_Info_Vectors is
- new Ada.Containers.Vectors (Positive, Decl_Info);
- package Streamable_Decl_Info_Vectors_Accesses
- is new Streamable_Access_Type (Decl_Info_Vectors.Vector);
- subtype Decl_Info_Vector
- is Streamable_Decl_Info_Vectors_Accesses.Access_Type;
- -- A vector of declarations information
-
- type Info_Vectors is record
- Decls : Decl_Info_Vector := null;
- Refs : Ref_Info_Vector := null;
- end record;
- -- Record for the information for a (file, usr) couple. Keep tracks of
- -- every reference for a specific USR in a specific file
-
- package Clang_Symbol_Table_Pkg
- is new GNATCOLL.Symbols.Streamable_Symbol_Table;
-
- Clang_Symbol_Table : Clang_Symbol_Table_Pkg.Symbol_Table_Access
- renames Clang_Symbol_Table_Pkg.Symbol_Table;
-
- subtype Clang_Symbol is Clang_Symbol_Table_Pkg.Streamable_Symbol;
- use type Clang_Symbol;
-
- --------------------
- -- Sym_To_Loc_Map --
- --------------------
-
- -- File -> (USR -> Info_Vector) part of the cache
-
- package Symbol_To_Location_Maps is new Ada.Containers.Hashed_Maps
- (Clang_Symbol, Info_Vectors,
- Hash => Clang_Symbol_Table_Pkg.Hash, Equivalent_Keys => "=");
-
- type File_Cache_Record is record
- File_Name : Unbounded_String;
- -- We keep the file name here, to be able to find it back easily when we
- -- have a cache entry. The key contains it but this allows us to avoid
- -- extracting it
-
- File_Time_Stamp : Ada.Calendar.Time;
- -- We keep the time stamp at which this cache entry was recorded, so
- -- that we can easily determine wether we need to recompute the entry
- -- when we start GNAT Studio again.
-
- Active : Boolean := True;
- -- This determines wether the cache is active or not. Since you can have
- -- several cache entries for a different file, this allows us to know
- -- which one is active
-
- Map : Symbol_To_Location_Maps.Map;
- -- This is the map of cross references
-
- end record;
- -- A cache record keeps the cross-reference information for a *specific
- -- compilation* of a given file. This means that if for whatever reason
- -- you compile a given file with options that will yield different cross
- -- references, there will be *several* cache entries for each of them
-
- package Streamable_File_Cache_Accesses
- is new Streamable_Access_Type (File_Cache_Record);
- -- We use the Streamable_Access_Type generic package, so that accesses of
- -- this type are automatically streamable
-
- subtype File_Cache_Access is Streamable_File_Cache_Accesses.Access_Type;
- use type File_Cache_Access;
-
- -----------------
- -- VFS_To_Refs --
- -----------------
-
- -- (File -> USR) -> Info_Vector part of the cache
-
- type File_Key is new Unbounded_String;
- -- This type is the key that is used to index files in the clang cache. It
- -- is basically a conflation of the file full path + the switches that can
- -- change the cross references
-
- package File_To_Refs_Maps is new Ada.Containers.Hashed_Maps
- (File_Key, File_Cache_Access, Hash, "=");
-
- type Clang_Crossrefs_Cache_Type is record
- Map : File_To_Refs_Maps.Map;
- end record;
-
- package File_Type_Arrays is new Array_Utils (File_Cache_Access);
- subtype File_Cache_Array is File_Type_Arrays.Array_Type;
- type File_Cache_Array_Access is access all File_Cache_Array;
-
- package Streamable_Clang_Crossrefs_Cache_Accesses
- is new Streamable_Access_Type (Clang_Crossrefs_Cache_Type);
-
- subtype Clang_Crossrefs_Cache
- is Streamable_Clang_Crossrefs_Cache_Accesses.Access_Type;
- -- Main cross references cache data structure for libclang. Uses a
- -- streamable access type so we can serialize to disk
-
- type TU_Cache_Record is record
- TU : Clang_Translation_Unit := No_Translation_Unit;
- Is_Ready : Boolean := False;
- Version : Integer := 0;
- end record;
- type TU_Cache_Access is access all TU_Cache_Record;
- procedure Destroy (Tu_Cache : in out TU_Cache_Access);
- -- Record used to store a translation unit in the TU cache. We add a
- -- version to it, that is used to determine when the TU should be reparsed
-
- package TU_Maps is new Ada.Containers.Hashed_Maps
- (Unbounded_String, TU_Cache_Access, Hash, "=");
- type Tu_Map_Access is access all TU_Maps.Map;
- -- Map used to store the cache of translation units
-
- package LRU_Lists is new Ada.Containers.Doubly_Linked_Lists
- (Unbounded_String);
- type LRU_Vector_Access is access all LRU_Lists.List;
- -- List used to store a LIFO of the translation units to free when the
- -- cache is full
-
- --------------------------
- -- Translation unit API --
- --------------------------
-
- Default_Clang_Options : constant Clang_Translation_Unit_Flags :=
- Includebriefcommentsincodecompletion
- or Precompiledpreamble
- or Cachecompletionresults
- or Detailedpreprocessingrecord;
- -- This is the set of default clang options used by the clang module
-
- function Translation_Unit
- (Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- Project : Project_Type := No_Project;
- Reparse : Boolean := False;
- Options : Clang_Translation_Unit_Flags := Default_Clang_Options;
- Default_Lang : String := "c++")
- return Clang_Translation_Unit;
- -- Request the translation unit associated with file, and block while it's
- -- being computed, finally returning it
-
- procedure Enqueue_Translation_Unit
- (Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- Reparse : Boolean := False;
- Options : Clang_Translation_Unit_Flags := Default_Clang_Options;
- Default_Lang : String := "c++";
- Prio : Parsing_Request_Priority := Low;
- Callback : in out Parse_Callback_Access);
- -- Request the translation unit associated with file and return
- -- immediately. Call Callback when the translation unit is ready
-
- function Has_Translation_Unit_In_Cache
- (File : GNATCOLL.VFS.Virtual_File) return Boolean;
- -- Return True iff there is a TU already in cache for File
-
- ----------------------------------------------------------
- -- Global accessors for the clang cross reference cache --
- ----------------------------------------------------------
-
- -- Those are the entry points in the cross reference cache.
-
- function Crossrefs_Cache return Clang_Crossrefs_Cache;
- -- Return the global cross-references cache
-
- function Get_Active_Files return File_Cache_Array;
- -- Return the files that are currently active in the cross references cache
-
- function Get_Index_Action return Clang_Index_Action;
- -- Return the global index action for the clang module
-
- function Construct_Cache_Key
- (Kernel : Core_Kernel;
- File : Virtual_File;
- Project : Project_Type := No_Project) return File_Key;
- -- Construct a cache key given a file. If the Project is none, this
- -- function will take the first valid project for this
- -- ??? When completing aggregate project support, we'll remove the default
- -- value for project
-
- type Use_Index is private;
- -- This type is a controlled type that is used to notify the clang module
- -- that the clang cache is in use, and that it shouldn't be modified.
- -- Since it's a controlled object, here is the way it works:
- --
- -- procedure Use_The_Cache is
- -- I : Use_Index;
- -- -- As soon as the object is created, the cache is locked and cannot
- -- -- be modified
- -- begin
- -- Use_The_Cache_Somehow;
- -- end Use_The_Cache;
- -- -- When exiting the function, I is freed and the cache is unlocked
-
- ----------------------------------------------------
- -- Debug procedures for the clang reference cache --
- ----------------------------------------------------
-
- procedure Print_Decl_Info (D : Decl_Info);
- procedure Print_Ref_Info (D : Ref_Info);
- procedure Print_Cache (Cache : Clang_Crossrefs_Cache);
- procedure Print_File_Cache (File_Cache : File_Cache_Access);
- -- Debug procedures. Used to print the content of the libclang file cache
-
- procedure Register_Module
- (Kernel : access GPS.Kernel.Kernel_Handle_Record'Class);
- -- Register the clang module globally
-
- function Is_Module_Active return Boolean;
- -- Return True if the clang module is active, False otherwise.
-
-private
-
- Max_Nb_Tasks : constant Natural := 6;
- -- We have made experiments and determined that above 6 tasks there was no
- -- improvement in analysis speed, even on machines with many processors.
-
- package Task_Parser_Pool is new Pool (User_Data => Core_Kernel);
- use Task_Parser_Pool;
- -- Parser pools using to parse clang translation unit in tasks
- -- asynchronously.
-
- type Clang_Module_Record (Tasks : Positive) is new Module_ID_Record with
- record
- Parsing_Timeout_Id : Glib.Main.G_Source_Id;
- -- Id of the global timeout that is used to regularly index files that
- -- have been parsed
-
- Parsing_Tasks : Parsing_Task_Array (1 .. Tasks);
- -- Array of parsing tasks.
-
- Indexing_Active : Boolean := True;
- -- Global variable used by the indexing timeout handler to know if it
- -- should index parsed files or not. This is used by procedures using
- -- the references cache, to notify the libclang engine that the cache
- -- is currently inspected and should not be modified
-
- TU_Cache : Tu_Map_Access;
- LRU : LRU_Vector_Access;
- -- Those two components, together, constitute the LRU cache. The
- -- TU_Cache map is used to retrieve translation units by name, while
- -- the LRU vector is used to evict old translation units.
-
- Clang_Indexer : Clang_Index;
- -- This is the global clang indexer, that is the gateway to the
- -- underlying libclang API. We have only one Indexer for everything
- -- for convenience, and because there is no pro to do it another way.
-
- Index_Action : Clang_Index_Action;
- -- Index action used by the cross reference indexing machinery.
-
- Refs : Clang_Crossrefs_Cache;
- -- Clang cross references cache entry point.
-
- Active_Files : File_Cache_Array_Access := null;
- -- Cache used because iteration on Hashed Maps is very slow.
- end record;
- -- This is the global cache record, containing information that is globally
- -- useful to the clang module
-
- overriding procedure Destroy (Id : in out Clang_Module_Record);
- -- Destroy procedure, freeing every resources associated with libclang
-
- type Use_Index is new Ada.Finalization.Controlled with null record;
-
- overriding procedure Initialize (Self : in out Use_Index);
- overriding procedure Finalize (Self : in out Use_Index);
-end Language.Libclang;
diff --git a/kernel/src/language-libclang_tree.adb b/kernel/src/language-libclang_tree.adb
deleted file mode 100644
index 4a0bfc60cc..0000000000
--- a/kernel/src/language-libclang_tree.adb
+++ /dev/null
@@ -1,643 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2003-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with Ada.Containers.Generic_Array_Sort;
-
-with Interfaces.C; use Interfaces.C;
-with Libclang.Task_Parser_Pool; use Libclang.Task_Parser_Pool;
-with String_Utils;
-
-package body Language.Libclang_Tree is
-
- type Update_Async_Record is new Parse_Callback with record
- Kernel : Core_Kernel;
- end record;
-
- overriding procedure Call
- (Self : access Update_Async_Record;
- File : GNATCOLL.VFS.Virtual_File;
- TU : Clang_Translation_Unit);
-
- function Node_From_Cursor
- (C : Clang_Cursor; N : Clang_Node) return Semantic_Node'Class;
-
- ----------
- -- Call --
- ----------
-
- overriding procedure Call
- (Self : access Update_Async_Record;
- File : GNATCOLL.VFS.Virtual_File;
- TU : Clang_Translation_Unit)
- is
- pragma Unreferenced (TU);
- begin
- Self.Kernel.Semantic_Tree_Updated (File);
- end Call;
-
- ------------
- -- Filter --
- ------------
-
- function Filter_Children (C : Clang_Cursor) return Boolean
- is
- (not (Kind (C) in CXCursor_UnionDecl | CXCursor_StructDecl
- and then Spelling (C) = ""));
-
- ----------------------
- -- Node_From_Cursor --
- ----------------------
-
- function Node_From_Cursor
- (C : Clang_Cursor; N : Clang_Node) return Semantic_Node'Class
- is
- (if C = No_Cursor
- then No_Semantic_Node
- else Clang_Node'(N.Kernel, C, N.Ref_File));
-
- ---------------
- -- To_Sloc_T --
- ---------------
-
- function To_Sloc_T (Arg : CXSourceLocation) return Sloc_T is
-
- procedure clang_getSpellingLocation
- (location : CXSourceLocation;
- file : access CXFile;
- line : access unsigned;
- column : access unsigned;
- offset : access unsigned);
-
- pragma Import (C, clang_getSpellingLocation,
- "clang_getSpellingLocation");
-
- Line, Column, Offset : aliased unsigned;
- File : aliased CXFile;
- begin
- clang_getSpellingLocation
- (Arg, File'Access, Line'Access, Column'Access, Offset'Access);
-
- return Sloc_T'(Natural (Line), Visible_Column_Type (Column),
- Offset_T (Offset));
- end To_Sloc_T;
-
- ------------------------------------
- -- Clang_Tree_Provider primitives --
- ------------------------------------
-
- ------------
- -- Create --
- ------------
-
- function Create (K : Core_Kernel) return Semantic_Tree_Provider_Access
- is
- begin
- return new Clang_Tree_Provider'(Kernel => K);
- end Create;
-
- -----------------------
- -- Get_Tree_For_File --
- -----------------------
-
- overriding function Get_Tree_For_File
- (Self : in out Clang_Tree_Provider;
- Context : String;
- File : GNATCOLL.VFS.Virtual_File) return Semantic_Tree'Class
- is
- pragma Unreferenced (Context);
- begin
- return Abstract_Clang_Tree'(Self.Kernel, File);
- end Get_Tree_For_File;
-
- ------------------------------------
- -- Abstract_Clang_Tree primitives --
- ------------------------------------
-
- ----------------
- -- Root_Nodes --
- ----------------
-
- overriding function Root_Nodes
- (Self : Abstract_Clang_Tree) return Semantic_Node_Array'Class
- is
- begin
- return
- Clang_Node_Array'
- (Cursors_Holders.To_Holder
- (Toplevel_Nodes (Self.Tu, Filter_Children'Access)),
- Self.Kernel, Self.File);
- end Root_Nodes;
-
- -------------------
- -- Root_Iterator --
- -------------------
-
- overriding function Root_Iterator
- (Self : Abstract_Clang_Tree) return Semantic_Tree_Iterator'Class
- is
- Initial_List : Clang_Iterator_Lists_Ref.Holder :=
- Clang_Iterator_Lists_Ref.To_Holder
- (Clang_Iterator_Lists.Empty_List);
-
- Initial_Children : constant Cursors_Arrays.Array_Type :=
- Toplevel_Nodes (Self.Tu, Filter_Children'Access);
- begin
- for Cursor of Initial_Children loop
- Initial_List.Reference.Append (Cursor);
- end loop;
-
- declare
- It : constant Clang_Iterator_Lists.Cursor :=
- Initial_List.Reference.First;
- begin
- return Clang_Tree_Iterator'
- (Self.Kernel, Self.File, Initial_List, It, False);
- end;
- end Root_Iterator;
-
- ----------
- -- File --
- ----------
-
- overriding function File
- (Self : Abstract_Clang_Tree) return GNATCOLL.VFS.Virtual_File
- is
- begin
- return Self.File;
- end File;
-
- ------------
- -- Update --
- ------------
-
- overriding procedure Update (Self : in out Abstract_Clang_Tree) is
- TU : Clang_Translation_Unit :=
- Translation_Unit (Self.Kernel, Self.File, Reparse => True);
- pragma Unreferenced (TU);
- begin
- null;
- end Update;
-
- ------------------
- -- Update_Async --
- ------------------
-
- overriding procedure Update_Async (Self : in out Abstract_Clang_Tree) is
- Callback : Parse_Callback_Access := new Update_Async_Record'
- (Parse_Callback with Kernel => Self.Kernel);
- begin
- Enqueue_Translation_Unit
- (Kernel => Self.Kernel,
- File => Self.File,
- Reparse => True,
- Callback => Callback);
- end Update_Async;
-
- ---------------------------
- -- Clang_Node primitives --
- ---------------------------
-
- type Clang_Cursor_Kind_To_Category_Array is
- array (CXCursor_MIN_VALUE .. CXCursor_MAX_VALUE) of Language_Category;
-
- Clang_Cursor_Kind_To_Category :
- constant Clang_Cursor_Kind_To_Category_Array :=
- (CXCursor_StructDecl => Cat_Structure,
- CXCursor_UnionDecl => Cat_Union,
- CXCursor_UnexposedDecl => Cat_Type,
- CXCursor_ClassDecl => Cat_Class,
- CXCursor_EnumDecl => Cat_Type,
- CXCursor_FieldDecl => Cat_Field,
- CXCursor_CompoundStmt => Cat_Declare_Block,
- CXCursor_EnumConstantDecl => Cat_Field,
- CXCursor_FunctionDecl => Cat_Function,
- CXCursor_CXXMethod => Cat_Method,
- CXCursor_VarDecl => Cat_Variable,
- CXCursor_ParmDecl => Cat_Parameter,
- CXCursor_TypedefDecl => Cat_Type,
- CXCursor_Namespace => Cat_Namespace,
- CXCursor_Constructor => Cat_Constructor,
- CXCursor_Destructor => Cat_Destructor,
- CXCursor_ConversionFunction => Cat_Function,
- CXCursor_FunctionTemplate => Cat_Function,
- CXCursor_ClassTemplate => Cat_Class,
- CXCursor_ClassTemplatePartialSpecialization => Cat_Class,
- CXCursor_NamespaceAlias => Cat_Namespace,
- CXCursor_UsingDirective => Cat_Use,
- CXCursor_UsingDeclaration => Cat_Use,
- CXCursor_TypeAliasDecl => Cat_Type,
- CXCursor_IfStmt => Cat_If_Statement,
- CXCursor_ForStmt => Cat_Loop_Statement,
- CXCursor_WhileStmt => Cat_Loop_Statement,
- CXCursor_DoStmt => Cat_Loop_Statement,
- CXCursor_CaseStmt => Cat_Case_Statement,
- others => Cat_Unknown);
-
- --------------
- -- Category --
- --------------
-
- overriding function Category
- (Self : Clang_Node) return Language_Category
- is
- C_Cat : constant unsigned := (Kind (Self.Cursor));
- begin
- return Clang_Cursor_Kind_To_Category (C_Cat);
- end Category;
-
- -------------
- -- Node_At --
- -------------
-
- overriding function Node_At
- (Self : Abstract_Clang_Tree; Sloc : Sloc_T;
- Category_Filter : Category_Array := Null_Category_Array)
- return Semantic_Node'Class
- is
- Line_Offset : constant Natural :=
- Self.Kernel.Get_Buffer_Factory.Get
- (Self.File, Open_View => False, Focus => False, Open_Buffer => True)
- .New_Location (Sloc.Line, Sloc.Column).Line_Offset;
-
- Top_Cursor : constant Clang_Cursor :=
- Cursor_At (Self.Tu, Self.File, Sloc.Line, Line_Offset + 1);
- Cursor : Clang_Cursor := Top_Cursor;
- Parent : Clang_Cursor;
-
- use Cursors_Arrays;
-
- function In_Range (Containing : Clang_Cursor) return Boolean
- is (In_Range (Top_Cursor, Containing));
-
- function Next_Child (C : Clang_Cursor) return Array_Type
- is (Get_Children (C, In_Range'Access));
-
- function Children_Chain (C : Clang_Cursor) return Array_Type;
- function Children_Chain (C : Clang_Cursor) return Array_Type
- is
- Child : constant Array_Type := Next_Child (C);
- begin
- return (if Child = Empty_Array then Child
- else Child & Children_Chain (Child (1)));
- end Children_Chain;
-
- function Fullfills_Filter (C : Clang_Cursor) return Boolean
- is
- (Is_In (Clang_Cursor_Kind_To_Category (C.kind), Category_Filter));
-
- begin
- -- If we are in a case in which we don't have a filter, let's try to use
- -- clang's lexical parent first.
- -- NOTE: The only reason we do that is for potential performance gains,
- -- but their need has not been proven yet. It might be better to have an
- -- unified algorithm
-
- if Category_Filter = Null_Category_Array then
- Parent := Lexical_Parent (Cursor);
- if Parent /= No_Cursor then
- return Clang_Node'(Self.Kernel, Parent, Self.File);
- end if;
- end if;
-
- -- Get the topmost cursor just before translation unit
- loop
- Parent := Semantic_Parent (Cursor);
- exit when Parent = No_Cursor
- or else Parent.kind = CXCursor_TranslationUnit;
- Cursor := Parent;
- end loop;
-
- -- Semantic parent did jump to a non lexical containing cursor
- if not In_Range (Sought => Top_Cursor,
- Containing => Cursor)
- then
- Cursor := Root_Cursor (Self.Tu);
- end if;
-
- -- Now explore down to cursor, and keep the list
- declare
- C1 : constant Array_Type := Cursor & Children_Chain (Cursor);
- C : constant Array_Type
- := (if Category_Filter /= Null_Category_Array
- then Filter (C1, Fullfills_Filter'Access)
- else C1);
- begin
- return (if C = Empty_Array then No_Semantic_Node
- else Clang_Node'(Self.Kernel, C (C'Last), Self.File));
- end;
-
- end Node_At;
-
- ------------
- -- Parent --
- ------------
-
- overriding function Parent
- (Self : Clang_Node) return Semantic_Node'Class
- is
- begin
- return Node_From_Cursor
- (Semantic_Parent (Self.Cursor), Self);
- end Parent;
-
- --------------
- -- Children --
- --------------
-
- overriding function Children
- (Self : Clang_Node)
- return Semantic_Node_Array'Class
- is
- C : constant Cursors_Arrays.Array_Type := Get_Children (Self.Cursor);
- begin
- if Kind (Self.Cursor) = CXCursor_TypedefDecl
- and then C'Length = 1
- and then
- Kind (C (1)) in CXCursor_StructDecl | CXCursor_UnionDecl
- then
- if Spelling (C (1)) = "" then
- return Clang_Node_Array'
- (Cursors_Holders.To_Holder
- (Get_Children (C (1))),
- Self.Kernel, Self.File);
- else
- return Clang_Node_Array'
- (Cursors_Holders.To_Holder (Cursors_Arrays.Empty_Array),
- Self.Kernel, Self.File);
- end if;
- end if;
- return Clang_Node_Array'
- (Cursors_Holders.To_Holder (C),
- Self.Kernel,
- Self.File);
- end Children;
-
- -----------------
- -- First_Child --
- -----------------
-
- overriding function First_Child
- (Self : Clang_Node) return Semantic_Node'Class is
- begin
- return Self.Children.Get (1);
- end First_Child;
-
- ----------
- -- Name --
- ----------
-
- overriding function Name
- (Self : Clang_Node) return GNATCOLL.Symbols.Symbol is
- begin
- if Kind (Self.Cursor) = CXCursor_TranslationUnit then
-
- -- If the cursor is the translation unit, then spelling will be the
- -- full file path. In that case we want only the file name
-
- declare
- Path : constant String := Spelling (Self.Cursor);
- Slash_Index : Natural := Path'Last;
- Dot_Index : Natural := Path'Last;
- use String_Utils;
- begin
- Skip_To_Char (Path, Slash_Index, '/', -1);
- Skip_To_Char (Path, Dot_Index, '.', -1);
- return Self.Kernel.Symbols.Find
- (Path (Slash_Index + 1 .. Dot_Index - 1));
- end;
- else
- return Self.Kernel.Symbols.Find (Spelling (Self.Cursor));
- end if;
- end Name;
-
- -------------
- -- Profile --
- -------------
-
- overriding function Profile
- (Self : Clang_Node;
- Show_Param_Names : Boolean := True) return Symbol
- is
- -- ??? Does libclang supports not showing the parameter names
- pragma Unreferenced (Show_Param_Names);
- K : constant Clang_Cursor_Kind := Kind (Self.Cursor);
- begin
- if Is_Function (K) or else Is_Object_Type (K) or else Is_Type (K) then
- declare
- Profile : constant String := Display_Name (Self.Cursor);
- Name : constant String := GNATCOLL.Symbols.Get (Self.Name).all;
- begin
- if Name'Length < Profile'Length then
- return Self.Kernel.Symbols.Find
- (Profile (Name'Length + 1 .. Profile'Last));
- else
- return Empty_String;
- end if;
- end;
- elsif K in CXCursor_FieldDecl | CXCursor_VarDecl then
- return Self.Kernel.Symbols.Find (Spelling (Get_Type (Self.Cursor)));
- end if;
-
- return Empty_String;
- end Profile;
-
- ----------------
- -- Definition --
- ----------------
-
- overriding function Definition
- (Self : Clang_Node) return Semantic_Node'Class
- is
- begin
- return Node_From_Cursor (Definition (Self.Cursor), Self);
- end Definition;
-
- --------------
- -- Sloc_Def --
- --------------
-
- overriding function Sloc_Def
- (Self : Clang_Node) return Sloc_T is
- begin
- return To_Sloc_T (Location (Self.Cursor));
- end Sloc_Def;
-
- ----------------
- -- Sloc_Start --
- ----------------
-
- overriding function Sloc_Start
- (Self : Clang_Node) return Sloc_T is
- begin
- return To_Sloc_T
- (Range_Start (Extent (Self.Cursor)));
- end Sloc_Start;
-
- --------------
- -- Sloc_End --
- --------------
-
- overriding function Sloc_End
- (Self : Clang_Node) return Sloc_T is
- begin
- return To_Sloc_T
- (Range_End (Extent (Self.Cursor)));
- end Sloc_End;
-
- --------------
- -- Get_Hash --
- --------------
-
- overriding function Get_Hash
- (Self : Clang_Node) return Hash_Type is
- begin
- return Hash (Self.Cursor);
- end Get_Hash;
-
- ----------
- -- File --
- ----------
-
- overriding function File
- (Self : Clang_Node) return GNATCOLL.VFS.Virtual_File is
- begin
- return Self.Ref_File;
- end File;
-
- --------------------
- -- Is_Declaration --
- --------------------
-
- overriding function Is_Declaration
- (Self : Clang_Node) return Boolean is
- begin
- return Self.Category /= Cat_Unknown
- and then (Is_Definition (Self.Cursor));
- end Is_Declaration;
-
- ----------------
- -- Visibility --
- ----------------
-
- overriding function Visibility
- (Self : Clang_Node) return Construct_Visibility is
- pragma Unreferenced (Self);
- begin
- -- TODO: At a later stage figure that out for C++ class members
- return Visibility_Public;
- end Visibility;
-
- ---------------
- -- Unique_Id --
- ---------------
-
- overriding function Unique_Id (Self : Clang_Node) return Symbol is
- begin
- return Self.Kernel.Symbols.Find (USR (Self.Cursor));
- end Unique_Id;
-
- ------------------------
- -- Documentation_Body --
- ------------------------
-
- overriding function Documentation_Body
- (Self : Clang_Node) return String is
- begin
- return To_String (clang_Cursor_getRawCommentText (Self.Cursor));
- end Documentation_Body;
-
- --------------------------
- -- Documentation_Header --
- --------------------------
-
- overriding function Documentation_Header
- (Self : Clang_Node) return String is
- begin
- return To_String (clang_Cursor_getBriefCommentText (Self.Cursor));
- end Documentation_Header;
-
- ----------
- -- Next --
- ----------
-
- overriding procedure Next (It : in out Clang_Tree_Iterator)
- is
- use Clang_Iterator_Lists;
- Vec : constant Cursors_Arrays.Array_Type :=
- Get_Children (Element (It.Current_Cursor));
- Cursor_Before : constant Clang_Iterator_Lists.Cursor :=
- Next (It.Current_Cursor);
- begin
- for Cursor of Vec loop
- It.Elements.Reference.Insert (Cursor_Before, Cursor);
- end loop;
- Next (It.Current_Cursor);
- end Next;
-
- -------------
- -- Element --
- -------------
-
- overriding function Element
- (It : Clang_Tree_Iterator) return Semantic_Node'Class
- is
- use Clang_Iterator_Lists;
- begin
- return (if not Has_Element (It)
- then No_Semantic_Node
- else Clang_Node'(It.Kernel,
- Element (It.Current_Cursor), It.File));
- end Element;
-
- -----------------
- -- Has_Element --
- -----------------
-
- overriding function Has_Element
- (It : Clang_Tree_Iterator) return Boolean
- is
- use Clang_Iterator_Lists;
- Not_Empty_List_Cursor : constant Boolean :=
- It.Current_Cursor /= Clang_Iterator_Lists.No_Element;
- Not_Empty_Clang_Cursor : constant Boolean :=
- Not_Empty_List_Cursor
- and then Element (It.Current_Cursor) /= No_Cursor;
- begin
- return Not_Empty_Clang_Cursor;
- end Has_Element;
-
- ----------
- -- Sort --
- ----------
-
- overriding procedure Sort
- (Self : in out Clang_Node_Array;
- Less_Than : access function (L, R : Semantic_Node'Class) return Boolean)
- is
- function "<" (L, R : Clang_Cursor) return Boolean
- is (Less_Than
- (Semantic_Node'Class (Clang_Node'(Self.Kernel, L, Self.File)),
- Semantic_Node'Class (Clang_Node'(Self.Kernel, R, Self.File))));
-
- procedure Gen_Sort is new Ada.Containers.Generic_Array_Sort
- (Positive, Clang_Cursor, Cursors_Arrays.Array_Type);
-
- begin
- Gen_Sort (Self.Nodes.Reference);
- end Sort;
-
-end Language.Libclang_Tree;
diff --git a/kernel/src/language-libclang_tree.ads b/kernel/src/language-libclang_tree.ads
deleted file mode 100644
index 58520b4d13..0000000000
--- a/kernel/src/language-libclang_tree.ads
+++ /dev/null
@@ -1,216 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2003-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with Ada.Containers; use Ada.Containers;
-with Ada.Containers.Indefinite_Holders;
-with Ada.Containers.Doubly_Linked_Lists;
-
-with clang_c_Index_h; use clang_c_Index_h;
-
-with Language.Abstract_Language_Tree; use Language.Abstract_Language_Tree;
-with Language.Libclang; use Language.Libclang;
-with Language.Tree; use Language.Tree;
-with Libclang.Index; use Libclang.Index;
-
-with GPS.Core_Kernels; use GPS.Core_Kernels;
-
-package Language.Libclang_Tree is
-
- package Clang_Iterator_Lists
- is new Ada.Containers.Doubly_Linked_Lists (Clang_Cursor);
-
- package Clang_Iterator_Lists_Ref
- is new Ada.Containers.Indefinite_Holders
- (Clang_Iterator_Lists.List,
- "=" => Clang_Iterator_Lists."=");
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- type Clang_Tree_Provider is new Semantic_Tree_Provider with record
- Kernel : Core_Kernel;
- end record;
- type Clang_Tree_Provider_Access is access all Clang_Tree_Provider;
-
- type Abstract_Clang_Tree is new Semantic_Tree with record
- Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- end record;
- type Clang_Tree_Access is access all Abstract_Clang_Tree;
-
- function Tu (Self : Abstract_Clang_Tree) return Clang_Translation_Unit
- is
- (Translation_Unit (Self.Kernel, Self.File, Reparse => False));
-
- type Clang_Node is new Semantic_Node with record
- Kernel : Core_Kernel;
- Cursor : Clang_Cursor;
- Ref_File : GNATCOLL.VFS.Virtual_File;
- end record;
- type Clang_Node_Access is access all Clang_Node;
-
- type Clang_Tree_Iterator is new Semantic_Tree_Iterator with record
- Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- Elements : Clang_Iterator_Lists_Ref.Holder;
- Current_Cursor : Clang_Iterator_Lists.Cursor
- := Clang_Iterator_Lists.No_Element;
- Current_Children_Added : Boolean;
- end record;
-
- ------------------------------------
- -- Clang_Tree_Provider primitives --
- ------------------------------------
-
- function Create (K : Core_Kernel) return Semantic_Tree_Provider_Access;
-
- overriding function Get_Tree_For_File
- (Self : in out Clang_Tree_Provider;
- Context : String;
- File : GNATCOLL.VFS.Virtual_File) return Semantic_Tree'Class;
-
- ------------------------------------
- -- Abstract_Clang_Tree primitives --
- ------------------------------------
-
- overriding function Root_Nodes
- (Self : Abstract_Clang_Tree) return Semantic_Node_Array'Class;
-
- overriding function Root_Iterator
- (Self : Abstract_Clang_Tree) return Semantic_Tree_Iterator'Class;
-
- overriding function Node_At
- (Self : Abstract_Clang_Tree; Sloc : Sloc_T;
- Category_Filter : Category_Array := Null_Category_Array)
- return Semantic_Node'Class;
-
- overriding function File
- (Self : Abstract_Clang_Tree) return GNATCOLL.VFS.Virtual_File;
-
- overriding procedure Update (Self : in out Abstract_Clang_Tree);
-
- overriding procedure Update_Async (Self : in out Abstract_Clang_Tree);
-
- overriding function Is_Ready (Self : Abstract_Clang_Tree) return Boolean
- is (Has_Translation_Unit_In_Cache (Self.File));
-
- ---------------------------
- -- Clang_Node primitives --
- ---------------------------
-
- overriding function Category
- (Self : Clang_Node) return Language_Category;
-
- overriding function Parent
- (Self : Clang_Node) return Semantic_Node'Class;
-
- overriding function Children
- (Self : Clang_Node)
- return Semantic_Node_Array'Class;
-
- overriding function First_Child
- (Self : Clang_Node) return Semantic_Node'Class;
-
- overriding function Name
- (Self : Clang_Node) return GNATCOLL.Symbols.Symbol;
-
- overriding function Profile
- (Self : Clang_Node;
- Show_Param_Names : Boolean := True) return GNATCOLL.Symbols.Symbol;
-
- overriding function Is_Valid
- (Self : Clang_Node) return Boolean is (True);
-
- overriding function Definition
- (Self : Clang_Node) return Semantic_Node'Class;
-
- overriding function Sloc_Def
- (Self : Clang_Node) return Sloc_T;
-
- overriding function Sloc_Start
- (Self : Clang_Node) return Sloc_T;
-
- overriding function Sloc_End
- (Self : Clang_Node) return Sloc_T;
-
- overriding function Get_Hash
- (Self : Clang_Node) return Hash_Type;
-
- overriding function File
- (Self : Clang_Node) return GNATCOLL.VFS.Virtual_File;
-
- overriding function Is_Declaration
- (Self : Clang_Node) return Boolean;
-
- overriding function Visibility
- (Self : Clang_Node) return Construct_Visibility;
-
- overriding function Unique_Id
- (Self : Clang_Node) return GNATCOLL.Symbols.Symbol;
-
- overriding function Documentation_Body
- (Self : Clang_Node) return String;
-
- overriding function Documentation_Header
- (Self : Clang_Node) return String;
-
- overriding procedure Next (It : in out Clang_Tree_Iterator);
-
- overriding function Element
- (It : Clang_Tree_Iterator) return Semantic_Node'Class;
-
- overriding function Has_Element
- (It : Clang_Tree_Iterator) return Boolean;
-
- function To_Sloc_T (Arg : CXSourceLocation) return Sloc_T;
-
- function To_Offset_T (Arg : CXSourceLocation) return Offset_T
- is
- (To_Sloc_T (Arg).Index);
-
-private
-
- --------------------------------------------------------------------------
- -- Private definition of Clang_Node_Array and associated primitives --
- --------------------------------------------------------------------------
-
- package Cursors_Holders is new Ada.Containers.Indefinite_Holders
- (Cursors_Arrays.Array_Type, Cursors_Arrays."=");
-
- type Clang_Node_Array is new Semantic_Node_Array with record
- Nodes : Cursors_Holders.Holder;
- -- We're using the holder here to give reference semantics to node,
- -- you can do as many copies of a Clang_Node_Array instance, there
- -- will always be only one children vector
- Kernel : Core_Kernel;
- File : GNATCOLL.VFS.Virtual_File;
- end record;
-
- overriding function Get
- (Self : Clang_Node_Array; Index : Positive) return Semantic_Node'Class
- is
- (Clang_Node'(Self.Kernel, Self.Nodes.Element (Index), Self.File));
-
- overriding function Length (Self : Clang_Node_Array) return Natural is
- (Natural (Self.Nodes.Element'Length));
-
- overriding procedure Sort
- (Self : in out Clang_Node_Array;
- Less_Than : access function (L, R : Semantic_Node'Class) return Boolean);
-
-end Language.Libclang_Tree;
diff --git a/libclang/Makefile b/libclang/Makefile
deleted file mode 100644
index b18ea6f8cc..0000000000
--- a/libclang/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-TMP_GEN_DIR=gen
-CLANG_RELEASE=8.0.0
-CLANG_SRC_DIR=cfe-$(CLANG_RELEASE).src
-CLANG_INCLUDE_DIR=$(shell pwd)/$(CLANG_SRC_DIR)/include
-CLANG_INCLUDE_DIR_C=$(CLANG_INCLUDE_DIR)/clang-c
-DL=wget
-CLANG_SRC_FNAME=$(CLANG_SRC_DIR).tar.xz
-CLANG_SRC_LINK=http://llvm.org/releases/$(CLANG_RELEASE)/$(CLANG_SRC_FNAME)
-
-ifeq ($(wildcard binding/clang.ads),)
-all: clean_imports
-else
-all:
-endif
-
-init: init_gen init_clang_src
-
-init_gen:
- mkdir -p $(TMP_GEN_DIR)
-
-init_clang_src:
- if [ ! -d $(CLANG_SRC_DIR) ]; then $(DL) $(CLANG_SRC_LINK) && tar xvf $(CLANG_SRC_FNAME) && rm $(CLANG_SRC_FNAME); fi
-
-generate_fdump_bindings: init
- cd $(TMP_GEN_DIR) && g++ -I/usr/include/x86_64-linux-gnu -I$(CLANG_INCLUDE_DIR) -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -U__cplusplus -c -D_Bool=bool -fdump-ada-spec $(CLANG_INCLUDE_DIR_C)/*.h
-
-clean_imports: generate_fdump_bindings
- sed -e '/^ \(function\|procedure\) /h;s/External_Name//;Tlabel;g;s/\(function\|procedure\) \([^ ]*\).*/ External_Name => "\2";/;:label;s/Convention => CPP/Convention => C/' -i gen/clang_c_*_h.ads
- sed -e '/with Interfaces.C;/s/^/-- /' -i $(TMP_GEN_DIR)/clang_c_cxerrorcode_h.ads
- sed -e '/with time_h;/s/^/-- /' -e '/return time_h./,+3s/^/-- /' -i $(TMP_GEN_DIR)/clang_c_index_h.ads
- rm $(TMP_GEN_DIR)/*time* $(TMP_GEN_DIR)/*types*
-
-clean:
- rm $(TMP_GEN_DIR) -rf
-
-distclean: clean
- rm $(CLANG_SRC_DIR) -rf
diff --git a/libclang/README b/libclang/README
deleted file mode 100644
index 99cc9662e7..0000000000
--- a/libclang/README
+++ /dev/null
@@ -1,11 +0,0 @@
-This directory is organized the following way:
-
- - gen contains the generated thin binding to the C libclang library
- this should not be checked in but not edited manually
-
- - libclang contains the thick binding to the C libclang library
- this is the binding that should be used by GPS
-
- - the Makefile can be used to regenerate the thin binding
-
- - example contains an exemple program
diff --git a/libclang/example/test_index.adb b/libclang/example/test_index.adb
deleted file mode 100644
index 35fe71bda4..0000000000
--- a/libclang/example/test_index.adb
+++ /dev/null
@@ -1,129 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2014-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
--- Mini example program
--- call with:
--- test_index line column [argument1 .. argumentN]
-
-with Ada.Command_Line; use Ada.Command_Line;
-with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
-
-with GNATCOLL.Utils; use GNATCOLL.Utils;
-with GNATCOLL.VFS; use GNATCOLL.VFS;
-with Libclang.Index; use Libclang.Index;
-with Ada.Text_IO; use Ada.Text_IO;
-with GNAT.Strings;
-with System; use System;
-with System.Address_Image;
-
-----------------
--- Test_Index --
-----------------
-
-procedure Test_Index is
-begin
- if Argument_Count < 3 then
- Put_Line ("Usage : test_index "
- & " ");
- return;
- end if;
-
- declare
- Index : Clang_Index;
- Source_Filename : constant String := Argument (1);
- CL : Unbounded_String_Array (4 .. Argument_Count);
- Line, Column : Natural;
- Source_File : constant GNATCOLL.VFS.Virtual_File :=
- GNATCOLL.VFS.Create (+Source_Filename);
- Content : constant GNAT.Strings.String_Access := Source_File.Read_File;
-
- begin
-
- Index := Create_Index (Exclude_Declarations_From_PCH => False,
- Display_Diagnostics => False);
-
- -- Parse args
-
- Line := Integer'Value (Argument (2));
- Column := Integer'Value (Argument (3));
-
- for J in 4 .. Argument_Count loop
- CL (J) := To_Unbounded_String (Argument (J));
- end loop;
-
- -- Create TU
-
- declare
- TU : Clang_Translation_Unit :=
- Parse_Translation_Unit
- (Index,
- Source_Filename => Source_Filename,
- Command_Line_Args => CL);
-
- Unsaved_Files : constant Unsaved_File_Array :=
- (1 => Create_Unsaved_File
- (Source_Filename,
- Ada.Strings.Unbounded.String_Access (Content)));
-
- Success : Boolean;
- pragma Unreferenced (Success);
- begin
- Success := Reparse_Translation_Unit (TU, Unsaved_Files);
- Put_Line (Content.all);
-
- -- Get completion
-
- declare
- Completion : Clang_Complete_Results :=
- Complete_At (TU,
- Filename => Source_Filename,
- Line => Line,
- Column => Column);
-
- Strings : Completion_Strings;
- pragma Unreferenced (Strings);
- begin
- -- This code is an example of libclang completions
--- for J in 1 .. Num_Results (Completion) loop
--- Strings := Spelling (Nth_Result (Completion, J));
--- end loop;
-
- Dispose (Completion);
- end;
-
- -- Get_Cursor
-
- declare
- Ret : Clang_Cursor;
- begin
- Ret := Cursor_At (TU, Source_File, Line, Column);
-
- Put_Line ("Cursor: " & ASCII.LF
- & " Kind: " & Ret.kind'Img
- & " Data: " & ASCII.LF
- & " " & System.Address_Image (Ret.data (0))
- & " " & System.Address_Image (Ret.data (1))
- & " " & System.Address_Image (Ret.data (2)));
-
- end;
-
- Dispose (TU);
- end;
-
- Dispose (Index);
- end;
-end Test_Index;
diff --git a/libclang/gen/clang_c_buildsystem_h.ads b/libclang/gen/clang_c_buildsystem_h.ads
deleted file mode 100644
index 6a31dca619..0000000000
--- a/libclang/gen/clang_c_buildsystem_h.ads
+++ /dev/null
@@ -1,91 +0,0 @@
-pragma Ada_2012;
-pragma Style_Checks (Off);
-
-with Interfaces.C; use Interfaces.C;
-with Interfaces.C.Extensions;
-with Interfaces.C.Strings;
-with clang_c_CXErrorCode_h;
-with System;
-
-package clang_c_BuildSystem_h is
-
- function clang_getBuildSessionTimestamp return Extensions.unsigned_long_long -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:34
- with Import => True,
- Convention => C,
- External_Name => "clang_getBuildSessionTimestamp";
-
- type CXVirtualFileOverlayImpl is null record; -- incomplete struct
-
- type CXVirtualFileOverlay is access all CXVirtualFileOverlayImpl; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:40
-
- function clang_VirtualFileOverlay_create (options : unsigned) return CXVirtualFileOverlay -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:49
- with Import => True,
- Convention => C,
- External_Name => "clang_VirtualFileOverlay_create";
-
- function clang_VirtualFileOverlay_addFileMapping
- (arg1 : CXVirtualFileOverlay;
- virtualPath : Interfaces.C.Strings.chars_ptr;
- realPath : Interfaces.C.Strings.chars_ptr) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:57
- with Import => True,
- Convention => C,
- External_Name => "clang_VirtualFileOverlay_addFileMapping";
-
- function clang_VirtualFileOverlay_setCaseSensitivity (arg1 : CXVirtualFileOverlay; caseSensitive : int) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:68
- with Import => True,
- Convention => C,
- External_Name => "clang_VirtualFileOverlay_setCaseSensitivity";
-
- function clang_VirtualFileOverlay_writeToBuffer
- (arg1 : CXVirtualFileOverlay;
- options : unsigned;
- out_buffer_ptr : System.Address;
- out_buffer_size : access unsigned) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:81
- with Import => True,
- Convention => C,
- External_Name => "clang_VirtualFileOverlay_writeToBuffer";
-
- procedure clang_free (buffer : System.Address) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:91
- with Import => True,
- Convention => C,
- External_Name => "clang_free";
-
- procedure clang_VirtualFileOverlay_dispose (arg1 : CXVirtualFileOverlay) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:96
- with Import => True,
- Convention => C,
- External_Name => "clang_VirtualFileOverlay_dispose";
-
- type CXModuleMapDescriptorImpl is null record; -- incomplete struct
-
- type CXModuleMapDescriptor is access all CXModuleMapDescriptorImpl; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:101
-
- function clang_ModuleMapDescriptor_create (options : unsigned) return CXModuleMapDescriptor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:110
- with Import => True,
- Convention => C,
- External_Name => "clang_ModuleMapDescriptor_create";
-
- function clang_ModuleMapDescriptor_setFrameworkModuleName (arg1 : CXModuleMapDescriptor; name : Interfaces.C.Strings.chars_ptr) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:117
- with Import => True,
- Convention => C,
- External_Name => "clang_ModuleMapDescriptor_setFrameworkModuleName";
-
- function clang_ModuleMapDescriptor_setUmbrellaHeader (arg1 : CXModuleMapDescriptor; name : Interfaces.C.Strings.chars_ptr) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:125
- with Import => True,
- Convention => C,
- External_Name => "clang_ModuleMapDescriptor_setUmbrellaHeader";
-
- function clang_ModuleMapDescriptor_writeToBuffer
- (arg1 : CXModuleMapDescriptor;
- options : unsigned;
- out_buffer_ptr : System.Address;
- out_buffer_size : access unsigned) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:138
- with Import => True,
- Convention => C,
- External_Name => "clang_ModuleMapDescriptor_writeToBuffer";
-
- procedure clang_ModuleMapDescriptor_dispose (arg1 : CXModuleMapDescriptor) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/BuildSystem.h:145
- with Import => True,
- Convention => C,
- External_Name => "clang_ModuleMapDescriptor_dispose";
-
-end clang_c_BuildSystem_h;
diff --git a/libclang/gen/clang_c_cxcompilationdatabase_h.ads b/libclang/gen/clang_c_cxcompilationdatabase_h.ads
deleted file mode 100644
index 628ec5ea92..0000000000
--- a/libclang/gen/clang_c_cxcompilationdatabase_h.ads
+++ /dev/null
@@ -1,92 +0,0 @@
-pragma Ada_2012;
-pragma Style_Checks (Off);
-
-with Interfaces.C; use Interfaces.C;
-with System;
-with Interfaces.C.Strings;
-with clang_c_CXString_h;
-
-package clang_c_CXCompilationDatabase_h is
-
- type CXCompilationDatabase is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:38
-
- type CXCompileCommands is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:49
-
- type CXCompileCommand is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:54
-
- type CXCompilationDatabase_Error is
- (CXCompilationDatabase_NoError,
- CXCompilationDatabase_CanNotLoadDatabase)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:70
-
- function clang_CompilationDatabase_fromDirectory (BuildDir : Interfaces.C.Strings.chars_ptr; ErrorCode : access CXCompilationDatabase_Error) return CXCompilationDatabase -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:80
- with Import => True,
- Convention => C,
- External_Name => "clang_CompilationDatabase_fromDirectory";
-
- procedure clang_CompilationDatabase_dispose (arg1 : CXCompilationDatabase) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:87
- with Import => True,
- Convention => C,
- External_Name => "clang_CompilationDatabase_dispose";
-
- function clang_CompilationDatabase_getCompileCommands (arg1 : CXCompilationDatabase; CompleteFileName : Interfaces.C.Strings.chars_ptr) return CXCompileCommands -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:94
- with Import => True,
- Convention => C,
- External_Name => "clang_CompilationDatabase_getCompileCommands";
-
- function clang_CompilationDatabase_getAllCompileCommands (arg1 : CXCompilationDatabase) return CXCompileCommands -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:101
- with Import => True,
- Convention => C,
- External_Name => "clang_CompilationDatabase_getAllCompileCommands";
-
- procedure clang_CompileCommands_dispose (arg1 : CXCompileCommands) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:106
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommands_dispose";
-
- function clang_CompileCommands_getSize (arg1 : CXCompileCommands) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:112
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommands_getSize";
-
- function clang_CompileCommands_getCommand (arg1 : CXCompileCommands; I : unsigned) return CXCompileCommand -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:120
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommands_getCommand";
-
- function clang_CompileCommand_getDirectory (arg1 : CXCompileCommand) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:126
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommand_getDirectory";
-
- function clang_CompileCommand_getFilename (arg1 : CXCompileCommand) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:132
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommand_getFilename";
-
- function clang_CompileCommand_getNumArgs (arg1 : CXCompileCommand) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:139
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommand_getNumArgs";
-
- function clang_CompileCommand_getArg (arg1 : CXCompileCommand; I : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:148
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommand_getArg";
-
- function clang_CompileCommand_getNumMappedSources (arg1 : CXCompileCommand) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:154
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommand_getNumMappedSources";
-
- function clang_CompileCommand_getMappedSourcePath (arg1 : CXCompileCommand; I : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:160
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommand_getMappedSourcePath";
-
- function clang_CompileCommand_getMappedSourceContent (arg1 : CXCompileCommand; I : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXCompilationDatabase.h:166
- with Import => True,
- Convention => C,
- External_Name => "clang_CompileCommand_getMappedSourceContent";
-
-end clang_c_CXCompilationDatabase_h;
diff --git a/libclang/gen/clang_c_cxerrorcode_h.ads b/libclang/gen/clang_c_cxerrorcode_h.ads
deleted file mode 100644
index 8fa2e743e8..0000000000
--- a/libclang/gen/clang_c_cxerrorcode_h.ads
+++ /dev/null
@@ -1,16 +0,0 @@
-pragma Ada_2012;
-pragma Style_Checks (Off);
-
--- with Interfaces.C; use Interfaces.C;
-
-package clang_c_CXErrorCode_h is
-
- type CXErrorCode is
- (CXError_Success,
- CXError_Failure,
- CXError_Crashed,
- CXError_InvalidArguments,
- CXError_ASTReadError)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXErrorCode.h:29
-
-end clang_c_CXErrorCode_h;
diff --git a/libclang/gen/clang_c_cxstring_h.ads b/libclang/gen/clang_c_cxstring_h.ads
deleted file mode 100644
index e3d6738027..0000000000
--- a/libclang/gen/clang_c_cxstring_h.ads
+++ /dev/null
@@ -1,41 +0,0 @@
-pragma Ada_2012;
-pragma Style_Checks (Off);
-
-with Interfaces.C; use Interfaces.C;
-with System;
-with Interfaces.C.Strings;
-
-package clang_c_CXString_h is
-
- -- skipped anonymous struct anon_1
-
- type CXString is record
- data : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:39
- private_flags : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:40
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:41
-
- -- skipped anonymous struct anon_2
-
- type CXStringSet is record
- Strings : access CXString; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:44
- Count : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:45
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:46
-
- function clang_getCString (string : CXString) return Interfaces.C.Strings.chars_ptr -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:51
- with Import => True,
- Convention => C,
- External_Name => "clang_getCString";
-
- procedure clang_disposeString (string : CXString) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:56
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeString";
-
- procedure clang_disposeStringSet (set : access CXStringSet) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/CXString.h:61
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeStringSet";
-
-end clang_c_CXString_h;
diff --git a/libclang/gen/clang_c_documentation_h.ads b/libclang/gen/clang_c_documentation_h.ads
deleted file mode 100644
index 434eef701c..0000000000
--- a/libclang/gen/clang_c_documentation_h.ads
+++ /dev/null
@@ -1,218 +0,0 @@
-pragma Ada_2012;
-pragma Style_Checks (Off);
-
-with Interfaces.C; use Interfaces.C;
-with System;
-with clang_c_Index_h;
-with clang_c_CXString_h;
-
-package clang_c_Documentation_h is
-
- -- skipped anonymous struct anon_44
-
- type CXComment is record
- ASTNode : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:38
- TranslationUnit : clang_c_Index_h.CXTranslationUnit; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:39
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:40
-
- function clang_Cursor_getParsedComment (C : clang_c_Index_h.CXCursor) return CXComment -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:47
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getParsedComment";
-
- type CXCommentKind is
- (CXComment_Null,
- CXComment_Text,
- CXComment_InlineCommand,
- CXComment_HTMLStartTag,
- CXComment_HTMLEndTag,
- CXComment_Paragraph,
- CXComment_BlockCommand,
- CXComment_ParamCommand,
- CXComment_TParamCommand,
- CXComment_VerbatimBlockCommand,
- CXComment_VerbatimBlockLine,
- CXComment_VerbatimLine,
- CXComment_FullComment)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:54
-
- type CXCommentInlineCommandRenderKind is
- (CXCommentInlineCommandRenderKind_Normal,
- CXCommentInlineCommandRenderKind_Bold,
- CXCommentInlineCommandRenderKind_Monospaced,
- CXCommentInlineCommandRenderKind_Emphasized)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:165
-
- type CXCommentParamPassDirection is
- (CXCommentParamPassDirection_In,
- CXCommentParamPassDirection_Out,
- CXCommentParamPassDirection_InOut)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:191
-
- function clang_Comment_getKind (Comment : CXComment) return CXCommentKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:213
- with Import => True,
- Convention => C,
- External_Name => "clang_Comment_getKind";
-
- function clang_Comment_getNumChildren (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:220
- with Import => True,
- Convention => C,
- External_Name => "clang_Comment_getNumChildren";
-
- function clang_Comment_getChild (Comment : CXComment; ChildIdx : unsigned) return CXComment -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:230
- with Import => True,
- Convention => C,
- External_Name => "clang_Comment_getChild";
-
- function clang_Comment_isWhitespace (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:241
- with Import => True,
- Convention => C,
- External_Name => "clang_Comment_isWhitespace";
-
- function clang_InlineContentComment_hasTrailingNewline (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:249
- with Import => True,
- Convention => C,
- External_Name => "clang_InlineContentComment_hasTrailingNewline";
-
- function clang_TextComment_getText (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:256
- with Import => True,
- Convention => C,
- External_Name => "clang_TextComment_getText";
-
- function clang_InlineCommandComment_getCommandName (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:264
- with Import => True,
- Convention => C,
- External_Name => "clang_InlineCommandComment_getCommandName";
-
- function clang_InlineCommandComment_getRenderKind (Comment : CXComment) return CXCommentInlineCommandRenderKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:273
- with Import => True,
- Convention => C,
- External_Name => "clang_InlineCommandComment_getRenderKind";
-
- function clang_InlineCommandComment_getNumArgs (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:281
- with Import => True,
- Convention => C,
- External_Name => "clang_InlineCommandComment_getNumArgs";
-
- function clang_InlineCommandComment_getArgText (Comment : CXComment; ArgIdx : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:291
- with Import => True,
- Convention => C,
- External_Name => "clang_InlineCommandComment_getArgText";
-
- function clang_HTMLTagComment_getTagName (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:300
- with Import => True,
- Convention => C,
- External_Name => "clang_HTMLTagComment_getTagName";
-
- function clang_HTMLStartTagComment_isSelfClosing (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:308
- with Import => True,
- Convention => C,
- External_Name => "clang_HTMLStartTagComment_isSelfClosing";
-
- function clang_HTMLStartTag_getNumAttrs (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:315
- with Import => True,
- Convention => C,
- External_Name => "clang_HTMLStartTag_getNumAttrs";
-
- function clang_HTMLStartTag_getAttrName (Comment : CXComment; AttrIdx : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:325
- with Import => True,
- Convention => C,
- External_Name => "clang_HTMLStartTag_getAttrName";
-
- function clang_HTMLStartTag_getAttrValue (Comment : CXComment; AttrIdx : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:335
- with Import => True,
- Convention => C,
- External_Name => "clang_HTMLStartTag_getAttrValue";
-
- function clang_BlockCommandComment_getCommandName (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:343
- with Import => True,
- Convention => C,
- External_Name => "clang_BlockCommandComment_getCommandName";
-
- function clang_BlockCommandComment_getNumArgs (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:351
- with Import => True,
- Convention => C,
- External_Name => "clang_BlockCommandComment_getNumArgs";
-
- function clang_BlockCommandComment_getArgText (Comment : CXComment; ArgIdx : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:361
- with Import => True,
- Convention => C,
- External_Name => "clang_BlockCommandComment_getArgText";
-
- function clang_BlockCommandComment_getParagraph (Comment : CXComment) return CXComment -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:371
- with Import => True,
- Convention => C,
- External_Name => "clang_BlockCommandComment_getParagraph";
-
- function clang_ParamCommandComment_getParamName (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:379
- with Import => True,
- Convention => C,
- External_Name => "clang_ParamCommandComment_getParamName";
-
- function clang_ParamCommandComment_isParamIndexValid (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:389
- with Import => True,
- Convention => C,
- External_Name => "clang_ParamCommandComment_isParamIndexValid";
-
- function clang_ParamCommandComment_getParamIndex (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:397
- with Import => True,
- Convention => C,
- External_Name => "clang_ParamCommandComment_getParamIndex";
-
- function clang_ParamCommandComment_isDirectionExplicit (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:406
- with Import => True,
- Convention => C,
- External_Name => "clang_ParamCommandComment_isDirectionExplicit";
-
- function clang_ParamCommandComment_getDirection (Comment : CXComment) return CXCommentParamPassDirection -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:414
- with Import => True,
- Convention => C,
- External_Name => "clang_ParamCommandComment_getDirection";
-
- function clang_TParamCommandComment_getParamName (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:423
- with Import => True,
- Convention => C,
- External_Name => "clang_TParamCommandComment_getParamName";
-
- function clang_TParamCommandComment_isParamPositionValid (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:435
- with Import => True,
- Convention => C,
- External_Name => "clang_TParamCommandComment_isParamPositionValid";
-
- function clang_TParamCommandComment_getDepth (Comment : CXComment) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:451
- with Import => True,
- Convention => C,
- External_Name => "clang_TParamCommandComment_getDepth";
-
- function clang_TParamCommandComment_getIndex (Comment : CXComment; Depth : unsigned) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:472
- with Import => True,
- Convention => C,
- External_Name => "clang_TParamCommandComment_getIndex";
-
- function clang_VerbatimBlockLineComment_getText (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:480
- with Import => True,
- Convention => C,
- External_Name => "clang_VerbatimBlockLineComment_getText";
-
- function clang_VerbatimLineComment_getText (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:487
- with Import => True,
- Convention => C,
- External_Name => "clang_VerbatimLineComment_getText";
-
- function clang_HTMLTagComment_getAsString (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:497
- with Import => True,
- Convention => C,
- External_Name => "clang_HTMLTagComment_getAsString";
-
- function clang_FullComment_getAsHTML (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:530
- with Import => True,
- Convention => C,
- External_Name => "clang_FullComment_getAsHTML";
-
- function clang_FullComment_getAsXML (Comment : CXComment) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Documentation.h:542
- with Import => True,
- Convention => C,
- External_Name => "clang_FullComment_getAsXML";
-
-end clang_c_Documentation_h;
diff --git a/libclang/gen/clang_c_index_h.ads b/libclang/gen/clang_c_index_h.ads
deleted file mode 100644
index ce7893a146..0000000000
--- a/libclang/gen/clang_c_index_h.ads
+++ /dev/null
@@ -1,2986 +0,0 @@
-pragma Ada_2012;
-pragma Style_Checks (Off);
-
-with Interfaces.C; use Interfaces.C;
-with System;
-with Interfaces.C.Strings;
-with clang_c_CXString_h;
--- with time_h;
-with Interfaces.C.Extensions;
-with stddef_h;
-with clang_c_CXErrorCode_h;
-
-package clang_c_Index_h is
-
- Version : String (1 .. 10) := "8.0.0 ";
- -- A 10-byte string identifying the version of the API. Used to make
- -- an unique identifier in our on-disk cache. This is intentionally
- -- placed in this automatically generated file to force us to update
- -- it with each regeneration.
-
- CINDEX_VERSION_MAJOR : constant := 0; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:34
- CINDEX_VERSION_MINOR : constant := 50; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:35
- -- arg-macro: function CINDEX_VERSION_ENCODE (major, minor)
- -- return ((major) * 10000) + ((minor) * 1);
- -- unsupported macro: CINDEX_VERSION CINDEX_VERSION_ENCODE( CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR )
- -- unsupported macro: CINDEX_VERSION_STRINGIZE_(major,minor) #major"."#minor
- -- arg-macro: procedure CINDEX_VERSION_STRINGIZE (major, minor)
- -- CINDEX_VERSION_STRINGIZE_(major, minor)
- -- unsupported macro: CINDEX_VERSION_STRING CINDEX_VERSION_STRINGIZE( CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR)
-
- type CXIndex is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:81
-
- type CXTargetInfoImpl is null record; -- incomplete struct
-
- type CXTargetInfo is access all CXTargetInfoImpl; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:87
-
- type CXTranslationUnitImpl is null record; -- incomplete struct
-
- type CXTranslationUnit is access all CXTranslationUnitImpl; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:92
-
- type CXClientData is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:98
-
- type CXUnsavedFile is record
- Filename : Interfaces.C.Strings.chars_ptr; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:113
- Contents : Interfaces.C.Strings.chars_ptr; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:118
- Length : aliased unsigned_long; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:123
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:107
-
- type CXAvailabilityKind is
- (CXAvailability_Available,
- CXAvailability_Deprecated,
- CXAvailability_NotAvailable,
- CXAvailability_NotAccessible)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:131
-
- type CXVersion is record
- Major : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:160
- Minor : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:166
- Subminor : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:172
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:155
-
- type CXCursor_ExceptionSpecificationKind is
- (CXCursor_ExceptionSpecificationKind_None,
- CXCursor_ExceptionSpecificationKind_DynamicNone,
- CXCursor_ExceptionSpecificationKind_Dynamic,
- CXCursor_ExceptionSpecificationKind_MSAny,
- CXCursor_ExceptionSpecificationKind_BasicNoexcept,
- CXCursor_ExceptionSpecificationKind_ComputedNoexcept,
- CXCursor_ExceptionSpecificationKind_Unevaluated,
- CXCursor_ExceptionSpecificationKind_Uninstantiated,
- CXCursor_ExceptionSpecificationKind_Unparsed)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:180
-
- function clang_createIndex (excludeDeclarationsFromPCH : int; displayDiagnostics : int) return CXIndex -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:267
- with Import => True,
- Convention => C,
- External_Name => "clang_createIndex";
-
- procedure clang_disposeIndex (index : CXIndex) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:276
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeIndex";
-
- type CXGlobalOptFlags is
- (CXGlobalOpt_None,
- CXGlobalOpt_ThreadBackgroundPriorityForIndexing,
- CXGlobalOpt_ThreadBackgroundPriorityForEditing,
- CXGlobalOpt_ThreadBackgroundPriorityForAll)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:310
-
- procedure clang_CXIndex_setGlobalOptions (arg1 : CXIndex; options : unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:325
- with Import => True,
- Convention => C,
- External_Name => "clang_CXIndex_setGlobalOptions";
-
- function clang_CXIndex_getGlobalOptions (arg1 : CXIndex) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:333
- with Import => True,
- Convention => C,
- External_Name => "clang_CXIndex_getGlobalOptions";
-
- procedure clang_CXIndex_setInvocationEmissionPathOption (arg1 : CXIndex; Path : Interfaces.C.Strings.chars_ptr) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:343
- with Import => True,
- Convention => C,
- External_Name => "clang_CXIndex_setInvocationEmissionPathOption";
-
- type CXFile is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:354
-
- function clang_getFileName (SFile : CXFile) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:359
- with Import => True,
- Convention => C,
- External_Name => "clang_getFileName";
-
--- function clang_getFileTime (SFile : CXFile) return time_h.time_t -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:364
--- with Import => True,
--- Convention => C,
--- External_Name => "clang_getFileTime";
-
- -- skipped anonymous struct anon_4
-
- type CXFileUniqueID_data_array is array (0 .. 2) of aliased Extensions.unsigned_long_long;
- type CXFileUniqueID is record
- data : aliased CXFileUniqueID_data_array; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:371
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:372
-
- function clang_getFileUniqueID (file : CXFile; outID : access CXFileUniqueID) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:382
- with Import => True,
- Convention => C,
- External_Name => "clang_getFileUniqueID";
-
- function clang_isFileMultipleIncludeGuarded (tu : CXTranslationUnit; file : CXFile) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:390
- with Import => True,
- Convention => C,
- External_Name => "clang_isFileMultipleIncludeGuarded";
-
- function clang_getFile (tu : CXTranslationUnit; file_name : Interfaces.C.Strings.chars_ptr) return CXFile -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:402
- with Import => True,
- Convention => C,
- External_Name => "clang_getFile";
-
- function clang_getFileContents
- (tu : CXTranslationUnit;
- file : CXFile;
- size : access stddef_h.size_t) return Interfaces.C.Strings.chars_ptr -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:417
- with Import => True,
- Convention => C,
- External_Name => "clang_getFileContents";
-
- function clang_File_isEqual (file1 : CXFile; file2 : CXFile) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:424
- with Import => True,
- Convention => C,
- External_Name => "clang_File_isEqual";
-
- function clang_File_tryGetRealPathName (file : CXFile) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:431
- with Import => True,
- Convention => C,
- External_Name => "clang_File_tryGetRealPathName";
-
- -- skipped anonymous struct anon_5
-
- type CXSourceLocation_ptr_data_array is array (0 .. 1) of System.Address;
- type CXSourceLocation is record
- ptr_data : CXSourceLocation_ptr_data_array; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:458
- int_data : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:459
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:460
-
- -- skipped anonymous struct anon_6
-
- type CXSourceRange_ptr_data_array is array (0 .. 1) of System.Address;
- type CXSourceRange is record
- ptr_data : CXSourceRange_ptr_data_array; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:469
- begin_int_data : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:470
- end_int_data : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:471
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:472
-
- function clang_getNullLocation return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:477
- with Import => True,
- Convention => C,
- External_Name => "clang_getNullLocation";
-
- function clang_equalLocations (loc1 : CXSourceLocation; loc2 : CXSourceLocation) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:487
- with Import => True,
- Convention => C,
- External_Name => "clang_equalLocations";
-
- function clang_getLocation
- (tu : CXTranslationUnit;
- file : CXFile;
- line : unsigned;
- column : unsigned) return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:494
- with Import => True,
- Convention => C,
- External_Name => "clang_getLocation";
-
- function clang_getLocationForOffset
- (tu : CXTranslationUnit;
- file : CXFile;
- offset : unsigned) return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:502
- with Import => True,
- Convention => C,
- External_Name => "clang_getLocationForOffset";
-
- function clang_Location_isInSystemHeader (location : CXSourceLocation) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:509
- with Import => True,
- Convention => C,
- External_Name => "clang_Location_isInSystemHeader";
-
- function clang_Location_isFromMainFile (location : CXSourceLocation) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:515
- with Import => True,
- Convention => C,
- External_Name => "clang_Location_isFromMainFile";
-
- function clang_getNullRange return CXSourceRange -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:520
- with Import => True,
- Convention => C,
- External_Name => "clang_getNullRange";
-
- function clang_getRange (c_begin : CXSourceLocation; c_end : CXSourceLocation) return CXSourceRange -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:526
- with Import => True,
- Convention => C,
- External_Name => "clang_getRange";
-
- function clang_equalRanges (range1 : CXSourceRange; range2 : CXSourceRange) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:534
- with Import => True,
- Convention => C,
- External_Name => "clang_equalRanges";
-
- function clang_Range_isNull (c_range : CXSourceRange) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:540
- with Import => True,
- Convention => C,
- External_Name => "clang_Range_isNull";
-
- procedure clang_getExpansionLocation
- (location : CXSourceLocation;
- file : System.Address;
- line : access unsigned;
- column : access unsigned;
- offset : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:564
- with Import => True,
- Convention => C,
- External_Name => "clang_getExpansionLocation";
-
- procedure clang_getPresumedLocation
- (location : CXSourceLocation;
- filename : access clang_c_CXString_h.CXString;
- line : access unsigned;
- column : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:610
- with Import => True,
- Convention => C,
- External_Name => "clang_getPresumedLocation";
-
- procedure clang_getInstantiationLocation
- (location : CXSourceLocation;
- file : System.Address;
- line : access unsigned;
- column : access unsigned;
- offset : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:623
- with Import => True,
- Convention => C,
- External_Name => "clang_getInstantiationLocation";
-
- procedure clang_getSpellingLocation
- (location : CXSourceLocation;
- file : System.Address;
- line : access unsigned;
- column : access unsigned;
- offset : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:651
- with Import => True,
- Convention => C,
- External_Name => "clang_getSpellingLocation";
-
- procedure clang_getFileLocation
- (location : CXSourceLocation;
- file : System.Address;
- line : access unsigned;
- column : access unsigned;
- offset : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:680
- with Import => True,
- Convention => C,
- External_Name => "clang_getFileLocation";
-
- function clang_getRangeStart (c_range : CXSourceRange) return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:690
- with Import => True,
- Convention => C,
- External_Name => "clang_getRangeStart";
-
- function clang_getRangeEnd (c_range : CXSourceRange) return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:696
- with Import => True,
- Convention => C,
- External_Name => "clang_getRangeEnd";
-
- -- skipped anonymous struct anon_7
-
- type CXSourceRangeList is record
- count : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:703
- ranges : access CXSourceRange; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:707
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:708
-
- function clang_getSkippedRanges (tu : CXTranslationUnit; file : CXFile) return access CXSourceRangeList -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:716
- with Import => True,
- Convention => C,
- External_Name => "clang_getSkippedRanges";
-
- function clang_getAllSkippedRanges (tu : CXTranslationUnit) return access CXSourceRangeList -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:726
- with Import => True,
- Convention => C,
- External_Name => "clang_getAllSkippedRanges";
-
- procedure clang_disposeSourceRangeList (ranges : access CXSourceRangeList) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:731
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeSourceRangeList";
-
- type CXDiagnosticSeverity is
- (CXDiagnostic_Ignored,
- CXDiagnostic_Note,
- CXDiagnostic_Warning,
- CXDiagnostic_Error,
- CXDiagnostic_Fatal)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:746
-
- type CXDiagnostic is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:782
-
- type CXDiagnosticSet is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:787
-
- function clang_getNumDiagnosticsInSet (Diags : CXDiagnosticSet) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:792
- with Import => True,
- Convention => C,
- External_Name => "clang_getNumDiagnosticsInSet";
-
- function clang_getDiagnosticInSet (Diags : CXDiagnosticSet; Index : unsigned) return CXDiagnostic -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:803
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticInSet";
-
- type CXLoadDiag_Error is
- (CXLoadDiag_None,
- CXLoadDiag_Unknown,
- CXLoadDiag_CannotLoad,
- CXLoadDiag_InvalidFile)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:810
-
- function clang_loadDiagnostics
- (file : Interfaces.C.Strings.chars_ptr;
- error : access CXLoadDiag_Error;
- errorString : access clang_c_CXString_h.CXString) return CXDiagnosticSet -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:848
- with Import => True,
- Convention => C,
- External_Name => "clang_loadDiagnostics";
-
- procedure clang_disposeDiagnosticSet (Diags : CXDiagnosticSet) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:855
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeDiagnosticSet";
-
- function clang_getChildDiagnostics (D : CXDiagnostic) return CXDiagnosticSet -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:863
- with Import => True,
- Convention => C,
- External_Name => "clang_getChildDiagnostics";
-
- function clang_getNumDiagnostics (Unit : CXTranslationUnit) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:869
- with Import => True,
- Convention => C,
- External_Name => "clang_getNumDiagnostics";
-
- function clang_getDiagnostic (Unit : CXTranslationUnit; Index : unsigned) return CXDiagnostic -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:880
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnostic";
-
- function clang_getDiagnosticSetFromTU (Unit : CXTranslationUnit) return CXDiagnosticSet -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:890
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticSetFromTU";
-
- procedure clang_disposeDiagnostic (Diagnostic : CXDiagnostic) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:895
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeDiagnostic";
-
- subtype CXDiagnosticDisplayOptions is unsigned;
- CXDiagnostic_DisplaySourceLocation : constant unsigned := 1;
- CXDiagnostic_DisplayColumn : constant unsigned := 2;
- CXDiagnostic_DisplaySourceRanges : constant unsigned := 4;
- CXDiagnostic_DisplayOption : constant unsigned := 8;
- CXDiagnostic_DisplayCategoryId : constant unsigned := 16;
- CXDiagnostic_DisplayCategoryName : constant unsigned := 32; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:903
-
- function clang_formatDiagnostic (Diagnostic : CXDiagnostic; Options : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:980
- with Import => True,
- Convention => C,
- External_Name => "clang_formatDiagnostic";
-
- function clang_defaultDiagnosticDisplayOptions return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:990
- with Import => True,
- Convention => C,
- External_Name => "clang_defaultDiagnosticDisplayOptions";
-
- function clang_getDiagnosticSeverity (arg1 : CXDiagnostic) return CXDiagnosticSeverity -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:996
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticSeverity";
-
- function clang_getDiagnosticLocation (arg1 : CXDiagnostic) return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1004
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticLocation";
-
- function clang_getDiagnosticSpelling (arg1 : CXDiagnostic) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1009
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticSpelling";
-
- function clang_getDiagnosticOption (Diag : CXDiagnostic; Disable : access clang_c_CXString_h.CXString) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1023
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticOption";
-
- function clang_getDiagnosticCategory (arg1 : CXDiagnostic) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1036
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticCategory";
-
- function clang_getDiagnosticCategoryName (Category : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1049
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticCategoryName";
-
- function clang_getDiagnosticCategoryText (arg1 : CXDiagnostic) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1056
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticCategoryText";
-
- function clang_getDiagnosticNumRanges (arg1 : CXDiagnostic) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1062
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticNumRanges";
-
- function clang_getDiagnosticRange (Diagnostic : CXDiagnostic; c_Range : unsigned) return CXSourceRange -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1077
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticRange";
-
- function clang_getDiagnosticNumFixIts (Diagnostic : CXDiagnostic) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1084
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticNumFixIts";
-
- function clang_getDiagnosticFixIt
- (Diagnostic : CXDiagnostic;
- FixIt : unsigned;
- ReplacementRange : access CXSourceRange) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1111
- with Import => True,
- Convention => C,
- External_Name => "clang_getDiagnosticFixIt";
-
- function clang_getTranslationUnitSpelling (CTUnit : CXTranslationUnit) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1133
- with Import => True,
- Convention => C,
- External_Name => "clang_getTranslationUnitSpelling";
-
- function clang_createTranslationUnitFromSourceFile
- (CIdx : CXIndex;
- source_filename : Interfaces.C.Strings.chars_ptr;
- num_clang_command_line_args : int;
- clang_command_line_args : System.Address;
- num_unsaved_files : unsigned;
- unsaved_files : access CXUnsavedFile) return CXTranslationUnit -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1175
- with Import => True,
- Convention => C,
- External_Name => "clang_createTranslationUnitFromSourceFile";
-
- function clang_createTranslationUnit (CIdx : CXIndex; ast_filename : Interfaces.C.Strings.chars_ptr) return CXTranslationUnit -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1189
- with Import => True,
- Convention => C,
- External_Name => "clang_createTranslationUnit";
-
- function clang_createTranslationUnit2
- (CIdx : CXIndex;
- ast_filename : Interfaces.C.Strings.chars_ptr;
- out_TU : System.Address) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1201
- with Import => True,
- Convention => C,
- External_Name => "clang_createTranslationUnit2";
-
- subtype CXTranslationUnit_Flags is unsigned;
- CXTranslationUnit_None : constant unsigned := 0;
- CXTranslationUnit_DetailedPreprocessingRecord : constant unsigned := 1;
- CXTranslationUnit_Incomplete : constant unsigned := 2;
- CXTranslationUnit_PrecompiledPreamble : constant unsigned := 4;
- CXTranslationUnit_CacheCompletionResults : constant unsigned := 8;
- CXTranslationUnit_ForSerialization : constant unsigned := 16;
- CXTranslationUnit_CXXChainedPCH : constant unsigned := 32;
- CXTranslationUnit_SkipFunctionBodies : constant unsigned := 64;
- CXTranslationUnit_IncludeBriefCommentsInCodeCompletion : constant unsigned := 128;
- CXTranslationUnit_CreatePreambleOnFirstParse : constant unsigned := 256;
- CXTranslationUnit_KeepGoing : constant unsigned := 512;
- CXTranslationUnit_SingleFileParse : constant unsigned := 1024;
- CXTranslationUnit_LimitSkipFunctionBodiesToPreamble : constant unsigned := 2048;
- CXTranslationUnit_IncludeAttributedTypes : constant unsigned := 4096;
- CXTranslationUnit_VisitImplicitAttributes : constant unsigned := 8192; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1213
-
- function clang_defaultEditingTranslationUnitOptions return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1359
- with Import => True,
- Convention => C,
- External_Name => "clang_defaultEditingTranslationUnitOptions";
-
- function clang_parseTranslationUnit
- (CIdx : CXIndex;
- source_filename : Interfaces.C.Strings.chars_ptr;
- command_line_args : System.Address;
- num_command_line_args : int;
- unsaved_files : access CXUnsavedFile;
- num_unsaved_files : unsigned;
- options : unsigned) return CXTranslationUnit -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1368
- with Import => True,
- Convention => C,
- External_Name => "clang_parseTranslationUnit";
-
- function clang_parseTranslationUnit2
- (CIdx : CXIndex;
- source_filename : Interfaces.C.Strings.chars_ptr;
- command_line_args : System.Address;
- num_command_line_args : int;
- unsaved_files : access CXUnsavedFile;
- num_unsaved_files : unsigned;
- options : unsigned;
- out_TU : System.Address) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1421
- with Import => True,
- Convention => C,
- External_Name => "clang_parseTranslationUnit2";
-
- function clang_parseTranslationUnit2FullArgv
- (CIdx : CXIndex;
- source_filename : Interfaces.C.Strings.chars_ptr;
- command_line_args : System.Address;
- num_command_line_args : int;
- unsaved_files : access CXUnsavedFile;
- num_unsaved_files : unsigned;
- options : unsigned;
- out_TU : System.Address) return clang_c_CXErrorCode_h.CXErrorCode -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1435
- with Import => True,
- Convention => C,
- External_Name => "clang_parseTranslationUnit2FullArgv";
-
- type CXSaveTranslationUnit_Flags is
- (CXSaveTranslationUnit_None)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1448
-
- function clang_defaultSaveOptions (TU : CXTranslationUnit) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1464
- with Import => True,
- Convention => C,
- External_Name => "clang_defaultSaveOptions";
-
- type CXSaveError is
- (CXSaveError_None,
- CXSaveError_Unknown,
- CXSaveError_TranslationErrors,
- CXSaveError_InvalidTU)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1470
-
- function clang_saveTranslationUnit
- (TU : CXTranslationUnit;
- FileName : Interfaces.C.Strings.chars_ptr;
- options : unsigned) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1524
- with Import => True,
- Convention => C,
- External_Name => "clang_saveTranslationUnit";
-
- function clang_suspendTranslationUnit (arg1 : CXTranslationUnit) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1535
- with Import => True,
- Convention => C,
- External_Name => "clang_suspendTranslationUnit";
-
- procedure clang_disposeTranslationUnit (arg1 : CXTranslationUnit) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1540
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeTranslationUnit";
-
- type CXReparse_Flags is
- (CXReparse_None)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1549
-
- function clang_defaultReparseOptions (TU : CXTranslationUnit) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1566
- with Import => True,
- Convention => C,
- External_Name => "clang_defaultReparseOptions";
-
- function clang_reparseTranslationUnit
- (TU : CXTranslationUnit;
- num_unsaved_files : unsigned;
- unsaved_files : access CXUnsavedFile;
- options : unsigned) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1607
- with Import => True,
- Convention => C,
- External_Name => "clang_reparseTranslationUnit";
-
- subtype CXTUResourceUsageKind is unsigned;
- CXTUResourceUsage_AST : constant unsigned := 1;
- CXTUResourceUsage_Identifiers : constant unsigned := 2;
- CXTUResourceUsage_Selectors : constant unsigned := 3;
- CXTUResourceUsage_GlobalCompletionResults : constant unsigned := 4;
- CXTUResourceUsage_SourceManagerContentCache : constant unsigned := 5;
- CXTUResourceUsage_AST_SideTables : constant unsigned := 6;
- CXTUResourceUsage_SourceManager_Membuffer_Malloc : constant unsigned := 7;
- CXTUResourceUsage_SourceManager_Membuffer_MMap : constant unsigned := 8;
- CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc : constant unsigned := 9;
- CXTUResourceUsage_ExternalASTSource_Membuffer_MMap : constant unsigned := 10;
- CXTUResourceUsage_Preprocessor : constant unsigned := 11;
- CXTUResourceUsage_PreprocessingRecord : constant unsigned := 12;
- CXTUResourceUsage_SourceManager_DataStructures : constant unsigned := 13;
- CXTUResourceUsage_Preprocessor_HeaderSearch : constant unsigned := 14;
- CXTUResourceUsage_MEMORY_IN_BYTES_BEGIN : constant unsigned := 1;
- CXTUResourceUsage_MEMORY_IN_BYTES_END : constant unsigned := 14;
- CXTUResourceUsage_First : constant unsigned := 1;
- CXTUResourceUsage_Last : constant unsigned := 14; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1615
-
- function clang_getTUResourceUsageName (kind : CXTUResourceUsageKind) return Interfaces.C.Strings.chars_ptr -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1643
- with Import => True,
- Convention => C,
- External_Name => "clang_getTUResourceUsageName";
-
- type CXTUResourceUsageEntry is record
- kind : aliased CXTUResourceUsageKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1647
- amount : aliased unsigned_long; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1650
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1645
-
- type CXTUResourceUsage is record
- data : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1658
- numEntries : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1661
- entries : access CXTUResourceUsageEntry; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1665
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1656
-
- function clang_getCXTUResourceUsage (TU : CXTranslationUnit) return CXTUResourceUsage -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1673
- with Import => True,
- Convention => C,
- External_Name => "clang_getCXTUResourceUsage";
-
- procedure clang_disposeCXTUResourceUsage (usage : CXTUResourceUsage) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1675
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeCXTUResourceUsage";
-
- function clang_getTranslationUnitTargetInfo (CTUnit : CXTranslationUnit) return CXTargetInfo -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1683
- with Import => True,
- Convention => C,
- External_Name => "clang_getTranslationUnitTargetInfo";
-
- procedure clang_TargetInfo_dispose (Info : CXTargetInfo) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1689
- with Import => True,
- Convention => C,
- External_Name => "clang_TargetInfo_dispose";
-
- function clang_TargetInfo_getTriple (Info : CXTargetInfo) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1697
- with Import => True,
- Convention => C,
- External_Name => "clang_TargetInfo_getTriple";
-
- function clang_TargetInfo_getPointerWidth (Info : CXTargetInfo) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1705
- with Import => True,
- Convention => C,
- External_Name => "clang_TargetInfo_getPointerWidth";
-
- subtype CXCursorKind is unsigned;
- CXCursor_UnexposedDecl : constant unsigned := 1;
- CXCursor_StructDecl : constant unsigned := 2;
- CXCursor_UnionDecl : constant unsigned := 3;
- CXCursor_ClassDecl : constant unsigned := 4;
- CXCursor_EnumDecl : constant unsigned := 5;
- CXCursor_FieldDecl : constant unsigned := 6;
- CXCursor_EnumConstantDecl : constant unsigned := 7;
- CXCursor_FunctionDecl : constant unsigned := 8;
- CXCursor_VarDecl : constant unsigned := 9;
- CXCursor_ParmDecl : constant unsigned := 10;
- CXCursor_ObjCInterfaceDecl : constant unsigned := 11;
- CXCursor_ObjCCategoryDecl : constant unsigned := 12;
- CXCursor_ObjCProtocolDecl : constant unsigned := 13;
- CXCursor_ObjCPropertyDecl : constant unsigned := 14;
- CXCursor_ObjCIvarDecl : constant unsigned := 15;
- CXCursor_ObjCInstanceMethodDecl : constant unsigned := 16;
- CXCursor_ObjCClassMethodDecl : constant unsigned := 17;
- CXCursor_ObjCImplementationDecl : constant unsigned := 18;
- CXCursor_ObjCCategoryImplDecl : constant unsigned := 19;
- CXCursor_TypedefDecl : constant unsigned := 20;
- CXCursor_CXXMethod : constant unsigned := 21;
- CXCursor_Namespace : constant unsigned := 22;
- CXCursor_LinkageSpec : constant unsigned := 23;
- CXCursor_Constructor : constant unsigned := 24;
- CXCursor_Destructor : constant unsigned := 25;
- CXCursor_ConversionFunction : constant unsigned := 26;
- CXCursor_TemplateTypeParameter : constant unsigned := 27;
- CXCursor_NonTypeTemplateParameter : constant unsigned := 28;
- CXCursor_TemplateTemplateParameter : constant unsigned := 29;
- CXCursor_FunctionTemplate : constant unsigned := 30;
- CXCursor_ClassTemplate : constant unsigned := 31;
- CXCursor_ClassTemplatePartialSpecialization : constant unsigned := 32;
- CXCursor_NamespaceAlias : constant unsigned := 33;
- CXCursor_UsingDirective : constant unsigned := 34;
- CXCursor_UsingDeclaration : constant unsigned := 35;
- CXCursor_TypeAliasDecl : constant unsigned := 36;
- CXCursor_ObjCSynthesizeDecl : constant unsigned := 37;
- CXCursor_ObjCDynamicDecl : constant unsigned := 38;
- CXCursor_CXXAccessSpecifier : constant unsigned := 39;
- CXCursor_FirstDecl : constant unsigned := 1;
- CXCursor_LastDecl : constant unsigned := 39;
- CXCursor_FirstRef : constant unsigned := 40;
- CXCursor_ObjCSuperClassRef : constant unsigned := 40;
- CXCursor_ObjCProtocolRef : constant unsigned := 41;
- CXCursor_ObjCClassRef : constant unsigned := 42;
- CXCursor_TypeRef : constant unsigned := 43;
- CXCursor_CXXBaseSpecifier : constant unsigned := 44;
- CXCursor_TemplateRef : constant unsigned := 45;
- CXCursor_NamespaceRef : constant unsigned := 46;
- CXCursor_MemberRef : constant unsigned := 47;
- CXCursor_LabelRef : constant unsigned := 48;
- CXCursor_OverloadedDeclRef : constant unsigned := 49;
- CXCursor_VariableRef : constant unsigned := 50;
- CXCursor_LastRef : constant unsigned := 50;
- CXCursor_FirstInvalid : constant unsigned := 70;
- CXCursor_InvalidFile : constant unsigned := 70;
- CXCursor_NoDeclFound : constant unsigned := 71;
- CXCursor_NotImplemented : constant unsigned := 72;
- CXCursor_InvalidCode : constant unsigned := 73;
- CXCursor_LastInvalid : constant unsigned := 73;
- CXCursor_FirstExpr : constant unsigned := 100;
- CXCursor_UnexposedExpr : constant unsigned := 100;
- CXCursor_DeclRefExpr : constant unsigned := 101;
- CXCursor_MemberRefExpr : constant unsigned := 102;
- CXCursor_CallExpr : constant unsigned := 103;
- CXCursor_ObjCMessageExpr : constant unsigned := 104;
- CXCursor_BlockExpr : constant unsigned := 105;
- CXCursor_IntegerLiteral : constant unsigned := 106;
- CXCursor_FloatingLiteral : constant unsigned := 107;
- CXCursor_ImaginaryLiteral : constant unsigned := 108;
- CXCursor_StringLiteral : constant unsigned := 109;
- CXCursor_CharacterLiteral : constant unsigned := 110;
- CXCursor_ParenExpr : constant unsigned := 111;
- CXCursor_UnaryOperator : constant unsigned := 112;
- CXCursor_ArraySubscriptExpr : constant unsigned := 113;
- CXCursor_BinaryOperator : constant unsigned := 114;
- CXCursor_CompoundAssignOperator : constant unsigned := 115;
- CXCursor_ConditionalOperator : constant unsigned := 116;
- CXCursor_CStyleCastExpr : constant unsigned := 117;
- CXCursor_CompoundLiteralExpr : constant unsigned := 118;
- CXCursor_InitListExpr : constant unsigned := 119;
- CXCursor_AddrLabelExpr : constant unsigned := 120;
- CXCursor_StmtExpr : constant unsigned := 121;
- CXCursor_GenericSelectionExpr : constant unsigned := 122;
- CXCursor_GNUNullExpr : constant unsigned := 123;
- CXCursor_CXXStaticCastExpr : constant unsigned := 124;
- CXCursor_CXXDynamicCastExpr : constant unsigned := 125;
- CXCursor_CXXReinterpretCastExpr : constant unsigned := 126;
- CXCursor_CXXConstCastExpr : constant unsigned := 127;
- CXCursor_CXXFunctionalCastExpr : constant unsigned := 128;
- CXCursor_CXXTypeidExpr : constant unsigned := 129;
- CXCursor_CXXBoolLiteralExpr : constant unsigned := 130;
- CXCursor_CXXNullPtrLiteralExpr : constant unsigned := 131;
- CXCursor_CXXThisExpr : constant unsigned := 132;
- CXCursor_CXXThrowExpr : constant unsigned := 133;
- CXCursor_CXXNewExpr : constant unsigned := 134;
- CXCursor_CXXDeleteExpr : constant unsigned := 135;
- CXCursor_UnaryExpr : constant unsigned := 136;
- CXCursor_ObjCStringLiteral : constant unsigned := 137;
- CXCursor_ObjCEncodeExpr : constant unsigned := 138;
- CXCursor_ObjCSelectorExpr : constant unsigned := 139;
- CXCursor_ObjCProtocolExpr : constant unsigned := 140;
- CXCursor_ObjCBridgedCastExpr : constant unsigned := 141;
- CXCursor_PackExpansionExpr : constant unsigned := 142;
- CXCursor_SizeOfPackExpr : constant unsigned := 143;
- CXCursor_LambdaExpr : constant unsigned := 144;
- CXCursor_ObjCBoolLiteralExpr : constant unsigned := 145;
- CXCursor_ObjCSelfExpr : constant unsigned := 146;
- CXCursor_OMPArraySectionExpr : constant unsigned := 147;
- CXCursor_ObjCAvailabilityCheckExpr : constant unsigned := 148;
- CXCursor_FixedPointLiteral : constant unsigned := 149;
- CXCursor_LastExpr : constant unsigned := 149;
- CXCursor_FirstStmt : constant unsigned := 200;
- CXCursor_UnexposedStmt : constant unsigned := 200;
- CXCursor_LabelStmt : constant unsigned := 201;
- CXCursor_CompoundStmt : constant unsigned := 202;
- CXCursor_CaseStmt : constant unsigned := 203;
- CXCursor_DefaultStmt : constant unsigned := 204;
- CXCursor_IfStmt : constant unsigned := 205;
- CXCursor_SwitchStmt : constant unsigned := 206;
- CXCursor_WhileStmt : constant unsigned := 207;
- CXCursor_DoStmt : constant unsigned := 208;
- CXCursor_ForStmt : constant unsigned := 209;
- CXCursor_GotoStmt : constant unsigned := 210;
- CXCursor_IndirectGotoStmt : constant unsigned := 211;
- CXCursor_ContinueStmt : constant unsigned := 212;
- CXCursor_BreakStmt : constant unsigned := 213;
- CXCursor_ReturnStmt : constant unsigned := 214;
- CXCursor_GCCAsmStmt : constant unsigned := 215;
- CXCursor_AsmStmt : constant unsigned := 215;
- CXCursor_ObjCAtTryStmt : constant unsigned := 216;
- CXCursor_ObjCAtCatchStmt : constant unsigned := 217;
- CXCursor_ObjCAtFinallyStmt : constant unsigned := 218;
- CXCursor_ObjCAtThrowStmt : constant unsigned := 219;
- CXCursor_ObjCAtSynchronizedStmt : constant unsigned := 220;
- CXCursor_ObjCAutoreleasePoolStmt : constant unsigned := 221;
- CXCursor_ObjCForCollectionStmt : constant unsigned := 222;
- CXCursor_CXXCatchStmt : constant unsigned := 223;
- CXCursor_CXXTryStmt : constant unsigned := 224;
- CXCursor_CXXForRangeStmt : constant unsigned := 225;
- CXCursor_SEHTryStmt : constant unsigned := 226;
- CXCursor_SEHExceptStmt : constant unsigned := 227;
- CXCursor_SEHFinallyStmt : constant unsigned := 228;
- CXCursor_MSAsmStmt : constant unsigned := 229;
- CXCursor_NullStmt : constant unsigned := 230;
- CXCursor_DeclStmt : constant unsigned := 231;
- CXCursor_OMPParallelDirective : constant unsigned := 232;
- CXCursor_OMPSimdDirective : constant unsigned := 233;
- CXCursor_OMPForDirective : constant unsigned := 234;
- CXCursor_OMPSectionsDirective : constant unsigned := 235;
- CXCursor_OMPSectionDirective : constant unsigned := 236;
- CXCursor_OMPSingleDirective : constant unsigned := 237;
- CXCursor_OMPParallelForDirective : constant unsigned := 238;
- CXCursor_OMPParallelSectionsDirective : constant unsigned := 239;
- CXCursor_OMPTaskDirective : constant unsigned := 240;
- CXCursor_OMPMasterDirective : constant unsigned := 241;
- CXCursor_OMPCriticalDirective : constant unsigned := 242;
- CXCursor_OMPTaskyieldDirective : constant unsigned := 243;
- CXCursor_OMPBarrierDirective : constant unsigned := 244;
- CXCursor_OMPTaskwaitDirective : constant unsigned := 245;
- CXCursor_OMPFlushDirective : constant unsigned := 246;
- CXCursor_SEHLeaveStmt : constant unsigned := 247;
- CXCursor_OMPOrderedDirective : constant unsigned := 248;
- CXCursor_OMPAtomicDirective : constant unsigned := 249;
- CXCursor_OMPForSimdDirective : constant unsigned := 250;
- CXCursor_OMPParallelForSimdDirective : constant unsigned := 251;
- CXCursor_OMPTargetDirective : constant unsigned := 252;
- CXCursor_OMPTeamsDirective : constant unsigned := 253;
- CXCursor_OMPTaskgroupDirective : constant unsigned := 254;
- CXCursor_OMPCancellationPointDirective : constant unsigned := 255;
- CXCursor_OMPCancelDirective : constant unsigned := 256;
- CXCursor_OMPTargetDataDirective : constant unsigned := 257;
- CXCursor_OMPTaskLoopDirective : constant unsigned := 258;
- CXCursor_OMPTaskLoopSimdDirective : constant unsigned := 259;
- CXCursor_OMPDistributeDirective : constant unsigned := 260;
- CXCursor_OMPTargetEnterDataDirective : constant unsigned := 261;
- CXCursor_OMPTargetExitDataDirective : constant unsigned := 262;
- CXCursor_OMPTargetParallelDirective : constant unsigned := 263;
- CXCursor_OMPTargetParallelForDirective : constant unsigned := 264;
- CXCursor_OMPTargetUpdateDirective : constant unsigned := 265;
- CXCursor_OMPDistributeParallelForDirective : constant unsigned := 266;
- CXCursor_OMPDistributeParallelForSimdDirective : constant unsigned := 267;
- CXCursor_OMPDistributeSimdDirective : constant unsigned := 268;
- CXCursor_OMPTargetParallelForSimdDirective : constant unsigned := 269;
- CXCursor_OMPTargetSimdDirective : constant unsigned := 270;
- CXCursor_OMPTeamsDistributeDirective : constant unsigned := 271;
- CXCursor_OMPTeamsDistributeSimdDirective : constant unsigned := 272;
- CXCursor_OMPTeamsDistributeParallelForSimdDirective : constant unsigned := 273;
- CXCursor_OMPTeamsDistributeParallelForDirective : constant unsigned := 274;
- CXCursor_OMPTargetTeamsDirective : constant unsigned := 275;
- CXCursor_OMPTargetTeamsDistributeDirective : constant unsigned := 276;
- CXCursor_OMPTargetTeamsDistributeParallelForDirective : constant unsigned := 277;
- CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective : constant unsigned := 278;
- CXCursor_OMPTargetTeamsDistributeSimdDirective : constant unsigned := 279;
- CXCursor_LastStmt : constant unsigned := 279;
- CXCursor_TranslationUnit : constant unsigned := 300;
- CXCursor_FirstAttr : constant unsigned := 400;
- CXCursor_UnexposedAttr : constant unsigned := 400;
- CXCursor_IBActionAttr : constant unsigned := 401;
- CXCursor_IBOutletAttr : constant unsigned := 402;
- CXCursor_IBOutletCollectionAttr : constant unsigned := 403;
- CXCursor_CXXFinalAttr : constant unsigned := 404;
- CXCursor_CXXOverrideAttr : constant unsigned := 405;
- CXCursor_AnnotateAttr : constant unsigned := 406;
- CXCursor_AsmLabelAttr : constant unsigned := 407;
- CXCursor_PackedAttr : constant unsigned := 408;
- CXCursor_PureAttr : constant unsigned := 409;
- CXCursor_ConstAttr : constant unsigned := 410;
- CXCursor_NoDuplicateAttr : constant unsigned := 411;
- CXCursor_CUDAConstantAttr : constant unsigned := 412;
- CXCursor_CUDADeviceAttr : constant unsigned := 413;
- CXCursor_CUDAGlobalAttr : constant unsigned := 414;
- CXCursor_CUDAHostAttr : constant unsigned := 415;
- CXCursor_CUDASharedAttr : constant unsigned := 416;
- CXCursor_VisibilityAttr : constant unsigned := 417;
- CXCursor_DLLExport : constant unsigned := 418;
- CXCursor_DLLImport : constant unsigned := 419;
- CXCursor_NSReturnsRetained : constant unsigned := 420;
- CXCursor_NSReturnsNotRetained : constant unsigned := 421;
- CXCursor_NSReturnsAutoreleased : constant unsigned := 422;
- CXCursor_NSConsumesSelf : constant unsigned := 423;
- CXCursor_NSConsumed : constant unsigned := 424;
- CXCursor_ObjCException : constant unsigned := 425;
- CXCursor_ObjCNSObject : constant unsigned := 426;
- CXCursor_ObjCIndependentClass : constant unsigned := 427;
- CXCursor_ObjCPreciseLifetime : constant unsigned := 428;
- CXCursor_ObjCReturnsInnerPointer : constant unsigned := 429;
- CXCursor_ObjCRequiresSuper : constant unsigned := 430;
- CXCursor_ObjCRootClass : constant unsigned := 431;
- CXCursor_ObjCSubclassingRestricted : constant unsigned := 432;
- CXCursor_ObjCExplicitProtocolImpl : constant unsigned := 433;
- CXCursor_ObjCDesignatedInitializer : constant unsigned := 434;
- CXCursor_ObjCRuntimeVisible : constant unsigned := 435;
- CXCursor_ObjCBoxable : constant unsigned := 436;
- CXCursor_FlagEnum : constant unsigned := 437;
- CXCursor_LastAttr : constant unsigned := 437;
- CXCursor_PreprocessingDirective : constant unsigned := 500;
- CXCursor_MacroDefinition : constant unsigned := 501;
- CXCursor_MacroExpansion : constant unsigned := 502;
- CXCursor_MacroInstantiation : constant unsigned := 502;
- CXCursor_InclusionDirective : constant unsigned := 503;
- CXCursor_FirstPreprocessing : constant unsigned := 500;
- CXCursor_LastPreprocessing : constant unsigned := 503;
- CXCursor_ModuleImportDecl : constant unsigned := 600;
- CXCursor_TypeAliasTemplateDecl : constant unsigned := 601;
- CXCursor_StaticAssert : constant unsigned := 602;
- CXCursor_FriendDecl : constant unsigned := 603;
- CXCursor_FirstExtraDecl : constant unsigned := 600;
- CXCursor_LastExtraDecl : constant unsigned := 603;
- CXCursor_OverloadCandidate : constant unsigned := 700; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:1714
-
- CXCursor_MIN_VALUE : constant CXCursorKind := 1;
- CXCursor_MAX_VALUE : constant CXCursorKind := 700;
-
- -- skipped anonymous struct anon_8
-
- type CXCursor_data_array is array (0 .. 2) of System.Address;
- type CXCursor is record
- kind : aliased CXCursorKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2642
- xdata : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2643
- data : CXCursor_data_array; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2644
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2645
-
- function clang_getNullCursor return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2656
- with Import => True,
- Convention => C,
- External_Name => "clang_getNullCursor";
-
- function clang_getTranslationUnitCursor (arg1 : CXTranslationUnit) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2664
- with Import => True,
- Convention => C,
- External_Name => "clang_getTranslationUnitCursor";
-
- function clang_equalCursors (arg1 : CXCursor; arg2 : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2669
- with Import => True,
- Convention => C,
- External_Name => "clang_equalCursors";
-
- function clang_Cursor_isNull (cursor : CXCursor) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2674
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isNull";
-
- function clang_hashCursor (arg1 : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2679
- with Import => True,
- Convention => C,
- External_Name => "clang_hashCursor";
-
- function clang_getCursorKind (arg1 : CXCursor) return CXCursorKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2684
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorKind";
-
- function clang_isDeclaration (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2689
- with Import => True,
- Convention => C,
- External_Name => "clang_isDeclaration";
-
- function clang_isInvalidDeclaration (arg1 : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2699
- with Import => True,
- Convention => C,
- External_Name => "clang_isInvalidDeclaration";
-
- function clang_isReference (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2709
- with Import => True,
- Convention => C,
- External_Name => "clang_isReference";
-
- function clang_isExpression (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2714
- with Import => True,
- Convention => C,
- External_Name => "clang_isExpression";
-
- function clang_isStatement (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2719
- with Import => True,
- Convention => C,
- External_Name => "clang_isStatement";
-
- function clang_isAttribute (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2724
- with Import => True,
- Convention => C,
- External_Name => "clang_isAttribute";
-
- function clang_Cursor_hasAttrs (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2729
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_hasAttrs";
-
- function clang_isInvalid (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2735
- with Import => True,
- Convention => C,
- External_Name => "clang_isInvalid";
-
- function clang_isTranslationUnit (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2741
- with Import => True,
- Convention => C,
- External_Name => "clang_isTranslationUnit";
-
- function clang_isPreprocessing (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2747
- with Import => True,
- Convention => C,
- External_Name => "clang_isPreprocessing";
-
- function clang_isUnexposed (arg1 : CXCursorKind) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2753
- with Import => True,
- Convention => C,
- External_Name => "clang_isUnexposed";
-
- type CXLinkageKind is
- (CXLinkage_Invalid,
- CXLinkage_NoLinkage,
- CXLinkage_Internal,
- CXLinkage_UniqueExternal,
- CXLinkage_External)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2758
-
- function clang_getCursorLinkage (cursor : CXCursor) return CXLinkageKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2779
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorLinkage";
-
- type CXVisibilityKind is
- (CXVisibility_Invalid,
- CXVisibility_Hidden,
- CXVisibility_Protected,
- CXVisibility_Default)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2781
-
- function clang_getCursorVisibility (cursor : CXCursor) return CXVisibilityKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2805
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorVisibility";
-
- function clang_getCursorAvailability (cursor : CXCursor) return CXAvailabilityKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2816
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorAvailability";
-
- type CXPlatformAvailability is record
- Platform : aliased clang_c_CXString_h.CXString; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2829
- Introduced : aliased CXVersion; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2833
- Deprecated : aliased CXVersion; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2838
- Obsoleted : aliased CXVersion; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2843
- Unavailable : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2847
- Message : aliased clang_c_CXString_h.CXString; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2852
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2822
-
- function clang_getCursorPlatformAvailability
- (cursor : CXCursor;
- always_deprecated : access int;
- deprecated_message : access clang_c_CXString_h.CXString;
- always_unavailable : access int;
- unavailable_message : access clang_c_CXString_h.CXString;
- availability : access CXPlatformAvailability;
- availability_size : int) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2892
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorPlatformAvailability";
-
- procedure clang_disposeCXPlatformAvailability (availability : access CXPlatformAvailability) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2904
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeCXPlatformAvailability";
-
- type CXLanguageKind is
- (CXLanguage_Invalid,
- CXLanguage_C,
- CXLanguage_ObjC,
- CXLanguage_CPlusPlus)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2909
-
- function clang_getCursorLanguage (cursor : CXCursor) return CXLanguageKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2919
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorLanguage";
-
- type CXTLSKind is
- (CXTLS_None,
- CXTLS_Dynamic,
- CXTLS_Static)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2925
-
- function clang_getCursorTLSKind (cursor : CXCursor) return CXTLSKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2935
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorTLSKind";
-
- function clang_Cursor_getTranslationUnit (arg1 : CXCursor) return CXTranslationUnit -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2940
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getTranslationUnit";
-
- type CXCursorSetImpl is null record; -- incomplete struct
-
- type CXCursorSet is access all CXCursorSetImpl; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2945
-
- function clang_createCXCursorSet return CXCursorSet -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2950
- with Import => True,
- Convention => C,
- External_Name => "clang_createCXCursorSet";
-
- procedure clang_disposeCXCursorSet (cset : CXCursorSet) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2955
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeCXCursorSet";
-
- function clang_CXCursorSet_contains (cset : CXCursorSet; cursor : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2962
- with Import => True,
- Convention => C,
- External_Name => "clang_CXCursorSet_contains";
-
- function clang_CXCursorSet_insert (cset : CXCursorSet; cursor : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:2970
- with Import => True,
- Convention => C,
- External_Name => "clang_CXCursorSet_insert";
-
- function clang_getCursorSemanticParent (cursor : CXCursor) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3006
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorSemanticParent";
-
- function clang_getCursorLexicalParent (cursor : CXCursor) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3042
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorLexicalParent";
-
- procedure clang_getOverriddenCursors
- (cursor : CXCursor;
- overridden : System.Address;
- num_overridden : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3087
- with Import => True,
- Convention => C,
- External_Name => "clang_getOverriddenCursors";
-
- procedure clang_disposeOverriddenCursors (overridden : access CXCursor) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3095
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeOverriddenCursors";
-
- function clang_getIncludedFile (cursor : CXCursor) return CXFile -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3101
- with Import => True,
- Convention => C,
- External_Name => "clang_getIncludedFile";
-
- function clang_getCursor (arg1 : CXTranslationUnit; arg2 : CXSourceLocation) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3133
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursor";
-
- function clang_getCursorLocation (arg1 : CXCursor) return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3145
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorLocation";
-
- function clang_getCursorExtent (arg1 : CXCursor) return CXSourceRange -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3158
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorExtent";
-
- subtype CXTypeKind is unsigned;
- CXType_Invalid : constant unsigned := 0;
- CXType_Unexposed : constant unsigned := 1;
- CXType_Void : constant unsigned := 2;
- CXType_Bool : constant unsigned := 3;
- CXType_Char_U : constant unsigned := 4;
- CXType_UChar : constant unsigned := 5;
- CXType_Char16 : constant unsigned := 6;
- CXType_Char32 : constant unsigned := 7;
- CXType_UShort : constant unsigned := 8;
- CXType_UInt : constant unsigned := 9;
- CXType_ULong : constant unsigned := 10;
- CXType_ULongLong : constant unsigned := 11;
- CXType_UInt128 : constant unsigned := 12;
- CXType_Char_S : constant unsigned := 13;
- CXType_SChar : constant unsigned := 14;
- CXType_WChar : constant unsigned := 15;
- CXType_Short : constant unsigned := 16;
- CXType_Int : constant unsigned := 17;
- CXType_Long : constant unsigned := 18;
- CXType_LongLong : constant unsigned := 19;
- CXType_Int128 : constant unsigned := 20;
- CXType_Float : constant unsigned := 21;
- CXType_Double : constant unsigned := 22;
- CXType_LongDouble : constant unsigned := 23;
- CXType_NullPtr : constant unsigned := 24;
- CXType_Overload : constant unsigned := 25;
- CXType_Dependent : constant unsigned := 26;
- CXType_ObjCId : constant unsigned := 27;
- CXType_ObjCClass : constant unsigned := 28;
- CXType_ObjCSel : constant unsigned := 29;
- CXType_Float128 : constant unsigned := 30;
- CXType_Half : constant unsigned := 31;
- CXType_Float16 : constant unsigned := 32;
- CXType_ShortAccum : constant unsigned := 33;
- CXType_Accum : constant unsigned := 34;
- CXType_LongAccum : constant unsigned := 35;
- CXType_UShortAccum : constant unsigned := 36;
- CXType_UAccum : constant unsigned := 37;
- CXType_ULongAccum : constant unsigned := 38;
- CXType_FirstBuiltin : constant unsigned := 2;
- CXType_LastBuiltin : constant unsigned := 38;
- CXType_Complex : constant unsigned := 100;
- CXType_Pointer : constant unsigned := 101;
- CXType_BlockPointer : constant unsigned := 102;
- CXType_LValueReference : constant unsigned := 103;
- CXType_RValueReference : constant unsigned := 104;
- CXType_Record : constant unsigned := 105;
- CXType_Enum : constant unsigned := 106;
- CXType_Typedef : constant unsigned := 107;
- CXType_ObjCInterface : constant unsigned := 108;
- CXType_ObjCObjectPointer : constant unsigned := 109;
- CXType_FunctionNoProto : constant unsigned := 110;
- CXType_FunctionProto : constant unsigned := 111;
- CXType_ConstantArray : constant unsigned := 112;
- CXType_Vector : constant unsigned := 113;
- CXType_IncompleteArray : constant unsigned := 114;
- CXType_VariableArray : constant unsigned := 115;
- CXType_DependentSizedArray : constant unsigned := 116;
- CXType_MemberPointer : constant unsigned := 117;
- CXType_Auto : constant unsigned := 118;
- CXType_Elaborated : constant unsigned := 119;
- CXType_Pipe : constant unsigned := 120;
- CXType_OCLImage1dRO : constant unsigned := 121;
- CXType_OCLImage1dArrayRO : constant unsigned := 122;
- CXType_OCLImage1dBufferRO : constant unsigned := 123;
- CXType_OCLImage2dRO : constant unsigned := 124;
- CXType_OCLImage2dArrayRO : constant unsigned := 125;
- CXType_OCLImage2dDepthRO : constant unsigned := 126;
- CXType_OCLImage2dArrayDepthRO : constant unsigned := 127;
- CXType_OCLImage2dMSAARO : constant unsigned := 128;
- CXType_OCLImage2dArrayMSAARO : constant unsigned := 129;
- CXType_OCLImage2dMSAADepthRO : constant unsigned := 130;
- CXType_OCLImage2dArrayMSAADepthRO : constant unsigned := 131;
- CXType_OCLImage3dRO : constant unsigned := 132;
- CXType_OCLImage1dWO : constant unsigned := 133;
- CXType_OCLImage1dArrayWO : constant unsigned := 134;
- CXType_OCLImage1dBufferWO : constant unsigned := 135;
- CXType_OCLImage2dWO : constant unsigned := 136;
- CXType_OCLImage2dArrayWO : constant unsigned := 137;
- CXType_OCLImage2dDepthWO : constant unsigned := 138;
- CXType_OCLImage2dArrayDepthWO : constant unsigned := 139;
- CXType_OCLImage2dMSAAWO : constant unsigned := 140;
- CXType_OCLImage2dArrayMSAAWO : constant unsigned := 141;
- CXType_OCLImage2dMSAADepthWO : constant unsigned := 142;
- CXType_OCLImage2dArrayMSAADepthWO : constant unsigned := 143;
- CXType_OCLImage3dWO : constant unsigned := 144;
- CXType_OCLImage1dRW : constant unsigned := 145;
- CXType_OCLImage1dArrayRW : constant unsigned := 146;
- CXType_OCLImage1dBufferRW : constant unsigned := 147;
- CXType_OCLImage2dRW : constant unsigned := 148;
- CXType_OCLImage2dArrayRW : constant unsigned := 149;
- CXType_OCLImage2dDepthRW : constant unsigned := 150;
- CXType_OCLImage2dArrayDepthRW : constant unsigned := 151;
- CXType_OCLImage2dMSAARW : constant unsigned := 152;
- CXType_OCLImage2dArrayMSAARW : constant unsigned := 153;
- CXType_OCLImage2dMSAADepthRW : constant unsigned := 154;
- CXType_OCLImage2dArrayMSAADepthRW : constant unsigned := 155;
- CXType_OCLImage3dRW : constant unsigned := 156;
- CXType_OCLSampler : constant unsigned := 157;
- CXType_OCLEvent : constant unsigned := 158;
- CXType_OCLQueue : constant unsigned := 159;
- CXType_OCLReserveID : constant unsigned := 160;
- CXType_ObjCObject : constant unsigned := 161;
- CXType_ObjCTypeParam : constant unsigned := 162;
- CXType_Attributed : constant unsigned := 163;
- CXType_OCLIntelSubgroupAVCMcePayload : constant unsigned := 164;
- CXType_OCLIntelSubgroupAVCImePayload : constant unsigned := 165;
- CXType_OCLIntelSubgroupAVCRefPayload : constant unsigned := 166;
- CXType_OCLIntelSubgroupAVCSicPayload : constant unsigned := 167;
- CXType_OCLIntelSubgroupAVCMceResult : constant unsigned := 168;
- CXType_OCLIntelSubgroupAVCImeResult : constant unsigned := 169;
- CXType_OCLIntelSubgroupAVCRefResult : constant unsigned := 170;
- CXType_OCLIntelSubgroupAVCSicResult : constant unsigned := 171;
- CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout : constant unsigned := 172;
- CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout : constant unsigned := 173;
- CXType_OCLIntelSubgroupAVCImeSingleRefStreamin : constant unsigned := 174;
- CXType_OCLIntelSubgroupAVCImeDualRefStreamin : constant unsigned := 175; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3173
-
- subtype CXCallingConv is unsigned;
- CXCallingConv_Default : constant unsigned := 0;
- CXCallingConv_C : constant unsigned := 1;
- CXCallingConv_X86StdCall : constant unsigned := 2;
- CXCallingConv_X86FastCall : constant unsigned := 3;
- CXCallingConv_X86ThisCall : constant unsigned := 4;
- CXCallingConv_X86Pascal : constant unsigned := 5;
- CXCallingConv_AAPCS : constant unsigned := 6;
- CXCallingConv_AAPCS_VFP : constant unsigned := 7;
- CXCallingConv_X86RegCall : constant unsigned := 8;
- CXCallingConv_IntelOclBicc : constant unsigned := 9;
- CXCallingConv_Win64 : constant unsigned := 10;
- CXCallingConv_X86_64Win64 : constant unsigned := 10;
- CXCallingConv_X86_64SysV : constant unsigned := 11;
- CXCallingConv_X86VectorCall : constant unsigned := 12;
- CXCallingConv_Swift : constant unsigned := 13;
- CXCallingConv_PreserveMost : constant unsigned := 14;
- CXCallingConv_PreserveAll : constant unsigned := 15;
- CXCallingConv_AArch64VectorCall : constant unsigned := 16;
- CXCallingConv_Invalid : constant unsigned := 100;
- CXCallingConv_Unexposed : constant unsigned := 200; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3320
-
- -- skipped anonymous struct anon_9
-
- type CXType_data_array is array (0 .. 1) of System.Address;
- type CXType is record
- kind : aliased CXTypeKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3350
- data : CXType_data_array; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3351
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3352
-
- function clang_getCursorType (C : CXCursor) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3357
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorType";
-
- function clang_getTypeSpelling (CT : CXType) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3365
- with Import => True,
- Convention => C,
- External_Name => "clang_getTypeSpelling";
-
- function clang_getTypedefDeclUnderlyingType (C : CXCursor) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3373
- with Import => True,
- Convention => C,
- External_Name => "clang_getTypedefDeclUnderlyingType";
-
- function clang_getEnumDeclIntegerType (C : CXCursor) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3381
- with Import => True,
- Convention => C,
- External_Name => "clang_getEnumDeclIntegerType";
-
- function clang_getEnumConstantDeclValue (C : CXCursor) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3391
- with Import => True,
- Convention => C,
- External_Name => "clang_getEnumConstantDeclValue";
-
- function clang_getEnumConstantDeclUnsignedValue (C : CXCursor) return Extensions.unsigned_long_long -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3401
- with Import => True,
- Convention => C,
- External_Name => "clang_getEnumConstantDeclUnsignedValue";
-
- function clang_getFieldDeclBitWidth (C : CXCursor) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3408
- with Import => True,
- Convention => C,
- External_Name => "clang_getFieldDeclBitWidth";
-
- function clang_Cursor_getNumArguments (C : CXCursor) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3417
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getNumArguments";
-
- function clang_Cursor_getArgument (C : CXCursor; i : unsigned) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3426
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getArgument";
-
- type CXTemplateArgumentKind is
- (CXTemplateArgumentKind_Null,
- CXTemplateArgumentKind_Type,
- CXTemplateArgumentKind_Declaration,
- CXTemplateArgumentKind_NullPtr,
- CXTemplateArgumentKind_Integral,
- CXTemplateArgumentKind_Template,
- CXTemplateArgumentKind_TemplateExpansion,
- CXTemplateArgumentKind_Expression,
- CXTemplateArgumentKind_Pack,
- CXTemplateArgumentKind_Invalid)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3434
-
- function clang_Cursor_getNumTemplateArguments (C : CXCursor) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3464
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getNumTemplateArguments";
-
- function clang_Cursor_getTemplateArgumentKind (C : CXCursor; I : unsigned) return CXTemplateArgumentKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3482
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getTemplateArgumentKind";
-
- function clang_Cursor_getTemplateArgumentType (C : CXCursor; I : unsigned) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3503
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getTemplateArgumentType";
-
- function clang_Cursor_getTemplateArgumentValue (C : CXCursor; I : unsigned) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3523
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getTemplateArgumentValue";
-
- function clang_Cursor_getTemplateArgumentUnsignedValue (C : CXCursor; I : unsigned) return Extensions.unsigned_long_long -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3543
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getTemplateArgumentUnsignedValue";
-
- function clang_equalTypes (A : CXType; B : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3552
- with Import => True,
- Convention => C,
- External_Name => "clang_equalTypes";
-
- function clang_getCanonicalType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3562
- with Import => True,
- Convention => C,
- External_Name => "clang_getCanonicalType";
-
- function clang_isConstQualifiedType (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3569
- with Import => True,
- Convention => C,
- External_Name => "clang_isConstQualifiedType";
-
- function clang_Cursor_isMacroFunctionLike (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3575
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isMacroFunctionLike";
-
- function clang_Cursor_isMacroBuiltin (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3581
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isMacroBuiltin";
-
- function clang_Cursor_isFunctionInlined (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3587
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isFunctionInlined";
-
- function clang_isVolatileQualifiedType (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3594
- with Import => True,
- Convention => C,
- External_Name => "clang_isVolatileQualifiedType";
-
- function clang_isRestrictQualifiedType (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3601
- with Import => True,
- Convention => C,
- External_Name => "clang_isRestrictQualifiedType";
-
- function clang_getAddressSpace (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3606
- with Import => True,
- Convention => C,
- External_Name => "clang_getAddressSpace";
-
- function clang_getTypedefName (CT : CXType) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3611
- with Import => True,
- Convention => C,
- External_Name => "clang_getTypedefName";
-
- function clang_getPointeeType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3616
- with Import => True,
- Convention => C,
- External_Name => "clang_getPointeeType";
-
- function clang_getTypeDeclaration (T : CXType) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3621
- with Import => True,
- Convention => C,
- External_Name => "clang_getTypeDeclaration";
-
- function clang_getDeclObjCTypeEncoding (C : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3626
- with Import => True,
- Convention => C,
- External_Name => "clang_getDeclObjCTypeEncoding";
-
- function clang_Type_getObjCEncoding (c_type : CXType) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3631
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getObjCEncoding";
-
- function clang_getTypeKindSpelling (K : CXTypeKind) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3636
- with Import => True,
- Convention => C,
- External_Name => "clang_getTypeKindSpelling";
-
- function clang_getFunctionTypeCallingConv (T : CXType) return CXCallingConv -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3643
- with Import => True,
- Convention => C,
- External_Name => "clang_getFunctionTypeCallingConv";
-
- function clang_getResultType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3650
- with Import => True,
- Convention => C,
- External_Name => "clang_getResultType";
-
- function clang_getExceptionSpecificationType (T : CXType) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3658
- with Import => True,
- Convention => C,
- External_Name => "clang_getExceptionSpecificationType";
-
- function clang_getNumArgTypes (T : CXType) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3666
- with Import => True,
- Convention => C,
- External_Name => "clang_getNumArgTypes";
-
- function clang_getArgType (T : CXType; i : unsigned) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3674
- with Import => True,
- Convention => C,
- External_Name => "clang_getArgType";
-
- function clang_Type_getObjCObjectBaseType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3681
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getObjCObjectBaseType";
-
- function clang_Type_getNumObjCProtocolRefs (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3688
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getNumObjCProtocolRefs";
-
- function clang_Type_getObjCProtocolDecl (T : CXType; i : unsigned) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3696
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getObjCProtocolDecl";
-
- function clang_Type_getNumObjCTypeArgs (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3703
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getNumObjCTypeArgs";
-
- function clang_Type_getObjCTypeArg (T : CXType; i : unsigned) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3711
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getObjCTypeArg";
-
- function clang_isFunctionTypeVariadic (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3716
- with Import => True,
- Convention => C,
- External_Name => "clang_isFunctionTypeVariadic";
-
- function clang_getCursorResultType (C : CXCursor) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3723
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorResultType";
-
- function clang_getCursorExceptionSpecificationType (C : CXCursor) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3731
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorExceptionSpecificationType";
-
- function clang_isPODType (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3737
- with Import => True,
- Convention => C,
- External_Name => "clang_isPODType";
-
- function clang_getElementType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3745
- with Import => True,
- Convention => C,
- External_Name => "clang_getElementType";
-
- function clang_getNumElements (T : CXType) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3753
- with Import => True,
- Convention => C,
- External_Name => "clang_getNumElements";
-
- function clang_getArrayElementType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3760
- with Import => True,
- Convention => C,
- External_Name => "clang_getArrayElementType";
-
- function clang_getArraySize (T : CXType) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3767
- with Import => True,
- Convention => C,
- External_Name => "clang_getArraySize";
-
- function clang_Type_getNamedType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3774
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getNamedType";
-
- function clang_Type_isTransparentTagTypedef (T : CXType) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3784
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_isTransparentTagTypedef";
-
- type CXTypeNullabilityKind is
- (CXTypeNullability_NonNull,
- CXTypeNullability_Nullable,
- CXTypeNullability_Unspecified,
- CXTypeNullability_Invalid)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3786
-
- function clang_Type_getNullability (T : CXType) return CXTypeNullabilityKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3811
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getNullability";
-
- subtype CXTypeLayoutError is int;
- CXTypeLayoutError_Invalid : constant int := -1;
- CXTypeLayoutError_Incomplete : constant int := -2;
- CXTypeLayoutError_Dependent : constant int := -3;
- CXTypeLayoutError_NotConstantSize : constant int := -4;
- CXTypeLayoutError_InvalidFieldName : constant int := -5; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3821
-
- function clang_Type_getAlignOf (T : CXType) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3856
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getAlignOf";
-
- function clang_Type_getClassType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3863
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getClassType";
-
- function clang_Type_getSizeOf (T : CXType) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3874
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getSizeOf";
-
- function clang_Type_getOffsetOf (T : CXType; S : Interfaces.C.Strings.chars_ptr) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3889
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getOffsetOf";
-
- function clang_Type_getModifiedType (T : CXType) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3896
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getModifiedType";
-
- function clang_Cursor_getOffsetOfField (C : CXCursor) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3911
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getOffsetOfField";
-
- function clang_Cursor_isAnonymous (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3917
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isAnonymous";
-
- type CXRefQualifierKind is
- (CXRefQualifier_None,
- CXRefQualifier_LValue,
- CXRefQualifier_RValue)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3919
-
- function clang_Type_getNumTemplateArguments (T : CXType) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3932
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getNumTemplateArguments";
-
- function clang_Type_getTemplateArgumentAsType (T : CXType; i : unsigned) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3941
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getTemplateArgumentAsType";
-
- function clang_Type_getCXXRefQualifier (T : CXType) return CXRefQualifierKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3949
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_getCXXRefQualifier";
-
- function clang_Cursor_isBitField (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3955
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isBitField";
-
- function clang_isVirtualBase (arg1 : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3961
- with Import => True,
- Convention => C,
- External_Name => "clang_isVirtualBase";
-
- type CX_CXXAccessSpecifier is
- (CX_CXXInvalidAccessSpecifier,
- CX_CXXPublic,
- CX_CXXProtected,
- CX_CXXPrivate)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3967
-
- function clang_getCXXAccessSpecifier (arg1 : CXCursor) return CX_CXXAccessSpecifier -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3981
- with Import => True,
- Convention => C,
- External_Name => "clang_getCXXAccessSpecifier";
-
- type CX_StorageClass is
- (CX_SC_Invalid,
- CX_SC_None,
- CX_SC_Extern,
- CX_SC_Static,
- CX_SC_PrivateExtern,
- CX_SC_OpenCLWorkGroupLocal,
- CX_SC_Auto,
- CX_SC_Register)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:3987
-
- function clang_Cursor_getStorageClass (arg1 : CXCursor) return CX_StorageClass -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4004
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getStorageClass";
-
- function clang_getNumOverloadedDecls (cursor : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4015
- with Import => True,
- Convention => C,
- External_Name => "clang_getNumOverloadedDecls";
-
- function clang_getOverloadedDecl (cursor : CXCursor; index : unsigned) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4031
- with Import => True,
- Convention => C,
- External_Name => "clang_getOverloadedDecl";
-
- function clang_getIBOutletCollectionType (arg1 : CXCursor) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4049
- with Import => True,
- Convention => C,
- External_Name => "clang_getIBOutletCollectionType";
-
- type CXChildVisitResult is
- (CXChildVisit_Break,
- CXChildVisit_Continue,
- CXChildVisit_Recurse)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4071
-
- type CXCursorVisitor is access function
- (arg1 : CXCursor;
- arg2 : CXCursor;
- arg3 : CXClientData) return CXChildVisitResult
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4100
-
- function clang_visitChildren
- (parent : CXCursor;
- visitor : CXCursorVisitor;
- client_data : CXClientData) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4126
- with Import => True,
- Convention => C,
- External_Name => "clang_visitChildren";
-
- function clang_getCursorUSR (arg1 : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4177
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorUSR";
-
- function clang_constructUSR_ObjCClass (class_name : Interfaces.C.Strings.chars_ptr) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4182
- with Import => True,
- Convention => C,
- External_Name => "clang_constructUSR_ObjCClass";
-
- function clang_constructUSR_ObjCCategory (class_name : Interfaces.C.Strings.chars_ptr; category_name : Interfaces.C.Strings.chars_ptr) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4188
- with Import => True,
- Convention => C,
- External_Name => "clang_constructUSR_ObjCCategory";
-
- function clang_constructUSR_ObjCProtocol (protocol_name : Interfaces.C.Strings.chars_ptr) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4195
- with Import => True,
- Convention => C,
- External_Name => "clang_constructUSR_ObjCProtocol";
-
- function clang_constructUSR_ObjCIvar (name : Interfaces.C.Strings.chars_ptr; classUSR : clang_c_CXString_h.CXString) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4201
- with Import => True,
- Convention => C,
- External_Name => "clang_constructUSR_ObjCIvar";
-
- function clang_constructUSR_ObjCMethod
- (name : Interfaces.C.Strings.chars_ptr;
- isInstanceMethod : unsigned;
- classUSR : clang_c_CXString_h.CXString) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4208
- with Import => True,
- Convention => C,
- External_Name => "clang_constructUSR_ObjCMethod";
-
- function clang_constructUSR_ObjCProperty (property : Interfaces.C.Strings.chars_ptr; classUSR : clang_c_CXString_h.CXString) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4216
- with Import => True,
- Convention => C,
- External_Name => "clang_constructUSR_ObjCProperty";
-
- function clang_getCursorSpelling (arg1 : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4222
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorSpelling";
-
- function clang_Cursor_getSpellingNameRange
- (arg1 : CXCursor;
- pieceIndex : unsigned;
- options : unsigned) return CXSourceRange -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4235
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getSpellingNameRange";
-
- type CXPrintingPolicy is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4243
-
- subtype CXPrintingPolicyProperty is unsigned;
- CXPrintingPolicy_Indentation : constant unsigned := 0;
- CXPrintingPolicy_SuppressSpecifiers : constant unsigned := 1;
- CXPrintingPolicy_SuppressTagKeyword : constant unsigned := 2;
- CXPrintingPolicy_IncludeTagDefinition : constant unsigned := 3;
- CXPrintingPolicy_SuppressScope : constant unsigned := 4;
- CXPrintingPolicy_SuppressUnwrittenScope : constant unsigned := 5;
- CXPrintingPolicy_SuppressInitializers : constant unsigned := 6;
- CXPrintingPolicy_ConstantArraySizeAsWritten : constant unsigned := 7;
- CXPrintingPolicy_AnonymousTagLocations : constant unsigned := 8;
- CXPrintingPolicy_SuppressStrongLifetime : constant unsigned := 9;
- CXPrintingPolicy_SuppressLifetimeQualifiers : constant unsigned := 10;
- CXPrintingPolicy_SuppressTemplateArgsInCXXConstructors : constant unsigned := 11;
- CXPrintingPolicy_Bool : constant unsigned := 12;
- CXPrintingPolicy_Restrict : constant unsigned := 13;
- CXPrintingPolicy_Alignof : constant unsigned := 14;
- CXPrintingPolicy_UnderscoreAlignof : constant unsigned := 15;
- CXPrintingPolicy_UseVoidForZeroParams : constant unsigned := 16;
- CXPrintingPolicy_TerseOutput : constant unsigned := 17;
- CXPrintingPolicy_PolishForDeclaration : constant unsigned := 18;
- CXPrintingPolicy_Half : constant unsigned := 19;
- CXPrintingPolicy_MSWChar : constant unsigned := 20;
- CXPrintingPolicy_IncludeNewlines : constant unsigned := 21;
- CXPrintingPolicy_MSVCFormatting : constant unsigned := 22;
- CXPrintingPolicy_ConstantsAsWritten : constant unsigned := 23;
- CXPrintingPolicy_SuppressImplicitBase : constant unsigned := 24;
- CXPrintingPolicy_FullyQualifiedName : constant unsigned := 25;
- CXPrintingPolicy_LastProperty : constant unsigned := 25; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4250
-
- function clang_PrintingPolicy_getProperty (Policy : CXPrintingPolicy; Property : CXPrintingPolicyProperty) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4285
- with Import => True,
- Convention => C,
- External_Name => "clang_PrintingPolicy_getProperty";
-
- procedure clang_PrintingPolicy_setProperty
- (Policy : CXPrintingPolicy;
- Property : CXPrintingPolicyProperty;
- Value : unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4291
- with Import => True,
- Convention => C,
- External_Name => "clang_PrintingPolicy_setProperty";
-
- function clang_getCursorPrintingPolicy (arg1 : CXCursor) return CXPrintingPolicy -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4301
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorPrintingPolicy";
-
- procedure clang_PrintingPolicy_dispose (Policy : CXPrintingPolicy) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4306
- with Import => True,
- Convention => C,
- External_Name => "clang_PrintingPolicy_dispose";
-
- function clang_getCursorPrettyPrinted (Cursor : CXCursor; Policy : CXPrintingPolicy) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4319
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorPrettyPrinted";
-
- function clang_getCursorDisplayName (arg1 : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4329
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorDisplayName";
-
- function clang_getCursorReferenced (arg1 : CXCursor) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4341
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorReferenced";
-
- function clang_getCursorDefinition (arg1 : CXCursor) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4371
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorDefinition";
-
- function clang_isCursorDefinition (arg1 : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4377
- with Import => True,
- Convention => C,
- External_Name => "clang_isCursorDefinition";
-
- function clang_getCanonicalCursor (arg1 : CXCursor) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4403
- with Import => True,
- Convention => C,
- External_Name => "clang_getCanonicalCursor";
-
- function clang_Cursor_getObjCSelectorIndex (arg1 : CXCursor) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4416
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getObjCSelectorIndex";
-
- function clang_Cursor_isDynamicCall (C : CXCursor) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4429
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isDynamicCall";
-
- function clang_Cursor_getReceiverType (C : CXCursor) return CXType -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4435
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getReceiverType";
-
- subtype CXObjCPropertyAttrKind is unsigned;
- CXObjCPropertyAttr_noattr : constant unsigned := 0;
- CXObjCPropertyAttr_readonly : constant unsigned := 1;
- CXObjCPropertyAttr_getter : constant unsigned := 2;
- CXObjCPropertyAttr_assign : constant unsigned := 4;
- CXObjCPropertyAttr_readwrite : constant unsigned := 8;
- CXObjCPropertyAttr_retain : constant unsigned := 16;
- CXObjCPropertyAttr_copy : constant unsigned := 32;
- CXObjCPropertyAttr_nonatomic : constant unsigned := 64;
- CXObjCPropertyAttr_setter : constant unsigned := 128;
- CXObjCPropertyAttr_atomic : constant unsigned := 256;
- CXObjCPropertyAttr_weak : constant unsigned := 512;
- CXObjCPropertyAttr_strong : constant unsigned := 1024;
- CXObjCPropertyAttr_unsafe_unretained : constant unsigned := 2048;
- CXObjCPropertyAttr_class : constant unsigned := 4096; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4455
-
- function clang_Cursor_getObjCPropertyAttributes (C : CXCursor; reserved : unsigned) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4464
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getObjCPropertyAttributes";
-
- function clang_Cursor_getObjCPropertyGetterName (C : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4471
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getObjCPropertyGetterName";
-
- function clang_Cursor_getObjCPropertySetterName (C : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4477
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getObjCPropertySetterName";
-
- subtype CXObjCDeclQualifierKind is unsigned;
- CXObjCDeclQualifier_None : constant unsigned := 0;
- CXObjCDeclQualifier_In : constant unsigned := 1;
- CXObjCDeclQualifier_Inout : constant unsigned := 2;
- CXObjCDeclQualifier_Out : constant unsigned := 4;
- CXObjCDeclQualifier_Bycopy : constant unsigned := 8;
- CXObjCDeclQualifier_Byref : constant unsigned := 16;
- CXObjCDeclQualifier_Oneway : constant unsigned := 32; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4491
-
- function clang_Cursor_getObjCDeclQualifiers (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4499
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getObjCDeclQualifiers";
-
- function clang_Cursor_isObjCOptional (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4506
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isObjCOptional";
-
- function clang_Cursor_isVariadic (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4511
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isVariadic";
-
- function clang_Cursor_isExternalSymbol
- (C : CXCursor;
- language : access clang_c_CXString_h.CXString;
- definedIn : access clang_c_CXString_h.CXString;
- isGenerated : access unsigned) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4526
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_isExternalSymbol";
-
- function clang_Cursor_getCommentRange (C : CXCursor) return CXSourceRange -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4535
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getCommentRange";
-
- function clang_Cursor_getRawCommentText (C : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4541
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getRawCommentText";
-
- function clang_Cursor_getBriefCommentText (C : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4548
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getBriefCommentText";
-
- function clang_Cursor_getMangling (arg1 : CXCursor) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4562
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getMangling";
-
- function clang_Cursor_getCXXManglings (arg1 : CXCursor) return access clang_c_CXString_h.CXStringSet -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4568
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getCXXManglings";
-
- function clang_Cursor_getObjCManglings (arg1 : CXCursor) return access clang_c_CXString_h.CXStringSet -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4574
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getObjCManglings";
-
- type CXModule is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4588
-
- function clang_Cursor_getModule (C : CXCursor) return CXModule -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4593
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_getModule";
-
- function clang_getModuleForFile (arg1 : CXTranslationUnit; arg2 : CXFile) return CXModule -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4599
- with Import => True,
- Convention => C,
- External_Name => "clang_getModuleForFile";
-
- function clang_Module_getASTFile (Module : CXModule) return CXFile -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4606
- with Import => True,
- Convention => C,
- External_Name => "clang_Module_getASTFile";
-
- function clang_Module_getParent (Module : CXModule) return CXModule -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4614
- with Import => True,
- Convention => C,
- External_Name => "clang_Module_getParent";
-
- function clang_Module_getName (Module : CXModule) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4622
- with Import => True,
- Convention => C,
- External_Name => "clang_Module_getName";
-
- function clang_Module_getFullName (Module : CXModule) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4629
- with Import => True,
- Convention => C,
- External_Name => "clang_Module_getFullName";
-
- function clang_Module_isSystem (Module : CXModule) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4636
- with Import => True,
- Convention => C,
- External_Name => "clang_Module_isSystem";
-
- function clang_Module_getNumTopLevelHeaders (arg1 : CXTranslationUnit; Module : CXModule) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4643
- with Import => True,
- Convention => C,
- External_Name => "clang_Module_getNumTopLevelHeaders";
-
- function clang_Module_getTopLevelHeader
- (arg1 : CXTranslationUnit;
- Module : CXModule;
- Index : unsigned) return CXFile -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4654
- with Import => True,
- Convention => C,
- External_Name => "clang_Module_getTopLevelHeader";
-
- function clang_CXXConstructor_isConvertingConstructor (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4673
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXConstructor_isConvertingConstructor";
-
- function clang_CXXConstructor_isCopyConstructor (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4678
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXConstructor_isCopyConstructor";
-
- function clang_CXXConstructor_isDefaultConstructor (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4683
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXConstructor_isDefaultConstructor";
-
- function clang_CXXConstructor_isMoveConstructor (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4688
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXConstructor_isMoveConstructor";
-
- function clang_CXXField_isMutable (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4693
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXField_isMutable";
-
- function clang_CXXMethod_isDefaulted (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4698
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXMethod_isDefaulted";
-
- function clang_CXXMethod_isPureVirtual (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4704
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXMethod_isPureVirtual";
-
- function clang_CXXMethod_isStatic (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4710
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXMethod_isStatic";
-
- function clang_CXXMethod_isVirtual (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4717
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXMethod_isVirtual";
-
- function clang_CXXRecord_isAbstract (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4723
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXRecord_isAbstract";
-
- function clang_EnumDecl_isScoped (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4728
- with Import => True,
- Convention => C,
- External_Name => "clang_EnumDecl_isScoped";
-
- function clang_CXXMethod_isConst (C : CXCursor) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4734
- with Import => True,
- Convention => C,
- External_Name => "clang_CXXMethod_isConst";
-
- function clang_getTemplateCursorKind (C : CXCursor) return CXCursorKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4753
- with Import => True,
- Convention => C,
- External_Name => "clang_getTemplateCursorKind";
-
- function clang_getSpecializedCursorTemplate (C : CXCursor) return CXCursor -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4783
- with Import => True,
- Convention => C,
- External_Name => "clang_getSpecializedCursorTemplate";
-
- function clang_getCursorReferenceNameRange
- (C : CXCursor;
- NameFlags : unsigned;
- PieceIndex : unsigned) return CXSourceRange -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4803
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorReferenceNameRange";
-
- subtype CXNameRefFlags is unsigned;
- CXNameRange_WantQualifier : constant unsigned := 1;
- CXNameRange_WantTemplateArgs : constant unsigned := 2;
- CXNameRange_WantSinglePiece : constant unsigned := 4; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4807
-
- type CXTokenKind is
- (CXToken_Punctuation,
- CXToken_Keyword,
- CXToken_Identifier,
- CXToken_Literal,
- CXToken_Comment)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4850
-
- -- skipped anonymous struct anon_12
-
- type CXToken_int_data_array is array (0 .. 3) of aliased unsigned;
- type CXToken is record
- int_data : aliased CXToken_int_data_array; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4881
- ptr_data : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4882
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4883
-
- function clang_getToken (TU : CXTranslationUnit; Location : CXSourceLocation) return access CXToken -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4896
- with Import => True,
- Convention => C,
- External_Name => "clang_getToken";
-
- function clang_getTokenKind (arg1 : CXToken) return CXTokenKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4902
- with Import => True,
- Convention => C,
- External_Name => "clang_getTokenKind";
-
- function clang_getTokenSpelling (arg1 : CXTranslationUnit; arg2 : CXToken) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4910
- with Import => True,
- Convention => C,
- External_Name => "clang_getTokenSpelling";
-
- function clang_getTokenLocation (arg1 : CXTranslationUnit; arg2 : CXToken) return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4915
- with Import => True,
- Convention => C,
- External_Name => "clang_getTokenLocation";
-
- function clang_getTokenExtent (arg1 : CXTranslationUnit; arg2 : CXToken) return CXSourceRange -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4921
- with Import => True,
- Convention => C,
- External_Name => "clang_getTokenExtent";
-
- procedure clang_tokenize
- (TU : CXTranslationUnit;
- c_Range : CXSourceRange;
- Tokens : System.Address;
- NumTokens : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4940
- with Import => True,
- Convention => C,
- External_Name => "clang_tokenize";
-
- procedure clang_annotateTokens
- (TU : CXTranslationUnit;
- Tokens : access CXToken;
- NumTokens : unsigned;
- Cursors : access CXCursor) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4973
- with Import => True,
- Convention => C,
- External_Name => "clang_annotateTokens";
-
- procedure clang_disposeTokens
- (TU : CXTranslationUnit;
- Tokens : access CXToken;
- NumTokens : unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4980
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeTokens";
-
- function clang_getCursorKindSpelling (Kind : CXCursorKind) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4997
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorKindSpelling";
-
- procedure clang_getDefinitionSpellingAndExtent
- (arg1 : CXCursor;
- startBuf : System.Address;
- endBuf : System.Address;
- startLine : access unsigned;
- startColumn : access unsigned;
- endLine : access unsigned;
- endColumn : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:4998
- with Import => True,
- Convention => C,
- External_Name => "clang_getDefinitionSpellingAndExtent";
-
- procedure clang_enableStackTraces -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5005
- with Import => True,
- Convention => C,
- External_Name => "clang_enableStackTraces";
-
- procedure clang_executeOnThread
- (fn : access procedure (arg1 : System.Address);
- user_data : System.Address;
- stack_size : unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5006
- with Import => True,
- Convention => C,
- External_Name => "clang_executeOnThread";
-
- type CXCompletionString is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5038
-
- -- skipped anonymous struct anon_13
-
- type CXCompletionResult is record
- CursorKind : aliased CXCursorKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5054
- CompletionString : CXCompletionString; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5060
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5061
-
- type CXCompletionChunkKind is
- (CXCompletionChunk_Optional,
- CXCompletionChunk_TypedText,
- CXCompletionChunk_Text,
- CXCompletionChunk_Placeholder,
- CXCompletionChunk_Informative,
- CXCompletionChunk_CurrentParameter,
- CXCompletionChunk_LeftParen,
- CXCompletionChunk_RightParen,
- CXCompletionChunk_LeftBracket,
- CXCompletionChunk_RightBracket,
- CXCompletionChunk_LeftBrace,
- CXCompletionChunk_RightBrace,
- CXCompletionChunk_LeftAngle,
- CXCompletionChunk_RightAngle,
- CXCompletionChunk_Comma,
- CXCompletionChunk_ResultType,
- CXCompletionChunk_Colon,
- CXCompletionChunk_SemiColon,
- CXCompletionChunk_Equal,
- CXCompletionChunk_HorizontalSpace,
- CXCompletionChunk_VerticalSpace)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5070
-
- function clang_getCompletionChunkKind (completion_string : CXCompletionString; chunk_number : unsigned) return CXCompletionChunkKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5244
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionChunkKind";
-
- function clang_getCompletionChunkText (completion_string : CXCompletionString; chunk_number : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5258
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionChunkText";
-
- function clang_getCompletionChunkCompletionString (completion_string : CXCompletionString; chunk_number : unsigned) return CXCompletionString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5273
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionChunkCompletionString";
-
- function clang_getNumCompletionChunks (completion_string : CXCompletionString) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5280
- with Import => True,
- Convention => C,
- External_Name => "clang_getNumCompletionChunks";
-
- function clang_getCompletionPriority (completion_string : CXCompletionString) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5295
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionPriority";
-
- function clang_getCompletionAvailability (completion_string : CXCompletionString) return CXAvailabilityKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5306
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionAvailability";
-
- function clang_getCompletionNumAnnotations (completion_string : CXCompletionString) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5318
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionNumAnnotations";
-
- function clang_getCompletionAnnotation (completion_string : CXCompletionString; annotation_number : unsigned) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5332
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionAnnotation";
-
- function clang_getCompletionParent (completion_string : CXCompletionString; kind : access CXCursorKind) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5352
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionParent";
-
- function clang_getCompletionBriefComment (completion_string : CXCompletionString) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5360
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionBriefComment";
-
- function clang_getCursorCompletionString (cursor : CXCursor) return CXCompletionString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5372
- with Import => True,
- Convention => C,
- External_Name => "clang_getCursorCompletionString";
-
- -- skipped anonymous struct anon_14
-
- type CXCodeCompleteResults is record
- Results : access CXCompletionResult; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5385
- NumResults : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5391
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5392
-
- function clang_getCompletionNumFixIts (results : access CXCodeCompleteResults; completion_index : unsigned) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5408
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionNumFixIts";
-
- function clang_getCompletionFixIt
- (results : access CXCodeCompleteResults;
- completion_index : unsigned;
- fixit_index : unsigned;
- replacement_range : access CXSourceRange) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5454
- with Import => True,
- Convention => C,
- External_Name => "clang_getCompletionFixIt";
-
- subtype CXCodeComplete_Flags is unsigned;
- CXCodeComplete_IncludeMacros : constant unsigned := 1;
- CXCodeComplete_IncludeCodePatterns : constant unsigned := 2;
- CXCodeComplete_IncludeBriefComments : constant unsigned := 4;
- CXCodeComplete_SkipPreamble : constant unsigned := 8;
- CXCodeComplete_IncludeCompletionsWithFixIts : constant unsigned := 16; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5465
-
- subtype CXCompletionContext is unsigned;
- CXCompletionContext_Unexposed : constant unsigned := 0;
- CXCompletionContext_AnyType : constant unsigned := 1;
- CXCompletionContext_AnyValue : constant unsigned := 2;
- CXCompletionContext_ObjCObjectValue : constant unsigned := 4;
- CXCompletionContext_ObjCSelectorValue : constant unsigned := 8;
- CXCompletionContext_CXXClassTypeValue : constant unsigned := 16;
- CXCompletionContext_DotMemberAccess : constant unsigned := 32;
- CXCompletionContext_ArrowMemberAccess : constant unsigned := 64;
- CXCompletionContext_ObjCPropertyAccess : constant unsigned := 128;
- CXCompletionContext_EnumTag : constant unsigned := 256;
- CXCompletionContext_UnionTag : constant unsigned := 512;
- CXCompletionContext_StructTag : constant unsigned := 1024;
- CXCompletionContext_ClassTag : constant unsigned := 2048;
- CXCompletionContext_Namespace : constant unsigned := 4096;
- CXCompletionContext_NestedNameSpecifier : constant unsigned := 8192;
- CXCompletionContext_ObjCInterface : constant unsigned := 16384;
- CXCompletionContext_ObjCProtocol : constant unsigned := 32768;
- CXCompletionContext_ObjCCategory : constant unsigned := 65536;
- CXCompletionContext_ObjCInstanceMessage : constant unsigned := 131072;
- CXCompletionContext_ObjCClassMessage : constant unsigned := 262144;
- CXCompletionContext_ObjCSelectorName : constant unsigned := 524288;
- CXCompletionContext_MacroName : constant unsigned := 1048576;
- CXCompletionContext_NaturalLanguage : constant unsigned := 2097152;
- CXCompletionContext_IncludedFile : constant unsigned := 4194304;
- CXCompletionContext_Unknown : constant unsigned := 8388607; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5504
-
- function clang_defaultCodeCompleteOptions return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5638
- with Import => True,
- Convention => C,
- External_Name => "clang_defaultCodeCompleteOptions";
-
- function clang_codeCompleteAt
- (TU : CXTranslationUnit;
- complete_filename : Interfaces.C.Strings.chars_ptr;
- complete_line : unsigned;
- complete_column : unsigned;
- unsaved_files : access CXUnsavedFile;
- num_unsaved_files : unsigned;
- options : unsigned) return access CXCodeCompleteResults -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5709
- with Import => True,
- Convention => C,
- External_Name => "clang_codeCompleteAt";
-
- procedure clang_sortCodeCompletionResults (Results : access CXCompletionResult; NumResults : unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5725
- with Import => True,
- Convention => C,
- External_Name => "clang_sortCodeCompletionResults";
-
- procedure clang_disposeCodeCompleteResults (Results : access CXCodeCompleteResults) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5732
- with Import => True,
- Convention => C,
- External_Name => "clang_disposeCodeCompleteResults";
-
- function clang_codeCompleteGetNumDiagnostics (Results : access CXCodeCompleteResults) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5739
- with Import => True,
- Convention => C,
- External_Name => "clang_codeCompleteGetNumDiagnostics";
-
- function clang_codeCompleteGetDiagnostic (Results : access CXCodeCompleteResults; Index : unsigned) return CXDiagnostic -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5751
- with Import => True,
- Convention => C,
- External_Name => "clang_codeCompleteGetDiagnostic";
-
- function clang_codeCompleteGetContexts (Results : access CXCodeCompleteResults) return Extensions.unsigned_long_long -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5764
- with Import => True,
- Convention => C,
- External_Name => "clang_codeCompleteGetContexts";
-
- function clang_codeCompleteGetContainerKind (Results : access CXCodeCompleteResults; IsIncomplete : access unsigned) return CXCursorKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5784
- with Import => True,
- Convention => C,
- External_Name => "clang_codeCompleteGetContainerKind";
-
- function clang_codeCompleteGetContainerUSR (Results : access CXCodeCompleteResults) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5798
- with Import => True,
- Convention => C,
- External_Name => "clang_codeCompleteGetContainerUSR";
-
- function clang_codeCompleteGetObjCSelector (Results : access CXCodeCompleteResults) return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5812
- with Import => True,
- Convention => C,
- External_Name => "clang_codeCompleteGetObjCSelector";
-
- function clang_getClangVersion return clang_c_CXString_h.CXString -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5828
- with Import => True,
- Convention => C,
- External_Name => "clang_getClangVersion";
-
- procedure clang_toggleCrashRecovery (isEnabled : unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5836
- with Import => True,
- Convention => C,
- External_Name => "clang_toggleCrashRecovery";
-
- type CXInclusionVisitor is access procedure
- (arg1 : CXFile;
- arg2 : access CXSourceLocation;
- arg3 : unsigned;
- arg4 : CXClientData)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5849
-
- procedure clang_getInclusions
- (tu : CXTranslationUnit;
- visitor : CXInclusionVisitor;
- client_data : CXClientData) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5860
- with Import => True,
- Convention => C,
- External_Name => "clang_getInclusions";
-
- subtype CXEvalResultKind is unsigned;
- CXEval_Int : constant unsigned := 1;
- CXEval_Float : constant unsigned := 2;
- CXEval_ObjCStrLiteral : constant unsigned := 3;
- CXEval_StrLiteral : constant unsigned := 4;
- CXEval_CFStr : constant unsigned := 5;
- CXEval_Other : constant unsigned := 6;
- CXEval_UnExposed : constant unsigned := 0; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5874
-
- type CXEvalResult is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5879
-
- function clang_Cursor_Evaluate (C : CXCursor) return CXEvalResult -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5886
- with Import => True,
- Convention => C,
- External_Name => "clang_Cursor_Evaluate";
-
- function clang_EvalResult_getKind (E : CXEvalResult) return CXEvalResultKind -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5891
- with Import => True,
- Convention => C,
- External_Name => "clang_EvalResult_getKind";
-
- function clang_EvalResult_getAsInt (E : CXEvalResult) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5897
- with Import => True,
- Convention => C,
- External_Name => "clang_EvalResult_getAsInt";
-
- function clang_EvalResult_getAsLongLong (E : CXEvalResult) return Long_Long_Integer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5904
- with Import => True,
- Convention => C,
- External_Name => "clang_EvalResult_getAsLongLong";
-
- function clang_EvalResult_isUnsignedInt (E : CXEvalResult) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5910
- with Import => True,
- Convention => C,
- External_Name => "clang_EvalResult_isUnsignedInt";
-
- function clang_EvalResult_getAsUnsigned (E : CXEvalResult) return Extensions.unsigned_long_long -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5916
- with Import => True,
- Convention => C,
- External_Name => "clang_EvalResult_getAsUnsigned";
-
- function clang_EvalResult_getAsDouble (E : CXEvalResult) return double -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5922
- with Import => True,
- Convention => C,
- External_Name => "clang_EvalResult_getAsDouble";
-
- function clang_EvalResult_getAsStr (E : CXEvalResult) return Interfaces.C.Strings.chars_ptr -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5930
- with Import => True,
- Convention => C,
- External_Name => "clang_EvalResult_getAsStr";
-
- procedure clang_EvalResult_dispose (E : CXEvalResult) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5935
- with Import => True,
- Convention => C,
- External_Name => "clang_EvalResult_dispose";
-
- type CXRemapping is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5948
-
- function clang_getRemappings (path : Interfaces.C.Strings.chars_ptr) return CXRemapping -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5958
- with Import => True,
- Convention => C,
- External_Name => "clang_getRemappings";
-
- function clang_getRemappingsFromFileList (filePaths : System.Address; numFiles : unsigned) return CXRemapping -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5971
- with Import => True,
- Convention => C,
- External_Name => "clang_getRemappingsFromFileList";
-
- function clang_remap_getNumFiles (arg1 : CXRemapping) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5977
- with Import => True,
- Convention => C,
- External_Name => "clang_remap_getNumFiles";
-
- procedure clang_remap_getFilenames
- (arg1 : CXRemapping;
- index : unsigned;
- original : access clang_c_CXString_h.CXString;
- transformed : access clang_c_CXString_h.CXString) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5987
- with Import => True,
- Convention => C,
- External_Name => "clang_remap_getFilenames";
-
- procedure clang_remap_dispose (arg1 : CXRemapping) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:5993
- with Import => True,
- Convention => C,
- External_Name => "clang_remap_dispose";
-
- type CXVisitorResult is
- (CXVisit_Break,
- CXVisit_Continue)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6004
-
- type CXCursorAndRangeVisitor is record
- context : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6010
- visit : access function
- (arg1 : System.Address;
- arg2 : CXCursor;
- arg3 : CXSourceRange) return CXVisitorResult; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6011
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6009
-
- type CXResult is
- (CXResult_Success,
- CXResult_Invalid,
- CXResult_VisitBreak)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6029
-
- function clang_findReferencesInFile
- (cursor : CXCursor;
- file : CXFile;
- visitor : CXCursorAndRangeVisitor) return CXResult -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6045
- with Import => True,
- Convention => C,
- External_Name => "clang_findReferencesInFile";
-
- function clang_findIncludesInFile
- (TU : CXTranslationUnit;
- file : CXFile;
- visitor : CXCursorAndRangeVisitor) return CXResult -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6060
- with Import => True,
- Convention => C,
- External_Name => "clang_findIncludesInFile";
-
- type CXIdxClientFile is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6084
-
- type CXIdxClientEntity is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6089
-
- type CXIdxClientContainer is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6095
-
- type CXIdxClientASTFile is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6101
-
- -- skipped anonymous struct anon_17
-
- type CXIdxLoc_ptr_data_array is array (0 .. 1) of System.Address;
- type CXIdxLoc is record
- ptr_data : CXIdxLoc_ptr_data_array; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6107
- int_data : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6108
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6109
-
- -- skipped anonymous struct anon_18
-
- type CXIdxIncludedFileInfo is record
- hashLoc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6118
- filename : Interfaces.C.Strings.chars_ptr; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6122
- file : CXFile; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6126
- isImport : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6127
- isAngled : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6128
- isModuleImport : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6133
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6134
-
- -- skipped anonymous struct anon_19
-
- type CXIdxImportedASTFileInfo is record
- file : CXFile; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6143
- module : CXModule; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6147
- loc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6151
- isImplicit : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6156
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6158
-
- type CXIdxEntityKind is
- (CXIdxEntity_Unexposed,
- CXIdxEntity_Typedef,
- CXIdxEntity_Function,
- CXIdxEntity_Variable,
- CXIdxEntity_Field,
- CXIdxEntity_EnumConstant,
- CXIdxEntity_ObjCClass,
- CXIdxEntity_ObjCProtocol,
- CXIdxEntity_ObjCCategory,
- CXIdxEntity_ObjCInstanceMethod,
- CXIdxEntity_ObjCClassMethod,
- CXIdxEntity_ObjCProperty,
- CXIdxEntity_ObjCIvar,
- CXIdxEntity_Enum,
- CXIdxEntity_Struct,
- CXIdxEntity_Union,
- CXIdxEntity_CXXClass,
- CXIdxEntity_CXXNamespace,
- CXIdxEntity_CXXNamespaceAlias,
- CXIdxEntity_CXXStaticVariable,
- CXIdxEntity_CXXStaticMethod,
- CXIdxEntity_CXXInstanceMethod,
- CXIdxEntity_CXXConstructor,
- CXIdxEntity_CXXDestructor,
- CXIdxEntity_CXXConversionFunction,
- CXIdxEntity_CXXTypeAlias,
- CXIdxEntity_CXXInterface)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6193
-
- type CXIdxEntityLanguage is
- (CXIdxEntityLang_None,
- CXIdxEntityLang_C,
- CXIdxEntityLang_ObjC,
- CXIdxEntityLang_CXX,
- CXIdxEntityLang_Swift)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6201
-
- type CXIdxEntityCXXTemplateKind is
- (CXIdxEntity_NonTemplate,
- CXIdxEntity_Template,
- CXIdxEntity_TemplatePartialSpecialization,
- CXIdxEntity_TemplateSpecialization)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6218
-
- type CXIdxAttrKind is
- (CXIdxAttr_Unexposed,
- CXIdxAttr_IBAction,
- CXIdxAttr_IBOutlet,
- CXIdxAttr_IBOutletCollection)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6225
-
- -- skipped anonymous struct anon_24
-
- type CXIdxAttrInfo is record
- kind : aliased CXIdxAttrKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6228
- cursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6229
- loc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6230
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6231
-
- -- skipped anonymous struct anon_25
-
- type CXIdxEntityInfo is record
- kind : aliased CXIdxEntityKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6234
- templateKind : aliased CXIdxEntityCXXTemplateKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6235
- lang : aliased CXIdxEntityLanguage; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6236
- name : Interfaces.C.Strings.chars_ptr; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6237
- USR : Interfaces.C.Strings.chars_ptr; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6238
- cursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6239
- attributes : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6240
- numAttributes : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6241
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6242
-
- -- skipped anonymous struct anon_26
-
- type CXIdxContainerInfo is record
- cursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6245
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6246
-
- -- skipped anonymous struct anon_27
-
- type CXIdxIBOutletCollectionAttrInfo is record
- attrInfo : access constant CXIdxAttrInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6249
- objcClass : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6250
- classCursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6251
- classLoc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6252
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6253
-
- subtype CXIdxDeclInfoFlags is unsigned;
- CXIdxDeclFlag_Skipped : constant unsigned := 1; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6257
-
- -- skipped anonymous struct anon_29
-
- type CXIdxDeclInfo is record
- entityInfo : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6260
- cursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6261
- loc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6262
- semanticContainer : access constant CXIdxContainerInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6263
- lexicalContainer : access constant CXIdxContainerInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6268
- isRedeclaration : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6269
- isDefinition : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6270
- isContainer : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6271
- declAsContainer : access constant CXIdxContainerInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6272
- isImplicit : aliased int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6277
- attributes : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6278
- numAttributes : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6279
- flags : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6281
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6283
-
- type CXIdxObjCContainerKind is
- (CXIdxObjCContainer_ForwardRef,
- CXIdxObjCContainer_Interface,
- CXIdxObjCContainer_Implementation)
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6289
-
- -- skipped anonymous struct anon_31
-
- type CXIdxObjCContainerDeclInfo is record
- declInfo : access constant CXIdxDeclInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6292
- kind : aliased CXIdxObjCContainerKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6293
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6294
-
- -- skipped anonymous struct anon_32
-
- type CXIdxBaseClassInfo is record
- base : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6297
- cursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6298
- loc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6299
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6300
-
- -- skipped anonymous struct anon_33
-
- type CXIdxObjCProtocolRefInfo is record
- protocol : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6303
- cursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6304
- loc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6305
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6306
-
- -- skipped anonymous struct anon_34
-
- type CXIdxObjCProtocolRefListInfo is record
- protocols : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6309
- numProtocols : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6310
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6311
-
- -- skipped anonymous struct anon_35
-
- type CXIdxObjCInterfaceDeclInfo is record
- containerInfo : access constant CXIdxObjCContainerDeclInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6314
- superInfo : access constant CXIdxBaseClassInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6315
- protocols : access constant CXIdxObjCProtocolRefListInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6316
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6317
-
- -- skipped anonymous struct anon_36
-
- type CXIdxObjCCategoryDeclInfo is record
- containerInfo : access constant CXIdxObjCContainerDeclInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6320
- objcClass : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6321
- classCursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6322
- classLoc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6323
- protocols : access constant CXIdxObjCProtocolRefListInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6324
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6325
-
- -- skipped anonymous struct anon_37
-
- type CXIdxObjCPropertyDeclInfo is record
- declInfo : access constant CXIdxDeclInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6328
- getter : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6329
- setter : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6330
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6331
-
- -- skipped anonymous struct anon_38
-
- type CXIdxCXXClassDeclInfo is record
- declInfo : access constant CXIdxDeclInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6334
- bases : System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6335
- numBases : aliased unsigned; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6336
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6337
-
- subtype CXIdxEntityRefKind is unsigned;
- CXIdxEntityRef_Direct : constant unsigned := 1;
- CXIdxEntityRef_Implicit : constant unsigned := 2; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6355
-
- subtype CXSymbolRole is unsigned;
- CXSymbolRole_None : constant unsigned := 0;
- CXSymbolRole_Declaration : constant unsigned := 1;
- CXSymbolRole_Definition : constant unsigned := 2;
- CXSymbolRole_Reference : constant unsigned := 4;
- CXSymbolRole_Read : constant unsigned := 8;
- CXSymbolRole_Write : constant unsigned := 16;
- CXSymbolRole_Call : constant unsigned := 32;
- CXSymbolRole_Dynamic : constant unsigned := 64;
- CXSymbolRole_AddressOf : constant unsigned := 128;
- CXSymbolRole_Implicit : constant unsigned := 256; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6374
-
- -- skipped anonymous struct anon_41
-
- type CXIdxEntityRefInfo is record
- kind : aliased CXIdxEntityRefKind; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6380
- cursor : aliased CXCursor; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6384
- loc : aliased CXIdxLoc; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6385
- referencedEntity : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6389
- parentEntity : access constant CXIdxEntityInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6401
- container : access constant CXIdxContainerInfo; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6405
- role : aliased CXSymbolRole; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6409
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6410
-
- -- skipped anonymous struct anon_42
-
- type IndexerCallbacks is record
- abortQuery : access function (arg1 : CXClientData; arg2 : System.Address) return int; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6421
- diagnostic : access procedure
- (arg1 : CXClientData;
- arg2 : CXDiagnosticSet;
- arg3 : System.Address); -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6427
- enteredMainFile : access function
- (arg1 : CXClientData;
- arg2 : CXFile;
- arg3 : System.Address) return CXIdxClientFile; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6430
- ppIncludedFile : access function (arg1 : CXClientData; arg2 : access constant CXIdxIncludedFileInfo) return CXIdxClientFile; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6436
- importedASTFile : access function (arg1 : CXClientData; arg2 : access constant CXIdxImportedASTFileInfo) return CXIdxClientASTFile; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6447
- startedTranslationUnit : access function (arg1 : CXClientData; arg2 : System.Address) return CXIdxClientContainer; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6453
- indexDeclaration : access procedure (arg1 : CXClientData; arg2 : access constant CXIdxDeclInfo); -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6456
- indexEntityReference : access procedure (arg1 : CXClientData; arg2 : access constant CXIdxEntityRefInfo); -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6462
- end record
- with Convention => C_Pass_By_Copy; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6464
-
- function clang_index_isEntityObjCContainerKind (arg1 : CXIdxEntityKind) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6466
- with Import => True,
- Convention => C,
- External_Name => "clang_index_isEntityObjCContainerKind";
-
- function clang_index_getObjCContainerDeclInfo (arg1 : access constant CXIdxDeclInfo) return access constant CXIdxObjCContainerDeclInfo -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6468
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getObjCContainerDeclInfo";
-
- function clang_index_getObjCInterfaceDeclInfo (arg1 : access constant CXIdxDeclInfo) return access constant CXIdxObjCInterfaceDeclInfo -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6471
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getObjCInterfaceDeclInfo";
-
- function clang_index_getObjCCategoryDeclInfo (arg1 : access constant CXIdxDeclInfo) return access constant CXIdxObjCCategoryDeclInfo -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6475
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getObjCCategoryDeclInfo";
-
- function clang_index_getObjCProtocolRefListInfo (arg1 : access constant CXIdxDeclInfo) return access constant CXIdxObjCProtocolRefListInfo -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6478
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getObjCProtocolRefListInfo";
-
- function clang_index_getObjCPropertyDeclInfo (arg1 : access constant CXIdxDeclInfo) return access constant CXIdxObjCPropertyDeclInfo -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6481
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getObjCPropertyDeclInfo";
-
- function clang_index_getIBOutletCollectionAttrInfo (arg1 : access constant CXIdxAttrInfo) return access constant CXIdxIBOutletCollectionAttrInfo -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6484
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getIBOutletCollectionAttrInfo";
-
- function clang_index_getCXXClassDeclInfo (arg1 : access constant CXIdxDeclInfo) return access constant CXIdxCXXClassDeclInfo -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6487
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getCXXClassDeclInfo";
-
- function clang_index_getClientContainer (arg1 : access constant CXIdxContainerInfo) return CXIdxClientContainer -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6494
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getClientContainer";
-
- procedure clang_index_setClientContainer (arg1 : access constant CXIdxContainerInfo; arg2 : CXIdxClientContainer) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6501
- with Import => True,
- Convention => C,
- External_Name => "clang_index_setClientContainer";
-
- function clang_index_getClientEntity (arg1 : access constant CXIdxEntityInfo) return CXIdxClientEntity -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6507
- with Import => True,
- Convention => C,
- External_Name => "clang_index_getClientEntity";
-
- procedure clang_index_setClientEntity (arg1 : access constant CXIdxEntityInfo; arg2 : CXIdxClientEntity) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6513
- with Import => True,
- Convention => C,
- External_Name => "clang_index_setClientEntity";
-
- type CXIndexAction is new System.Address; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6519
-
- function clang_IndexAction_create (CIdx : CXIndex) return CXIndexAction -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6527
- with Import => True,
- Convention => C,
- External_Name => "clang_IndexAction_create";
-
- procedure clang_IndexAction_dispose (arg1 : CXIndexAction) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6535
- with Import => True,
- Convention => C,
- External_Name => "clang_IndexAction_dispose";
-
- subtype CXIndexOptFlags is unsigned;
- CXIndexOpt_None : constant unsigned := 0;
- CXIndexOpt_SuppressRedundantRefs : constant unsigned := 1;
- CXIndexOpt_IndexFunctionLocalSymbols : constant unsigned := 2;
- CXIndexOpt_IndexImplicitTemplateInstantiations : constant unsigned := 4;
- CXIndexOpt_SuppressWarnings : constant unsigned := 8;
- CXIndexOpt_SkipParsedBodiesInSession : constant unsigned := 16; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6574
-
- function clang_indexSourceFile
- (arg1 : CXIndexAction;
- client_data : CXClientData;
- index_callbacks : access IndexerCallbacks;
- index_callbacks_size : unsigned;
- index_options : unsigned;
- source_filename : Interfaces.C.Strings.chars_ptr;
- command_line_args : System.Address;
- num_command_line_args : int;
- unsaved_files : access CXUnsavedFile;
- num_unsaved_files : unsigned;
- out_TU : System.Address;
- TU_options : unsigned) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6601
- with Import => True,
- Convention => C,
- External_Name => "clang_indexSourceFile";
-
- function clang_indexSourceFileFullArgv
- (arg1 : CXIndexAction;
- client_data : CXClientData;
- index_callbacks : access IndexerCallbacks;
- index_callbacks_size : unsigned;
- index_options : unsigned;
- source_filename : Interfaces.C.Strings.chars_ptr;
- command_line_args : System.Address;
- num_command_line_args : int;
- unsaved_files : access CXUnsavedFile;
- num_unsaved_files : unsigned;
- out_TU : System.Address;
- TU_options : unsigned) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6619
- with Import => True,
- Convention => C,
- External_Name => "clang_indexSourceFileFullArgv";
-
- function clang_indexTranslationUnit
- (arg1 : CXIndexAction;
- client_data : CXClientData;
- index_callbacks : access IndexerCallbacks;
- index_callbacks_size : unsigned;
- index_options : unsigned;
- arg6 : CXTranslationUnit) return int -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6642
- with Import => True,
- Convention => C,
- External_Name => "clang_indexTranslationUnit";
-
- procedure clang_indexLoc_getFileLocation
- (loc : CXIdxLoc;
- indexFile : System.Address;
- file : System.Address;
- line : access unsigned;
- column : access unsigned;
- offset : access unsigned) -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6657
- with Import => True,
- Convention => C,
- External_Name => "clang_indexLoc_getFileLocation";
-
- function clang_indexLoc_getCXSourceLocation (loc : CXIdxLoc) return CXSourceLocation -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6668
- with Import => True,
- Convention => C,
- External_Name => "clang_indexLoc_getCXSourceLocation";
-
- type CXFieldVisitor is access function (arg1 : CXCursor; arg2 : CXClientData) return CXVisitorResult
- with Convention => C; -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6681
-
- function clang_Type_visitFields
- (T : CXType;
- visitor : CXFieldVisitor;
- client_data : CXClientData) return unsigned -- /export/work/reznik/ancr/src/gps/libclang/cfe-8.0.0.src/include/clang-c/Index.h:6703
- with Import => True,
- Convention => C,
- External_Name => "clang_Type_visitFields";
-
-end clang_c_Index_h;
diff --git a/libclang/gen/stddef_h.ads b/libclang/gen/stddef_h.ads
deleted file mode 100644
index 85fce4afc9..0000000000
--- a/libclang/gen/stddef_h.ads
+++ /dev/null
@@ -1,11 +0,0 @@
-pragma Ada_2012;
-pragma Style_Checks (Off);
-
-with Interfaces.C; use Interfaces.C;
-
-package stddef_h is
-
- -- unsupported macro: NULL __null
- subtype size_t is unsigned_long; -- /export/work/reznik/ancr/sandbox/x86_64-linux/stable-gnat/install/lib/gcc/x86_64-pc-linux-gnu/8.3.1/include/stddef.h:216
-
-end stddef_h;
diff --git a/libclang/gen/xlocale_h.ads b/libclang/gen/xlocale_h.ads
deleted file mode 100644
index 3d88226ee8..0000000000
--- a/libclang/gen/xlocale_h.ads
+++ /dev/null
@@ -1,27 +0,0 @@
-pragma Ada_2012;
-pragma Style_Checks (Off);
-
-with Interfaces.C; use Interfaces.C;
-with Interfaces.C.Strings;
-
-package xlocale_h is
-
- type uu_locale_data;
- type uu_locale_struct_uu_locales_array is array (0 .. 12) of access uu_locale_data;
- type uu_locale_struct_uu_names_array is array (0 .. 12) of Interfaces.C.Strings.chars_ptr;
- type uu_locale_struct is record
- uu_locales : uu_locale_struct_uu_locales_array; -- /usr/include/xlocale.h:30
- uu_ctype_b : access unsigned_short; -- /usr/include/xlocale.h:33
- uu_ctype_tolower : access int; -- /usr/include/xlocale.h:34
- uu_ctype_toupper : access int; -- /usr/include/xlocale.h:35
- uu_names : uu_locale_struct_uu_names_array; -- /usr/include/xlocale.h:38
- end record
- with Convention => C_Pass_By_Copy; -- /usr/include/xlocale.h:27
-
- type uu_locale_data is null record; -- incomplete struct
-
- type uu_locale_t is access all uu_locale_struct; -- /usr/include/xlocale.h:39
-
- subtype locale_t is uu_locale_t; -- /usr/include/xlocale.h:42
-
-end xlocale_h;
diff --git a/libclang/libclang.gpr b/libclang/libclang.gpr
deleted file mode 100644
index 349106c1b7..0000000000
--- a/libclang/libclang.gpr
+++ /dev/null
@@ -1,19 +0,0 @@
-with "gnatcoll";
-with "../shared";
-with "../common/common";
-
-project libclang is
-
- for Source_Dirs use ("gen", "example", "libclang");
- for Main use ("test_index", "test_refs");
-
- for Object_Dir use Shared'Object_Dir;
-
- package Linker is
- for Switches ("Ada") use ("-lclang", "-lstdc++");
- end Linker;
-
- package Compiler renames Shared.Compiler;
-
-end libclang;
-
diff --git a/libclang/libclang/libclang-file.adb b/libclang/libclang/libclang-file.adb
deleted file mode 100644
index d55568ce01..0000000000
--- a/libclang/libclang/libclang-file.adb
+++ /dev/null
@@ -1,40 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2003-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with Interfaces.C.Strings; use Interfaces.C.Strings;
-
-package body Libclang.File is
-
- function File
- (TU : Clang_Translation_Unit; File_Name : String) return Libclang_File
- is
- C_File_Name : chars_ptr := New_String (File_Name);
- Result : constant CXFile := clang_getFile (TU, C_File_Name);
- begin
- Free (C_File_Name);
- return Result;
- end File;
-
- function File (File : Libclang_File) return GNATCOLL.VFS.Virtual_File
- is
- begin
- return GNATCOLL.VFS.Create
- (GNATCOLL.VFS.Filesystem_String
- (To_String (clang_getFileName (File))));
- end File;
-
-end Libclang.File;
diff --git a/libclang/libclang/libclang-file.ads b/libclang/libclang/libclang-file.ads
deleted file mode 100644
index 40f05d01da..0000000000
--- a/libclang/libclang/libclang-file.ads
+++ /dev/null
@@ -1,36 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2003-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with Libclang.Index; use Libclang.Index;
-with clang_c_Index_h; use clang_c_Index_h;
-with GNATCOLL.VFS;
-
-package Libclang.File is
- subtype Libclang_File is CXFile;
-
- function File
- (TU : Clang_Translation_Unit; File_Name : String) return Libclang_File;
-
- function File
- (TU : Clang_Translation_Unit;
- File : GNATCOLL.VFS.Virtual_File) return Libclang_File
- is
- (Libclang.File.File (TU, String (File.Full_Name.all)));
-
- function File (File : Libclang_File) return GNATCOLL.VFS.Virtual_File;
-
-end Libclang.File;
diff --git a/libclang/libclang/libclang-index.adb b/libclang/libclang/libclang-index.adb
deleted file mode 100644
index ec3006fc9f..0000000000
--- a/libclang/libclang/libclang-index.adb
+++ /dev/null
@@ -1,1089 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2014-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with System; use System;
-
-with Ada.Unchecked_Conversion;
-
-with Interfaces.C.Strings; use Interfaces.C.Strings;
-with Interfaces.C.Pointers;
-with clang_c_CXString_h; use clang_c_CXString_h;
-with Libclang.File;
-with System.Address_To_Access_Conversions;
-with GNATCOLL.Traces; use GNATCOLL.Traces;
-with Ada.Unchecked_Deallocation;
-with String_Utils; use String_Utils;
-with GNAT.Regpat; use GNAT.Regpat;
-with Ada.Text_IO; use Ada.Text_IO;
-
-package body Libclang.Index is
-
- Debug : constant Boolean := False;
- Me : constant Trace_Handle := GNATCOLL.Traces.Create
- ("GPS.LIBCLANG.LIBCLANG");
-
- type Complete_Results_Access is access all CXCodeCompleteResults;
-
- function Convert is new Ada.Unchecked_Conversion
- (Source => System.Address,
- Target => Complete_Results_Access);
-
- type CXCompletionResult_Array is array
- (Natural range <>) of aliased CXCompletionResult;
-
- package CXCompletionResult_Pointer is new Interfaces.C.Pointers
- (Index => Natural,
- Element => CXCompletionResult,
- Element_Array => CXCompletionResult_Array,
- Default_Terminator => No_CXCompletionResult);
-
- function Visit_And_Filter_Children
- (C : Clang_Cursor;
- Visitor : CXCursorVisitor;
- Filter : access function (Cursor : Clang_Cursor) return Boolean := null)
- return Cursors_Arrays.Array_Type;
-
- function Toplevel_Nodes_Visitor
- (Child : CXCursor;
- Parent : CXCursor;
- UData : CXClientData) return CXChildVisitResult;
- pragma Convention (C, Toplevel_Nodes_Visitor);
-
- ------------------
- -- Create_Index --
- ------------------
-
- function Create_Index
- (Exclude_Declarations_From_PCH : Boolean;
- Display_Diagnostics : Boolean)
- return Clang_Index
- is
- R : Clang_Index;
- begin
- R := clang_createIndex
- (int (Boolean'Pos (Exclude_Declarations_From_PCH)),
- int (Boolean'Pos (Display_Diagnostics)));
- return R;
- end Create_Index;
-
- -------------
- -- Dispose --
- -------------
-
- procedure Dispose (Index : Clang_Index) is
- begin
- clang_disposeIndex (Index);
- end Dispose;
-
- ----------------------------
- -- Parse_Translation_Unit --
- ----------------------------
-
- function Parse_Translation_Unit
- (Index : Clang_Index;
- Source_Filename : String;
- Command_Line_Args : GNATCOLL.Utils.Unbounded_String_Array;
- Unsaved_Files : Unsaved_File_Array := No_Unsaved_Files;
- Options : Clang_Translation_Unit_Flags :=
- No_Translation_Unit_Flags)
- return Clang_Translation_Unit
- is
- TU : Clang_Translation_Unit;
-
- type Char_Ptr_Ptr is array (Positive range <>) of chars_ptr;
-
- CL : Char_Ptr_Ptr (Command_Line_Args'Range);
-
- C_Source_Filename : chars_ptr;
-
- function local_clang_parseTranslationUnit
- (C_Idxx : CXIndex;
- Source_Filename : chars_ptr;
- Command_Line_Args : System.Address;
- Num_Command_Line_Args : int;
- Unsaved_Files : System.Address;
- Num_Unsaved_Files : unsigned;
- Options : unsigned) return Clang_Translation_Unit;
- pragma Import (C, local_clang_parseTranslationUnit,
- "clang_parseTranslationUnit");
-
- C_Command_Line_Args : System.Address;
- C_Unsaved_Files : System.Address;
-
- First_Free : Natural := CL'First;
- begin
- Trace (Me, "Parsing translation unit " & Source_Filename);
-
- for J in Command_Line_Args'Range loop
- declare
- Arg : constant String := To_String (Command_Line_Args (J));
- begin
- -- Never pass the "-v" argument: this causes libclang to
- -- output the header search settings to the standard error, which
- -- is not suitable under Windows where GNAT Studio does not have a
- -- console.
- if Arg /= "-v" then
- CL (First_Free) := New_String (Arg);
- First_Free := First_Free + 1;
- end if;
- end;
- end loop;
-
- if First_Free > CL'First then
- C_Command_Line_Args := CL (CL'First)'Address;
- else
- -- ??? This is wrong, the code won't accept a null address below
- C_Command_Line_Args := System.Null_Address;
- end if;
-
- if Unsaved_Files'Length = 0 then
- C_Unsaved_Files := System.Null_Address;
- else
- C_Unsaved_Files := Unsaved_Files (Unsaved_Files'First)'Address;
- end if;
-
- C_Source_Filename := New_String (Source_Filename);
-
- TU :=
- local_clang_parseTranslationUnit
- (C_Idxx => Index,
- Source_Filename => C_Source_Filename,
- Command_Line_Args => C_Command_Line_Args,
- Num_Command_Line_Args => int (First_Free - CL'First),
- Unsaved_Files => C_Unsaved_Files,
- Num_Unsaved_Files => Unsaved_Files'Length,
- Options => unsigned (Options));
-
- Free (C_Source_Filename);
-
- for J in CL'First .. First_Free - 1 loop
- Free (CL (J));
- end loop;
-
- return TU;
- end Parse_Translation_Unit;
-
- -------------------------
- -- Source_File_Indexer --
- -------------------------
-
- package body Source_File_Indexer is
- package CX_To_Client_Data is new System.Address_To_Access_Conversions
- (Client_Data_T);
-
- function To_Client_Data
- (A : CXClientData) return CX_To_Client_Data.Object_Pointer
- is
- (CX_To_Client_Data.To_Pointer (System.Address (A)));
-
- function Abort_Query_Internal
- (arg1 : CXClientData; arg2 : System.Address) return int;
- pragma Convention (C, Abort_Query_Internal);
- procedure Diagnostic_Internal
- (arg1 : CXClientData;
- arg2 : CXDiagnosticSet;
- arg3 : System.Address);
- pragma Convention (C, Diagnostic_Internal);
- function Entered_Main_File_Internal
- (arg1 : CXClientData;
- arg2 : CXFile;
- arg3 : System.Address) return CXIdxClientFile;
- pragma Convention (C, Entered_Main_File_Internal);
- function Included_File_Internal
- (arg1 : CXClientData;
- arg2 : access constant CXIdxIncludedFileInfo) return CXIdxClientFile;
- pragma Convention (C, Included_File_Internal);
- function Started_Translation_Unit_Internal
- (arg1 : CXClientData;
- arg2 : System.Address) return CXIdxClientContainer;
- pragma Convention (C, Started_Translation_Unit_Internal);
- procedure Index_Reference_Internal
- (arg1 : CXClientData; arg2 : access constant CXIdxEntityRefInfo);
- pragma Convention (C, Index_Reference_Internal);
- procedure Index_Declaration_Internal
- (arg1 : CXClientData; arg2 : access constant CXIdxDeclInfo);
- pragma Convention (C, Index_Declaration_Internal);
-
- --------------------------
- -- Abort_Query_Internal --
- --------------------------
-
- function Abort_Query_Internal
- (arg1 : CXClientData; arg2 : System.Address) return int is
- pragma Unreferenced (arg2);
- begin
- return
- (if Abort_Query
- (To_Client_Data (arg1).all)
- then 1 else 0);
- end Abort_Query_Internal;
-
- -------------------------
- -- Diagnostic_Internal --
- -------------------------
-
- procedure Diagnostic_Internal
- (arg1 : CXClientData; arg2 : CXDiagnosticSet; arg3 : System.Address)
- is
- pragma Unreferenced (arg3);
- begin
- Diagnostic (To_Client_Data (arg1).all, arg2);
- end Diagnostic_Internal;
-
- --------------------------------
- -- Entered_Main_File_Internal --
- --------------------------------
-
- function Entered_Main_File_Internal
- (arg1 : CXClientData;
- arg2 : CXFile;
- arg3 : System.Address) return CXIdxClientFile is
- pragma Unreferenced (arg3);
- begin
- Entered_Main_File (To_Client_Data (arg1).all,
- Libclang.File.File (arg2));
- return CXIdxClientFile (System.Null_Address);
- end Entered_Main_File_Internal;
-
- ----------------------------
- -- Included_File_Internal --
- ----------------------------
-
- function Included_File_Internal
- (arg1 : CXClientData;
- arg2 : access constant CXIdxIncludedFileInfo) return CXIdxClientFile
- is
- begin
- Included_File (To_Client_Data (arg1).all, arg2.all);
- return CXIdxClientFile (System.Null_Address);
- end Included_File_Internal;
-
- ---------------------------------------
- -- Started_Translation_Unit_Internal --
- ---------------------------------------
-
- function Started_Translation_Unit_Internal
- (arg1 : CXClientData; arg2 : System.Address)
- return CXIdxClientContainer is
- pragma Unreferenced (arg2);
- begin
- Started_Translation_Unit (To_Client_Data (arg1).all);
- return CXIdxClientContainer (System.Null_Address);
- end Started_Translation_Unit_Internal;
-
- --------------------------------
- -- Index_Declaration_Internal --
- --------------------------------
-
- procedure Index_Declaration_Internal
- (arg1 : CXClientData; arg2 : access constant CXIdxDeclInfo) is
- begin
- Index_Declaration (To_Client_Data (arg1).all, arg2.all);
- end Index_Declaration_Internal;
-
- ------------------------------
- -- Index_Reference_Internal --
- ------------------------------
-
- procedure Index_Reference_Internal
- (arg1 : CXClientData; arg2 : access constant CXIdxEntityRefInfo) is
- begin
- Index_Reference (To_Client_Data (arg1).all, arg2.all);
- end Index_Reference_Internal;
-
- function Imported_AST_File_Internal
- (Dummy_arg1 : CXClientData;
- Dummy_arg2 : access constant CXIdxImportedASTFileInfo)
- return CXIdxClientASTFile
- is
- (CXIdxClientASTFile (System.Null_Address));
- pragma Convention (C, Imported_AST_File_Internal);
-
- Indexer_Callbacks : aliased IndexerCallbacks :=
- (Abort_Query_Internal'Access,
- Diagnostic_Internal'Access,
- Entered_Main_File_Internal'Access,
- Included_File_Internal'Access,
- Imported_AST_File_Internal'Access,
- Started_Translation_Unit_Internal'Access,
- Index_Declaration_Internal'Access,
- Index_Reference_Internal'Access);
-
- ----------------------------
- -- Index_Translation_Unit --
- ----------------------------
-
- procedure Index_Translation_Unit
- (Index_Action : Clang_Index_Action;
- Client_Data : Client_Data_T;
- Index_Options : Clang_Index_Options;
- TU : Clang_Translation_Unit)
- is
- Error_Code : int;
- pragma Unreferenced (Error_Code);
- begin
- Error_Code := clang_indexTranslationUnit (Index_Action,
- CXClientData (Client_Data'Address),
- Indexer_Callbacks'Access,
- Indexer_Callbacks'Size,
- Index_Options, TU);
- end Index_Translation_Unit;
-
- end Source_File_Indexer;
-
- ------------------------------
- -- Reparse_Translation_Unit --
- ------------------------------
-
- function Reparse_Translation_Unit
- (TU : Clang_Translation_Unit;
- Unsaved_Files : Unsaved_File_Array := No_Unsaved_Files;
- Options : Clang_Translation_Unit_Flags :=
- No_Translation_Unit_Flags) return Boolean
- is
-
- function local_clang_reparseTranslationUnit
- (tu : Clang_Translation_Unit;
- Num_Unsaved_Files : unsigned;
- Unsaved_Files : System.Address;
- Options : unsigned) return int;
- pragma Import (C, local_clang_reparseTranslationUnit,
- "clang_reparseTranslationUnit");
-
- C_Unsaved_Files : System.Address;
-
- C_Result : int;
- begin
- if Unsaved_Files'Length = 0 then
- C_Unsaved_Files := System.Null_Address;
- else
- C_Unsaved_Files := Unsaved_Files (Unsaved_Files'First)'Address;
- end if;
-
- C_Result :=
- local_clang_reparseTranslationUnit
- (tu => TU,
- Unsaved_Files => C_Unsaved_Files,
- Num_Unsaved_Files => Unsaved_Files'Length,
- Options => unsigned (Options));
-
- return C_Result = 0;
- end Reparse_Translation_Unit;
-
- -------------
- -- Dispose --
- -------------
-
- procedure Dispose (TU : in out Clang_Translation_Unit) is
- begin
- Trace (Me, "Freeing translation unit" & Spelling (TU));
- if TU = No_Translation_Unit then
- Trace (Me, "WARNING : Trying to dispose of already freed TU");
- return;
- end if;
-
- clang_disposeTranslationUnit (TU);
- TU := No_Translation_Unit;
- end Dispose;
-
- -----------------
- -- Complete_At --
- -----------------
-
- function Complete_At
- (TU : Clang_Translation_Unit;
- Filename : String;
- Line : Natural;
- Column : Natural;
- Unsaved_Files : Unsaved_File_Array := No_Unsaved_Files;
- Options : Clang_Code_Complete_Flags := 0)
- return Clang_Complete_Results
- is
- C_Filename : chars_ptr;
- C_Unsaved_Files : System.Address;
-
- Result : Clang_Complete_Results;
-
- function local_clang_codeCompleteAt
- (TU : Clang_Translation_Unit;
- complete_filename : chars_ptr;
- complete_line : unsigned;
- complete_column : unsigned;
- unsaved_files : System.Address;
- num_unsaved_files : unsigned;
- options : unsigned)
- return System.Address;
- pragma Import (C, local_clang_codeCompleteAt, "clang_codeCompleteAt");
-
- C_Returned : System.Address;
-
- begin
- C_Filename := New_String (Filename);
-
- if Unsaved_Files'Length = 0 then
- C_Unsaved_Files := System.Null_Address;
- else
- C_Unsaved_Files := Unsaved_Files (Unsaved_Files'First)'Address;
- end if;
-
- C_Returned :=
- local_clang_codeCompleteAt
- (TU => TU,
- complete_filename => C_Filename,
- complete_line => unsigned (Line),
- complete_column => unsigned (Column),
- unsaved_files => C_Unsaved_Files,
- num_unsaved_files => Unsaved_Files'Length,
- options => unsigned (Options));
-
- Free (C_Filename);
-
- if C_Returned = System.Null_Address then
- return No_Complete_Results;
- else
- Result.CXCodeCompleteResults := Convert (C_Returned);
-
- -- We have the results in raw format: create an Ada array
-
- end if;
-
- return Result;
- end Complete_At;
-
- -------------
- -- Dispose --
- -------------
-
- procedure Dispose (Results : in out Clang_Complete_Results) is
- begin
- if Results = No_Complete_Results then
- return;
- end if;
-
- clang_disposeCodeCompleteResults (Results.CXCodeCompleteResults);
- Results := No_Complete_Results;
- end Dispose;
-
- ----------
- -- Sort --
- ----------
-
- procedure Sort (Results : in out Clang_Complete_Results) is
- begin
- clang_sortCodeCompletionResults
- (Results.CXCodeCompleteResults.Results,
- Results.CXCodeCompleteResults.NumResults);
- end Sort;
-
- -----------------
- -- Num_Results --
- -----------------
-
- function Num_Results (Results : Clang_Complete_Results) return Natural is
- begin
- return Natural (Results.CXCodeCompleteResults.NumResults);
- end Num_Results;
-
- ----------------
- -- Nth_Result --
- ----------------
-
- function Nth_Result
- (Results : Clang_Complete_Results;
- N : Positive) return Clang_Completion_Result
- is
- use CXCompletionResult_Pointer;
-
- P : CXCompletionResult_Pointer.Pointer :=
- CXCompletionResult_Pointer.Pointer
- (Results.CXCodeCompleteResults.Results);
-
- Returned : Clang_Completion_Result;
- begin
- P := P + ptrdiff_t (N - 1);
-
- Returned := Clang_Completion_Result (P);
-
- return Returned;
- end Nth_Result;
-
- ---------------
- -- To_String --
- ---------------
-
- function To_String (Chunk : Clang_Completion_Chunk) return String
- is
- Kind_Image : constant String := Kind (Chunk)'Img;
- Prefix : constant String := "CXCompletionChunk_";
- begin
- return "(" & Kind_Image (Prefix'Length .. Kind_Image'Length)
- & ", """ & Text (Chunk) & """)";
- end To_String;
-
- ---------------
- -- To_String --
- ---------------
-
- function To_String (Completion : Clang_Completion_Result) return String is
- A : Unbounded_String;
- begin
- Append (A, "Completion (");
- for Chunk of Get_Chunks (Completion) loop
- if Chunk.Index /= 0 then
- Append (A, ", ");
- end if;
-
- Append (A, To_String (Chunk));
- end loop;
- Append (A, ")");
- return +A;
- end To_String;
-
- ----------
- -- Text --
- ----------
-
- function Text
- (Chunk : Clang_Completion_Chunk) return String
- is
- (To_String
- (clang_getCompletionChunkText
- (Chunk.Completion.CompletionString,
- Chunk.Index)));
-
- ----------
- -- Kind --
- ----------
-
- function Kind
- (Chunk : Clang_Completion_Chunk) return Clang_Completion_Chunk_Kind
- is
- (clang_getCompletionChunkKind
- (Chunk.Completion.CompletionString, Chunk.Index));
-
- ----------------
- -- Get_Chunks --
- ----------------
-
- function Get_Chunks (R : Clang_Completion_Result) return Chunk_Array
- is
- begin
- return
- Ret : Chunk_Array
- (1 .. Natural
- (clang_getNumCompletionChunks (R.CompletionString)))
- do
- for I in Ret'Range loop
- Ret (I) := Clang_Completion_Chunk'(R, unsigned (I - 1));
- end loop;
- end return;
- end Get_Chunks;
-
- ----------------
- -- Typed_Text --
- ----------------
-
- function Typed_Text (C : Clang_Completion_Result) return String
- is
- function Is_Typed_Text_Chunk
- (Chunk : Clang_Completion_Chunk) return Boolean
- is (Kind (Chunk) = CXCompletionChunk_TypedText);
-
- function Find
- is new Chunk_Arrays.Find_Gen (Is_Typed_Text_Chunk);
- begin
- return Text
- (Find (Get_Chunks (C)).Element);
- end Typed_Text;
-
- --------------
- -- Spellings --
- --------------
-
- function Spellings
- (Result : Clang_Completion_Result) return Completion_Strings
- is
- Returned : Completion_Strings;
- Chunks : constant Chunk_Array := Get_Chunks (Result);
- begin
- if Result = No_Completion_Results then
- return Returned;
- end if;
- case Chunks'Length is
- when 0 =>
- null;
-
- when 1 =>
- Returned.Completion := +Text (Chunks (1));
- Returned.Doc := +Text (Chunks (1));
- when others =>
- for Chunk of Chunks loop
- if Kind (Chunk) in
- CXCompletionChunk_TypedText .. CXCompletionChunk_Text
- then
- Append (Returned.Completion, Text (Chunk));
- end if;
-
- if Debug then
- Append (Returned.Doc, " [" & Kind (Chunk)'Img & "]");
- end if;
-
- Append (Returned.Doc, Text (Chunk));
-
- if Chunk.Index = 0 then
- Append (Returned.Doc, " ");
- end if;
- end loop;
- end case;
-
- return Returned;
- end Spellings;
-
- ----------
- -- Pred --
- ----------
-
- function Pred (El : Clang_Completion_Chunk) return Boolean is
- (Kind (El) = CXCompletionChunk_CurrentParameter);
-
- -----------------------------
- -- Is_Parameter_Completion --
- -----------------------------
-
- function Is_Parameter_Completion
- (Result : Clang_Completion_Result) return Boolean
- is
- use Chunk_Arrays;
- begin
- return Contains (Get_Chunks (Result), Pred'Access);
- end Is_Parameter_Completion;
-
- -----------------------------
- -- Get_Current_Param_Index --
- -----------------------------
-
- function Get_Current_Param_Index
- (Result : Clang_Completion_Result) return Natural
- is
- use Chunk_Arrays;
- begin
- return Find (Get_Chunks (Result), Pred'Access);
- end Get_Current_Param_Index;
-
- -----------------------------------
- -- Extract_Param_Name_From_Chunk --
- -----------------------------------
-
- function Extract_Param_Name_From_Chunk
- (Chunk : Clang_Completion_Chunk) return String
- is
- C : constant Pattern_Matcher := Compile ("[\w_$]+$");
- Match_Arr : Match_Array (0 .. 1) := (others => No_Match);
- T : constant String := Text (Chunk);
- begin
- Match (C, T, Match_Arr);
- if Match_Arr (0) /= No_Match then
- return T (Match_Arr (0).First .. Match_Arr (0).Last);
- else
- return "";
- end if;
- end Extract_Param_Name_From_Chunk;
-
- --------------
- -- Priority --
- --------------
-
- function Priority
- (Result : Clang_Completion_Result) return Natural
- is
- begin
- return Natural (clang_getCompletionPriority (Result.CompletionString));
- end Priority;
-
- ----------
- -- Kind --
- ----------
-
- function Kind
- (Result : Clang_Completion_Result) return clang_c_Index_h.CXCursorKind is
- begin
- return Result.CursorKind;
- end Kind;
-
- --------------------------
- -- Destroy_Unsaved_File --
- --------------------------
-
- procedure Destroy_Unsaved_File (F : in out Unsaved_File) is
- begin
- Free (F.Filename);
- Free (F.Contents);
- end Destroy_Unsaved_File;
-
- -------------
- -- Destroy --
- -------------
-
- procedure Destroy (Files : in out Unsaved_File_Array_Access)
- is
- procedure Free is new Ada.Unchecked_Deallocation
- (Unsaved_File_Array, Unsaved_File_Array_Access);
- begin
- for F of Files.all loop
- Destroy_Unsaved_File (F);
- end loop;
- Free (Files);
- end Destroy;
-
- -------------------------
- -- Create_Unsaved_File --
- -------------------------
-
- function Create_Unsaved_File
- (Filename : String;
- Buffer : String_Access) return Unsaved_File
- is
- Returned : Unsaved_File;
- C_Filename : chars_ptr;
- begin
- C_Filename := New_String (Filename);
- -- ??? Who frees this?
- Returned.Filename := C_Filename;
-
- if Buffer = null then
- Returned.Contents := Null_Ptr;
- Returned.Length := 0;
- else
- Returned.Contents := New_String (Buffer.all);
- Returned.Length := Buffer'Length;
- end if;
-
- return Returned;
- end Create_Unsaved_File;
-
- ----------------------
- -- Dbg_Get_Children --
- ----------------------
-
- function Dbg_Get_Children
- (Cursor : Clang_Cursor) return Cursors_Arrays.Array_Type
- is
- begin
- return Get_Children (Cursor);
- end Dbg_Get_Children;
-
- ------------------
- -- Get_Children --
- ------------------
-
- function Get_Children
- (Cursor : Clang_Cursor;
- Kind : Clang_Cursor_Kind) return Cursors_Arrays.Array_Type
- is
- function Has_Kind (C : Clang_Cursor) return Boolean is
- (Libclang.Index.Kind (C) = Kind);
- -- Filter predicate, returns true if C has kind Kind
- begin
- return Get_Children (Cursor, Has_Kind'Access);
- end Get_Children;
-
- -----------------
- -- Root_Cursor --
- -----------------
-
- function Root_Cursor
- (TU : Clang_Translation_Unit) return Clang_Cursor is
- begin
- return clang_getTranslationUnitCursor (TU);
- end Root_Cursor;
-
- type Visitor_Data is record
- Vec : Cursors_Vectors.Vector;
- end record;
-
- package Addr_To_Vis_Data is new System.Address_To_Access_Conversions
- (Visitor_Data);
-
- --------------------------
- -- Get_Children_Visitor --
- --------------------------
-
- function Get_Children_Visitor
- (Child : CXCursor;
- Parent : CXCursor;
- UData : CXClientData) return CXChildVisitResult;
- pragma Convention (C, Get_Children_Visitor);
-
- --------------------------
- -- Get_Children_Visitor --
- --------------------------
-
- function Get_Children_Visitor
- (Child : CXCursor;
- Parent : CXCursor;
- UData : CXClientData) return CXChildVisitResult
- is
- pragma Unreferenced (Parent);
- Data : constant Addr_To_Vis_Data.Object_Pointer
- := Addr_To_Vis_Data.To_Pointer (System.Address (UData));
- begin
- Data.Vec.Append (Clang_Cursor (Child));
- return CXChildVisit_Continue;
- end Get_Children_Visitor;
-
- function Visit_And_Filter_Children
- (C : Clang_Cursor;
- Visitor : CXCursorVisitor;
- Filter : access function (Cursor : Clang_Cursor) return Boolean := null)
- return Cursors_Arrays.Array_Type
- is
- V : aliased Visitor_Data;
- V_Ptr : constant Addr_To_Vis_Data.Object_Pointer := V'Unchecked_Access;
- Discard : unsigned;
- begin
- Discard := clang_visitChildren
- (C, Visitor,
- CXClientData (Addr_To_Vis_Data.To_Address (V_Ptr)));
-
- if V.Vec.Length = 0 then
- return Cursors_Arrays.Empty_Array;
- end if;
-
- declare
- Out_Array : Cursors_Arrays.Array_Type
- (1 .. Positive (V.Vec.Length));
- begin
-
- for I in V.Vec.First_Index .. V.Vec.Last_Index loop
- Out_Array (I) := V.Vec.Element (I);
- end loop;
-
- return (if Filter = null then Out_Array
- else Cursors_Arrays.Filter (Out_Array, Filter));
- end;
-
- end Visit_And_Filter_Children;
-
- ------------------
- -- Get_Children --
- ------------------
-
- function Get_Children
- (Cursor : Clang_Cursor;
- Filter : access function (Cursor : Clang_Cursor) return Boolean := null)
- return Cursors_Arrays.Array_Type
- is
- begin
- return Visit_And_Filter_Children
- (Cursor, Get_Children_Visitor'Access, Filter);
- end Get_Children;
-
- ----------------------------
- -- Toplevel_Nodes_Visitor --
- ----------------------------
-
- function Toplevel_Nodes_Visitor
- (Child : CXCursor;
- Parent : CXCursor;
- UData : CXClientData) return CXChildVisitResult
- is
- pragma Unreferenced (Parent);
- Data : constant Addr_To_Vis_Data.Object_Pointer
- := Addr_To_Vis_Data.To_Pointer (System.Address (UData));
- begin
- if
- clang_Location_isFromMainFile (clang_getCursorLocation (Child)) /= 0
- and then Lexical_Parent (Clang_Cursor (Child))
- = Root_Cursor (clang_Cursor_getTranslationUnit (Child))
- then
- Data.Vec.Append (Clang_Cursor (Child));
- end if;
- return CXChildVisit_Continue;
- end Toplevel_Nodes_Visitor;
-
- --------------------
- -- Toplevel_Nodes --
- --------------------
-
- function Toplevel_Nodes
- (TU : Clang_Translation_Unit;
- Filter : access function (C : Clang_Cursor) return Boolean := null)
- return Cursors_Arrays.Array_Type
- is
- begin
- return Visit_And_Filter_Children
- (Root_Cursor (TU), Toplevel_Nodes_Visitor'Access, Filter);
- end Toplevel_Nodes;
-
- --------------
- -- Spelling --
- --------------
-
- function Spelling
- (T : Clang_Type) return String
- is
- begin
- return To_String (clang_getTypeSpelling (T));
- end Spelling;
-
- --------------
- -- Spelling --
- --------------
-
- function Spelling
- (Cursor : Clang_Cursor) return String
- is
- begin
- return To_String (clang_getCursorSpelling (Cursor));
- end Spelling;
-
- -----------
- -- Value --
- -----------
-
- function Value (Location : Clang_Location) return Clang_Raw_Location
- is
- Line, Column, Offset : aliased unsigned;
- F : aliased CXFile;
- begin
- clang_getFileLocation
- (Location, F'Address, Line'Access,
- Column'Access, Offset'Access);
-
- return Clang_Raw_Location'
- (Libclang.File.File (F), Line, Column, Offset);
- end Value;
-
- ------------
- -- Offset --
- ------------
-
- function Offset (Location : Clang_Location) return unsigned is
- Offset : aliased unsigned;
- begin
- clang_getFileLocation
- (Location, System.Null_Address, null, null, Offset'Access);
-
- return Offset;
- end Offset;
-
- --------------
- -- In_Range --
- --------------
-
- function In_Range (Sought, Containing : Clang_Cursor) return Boolean
- is
- begin
- if not Is_From_Main_File (Location (Containing)) then
- return False;
- elsif Sought = Containing then
- return True;
- end if;
-
- declare
- Sought_Loc : constant unsigned := Offset (Location (Sought));
- Containing_Range : constant Clang_Source_Range := Extent (Containing);
- begin
- return Sought_Loc > Offset (Range_Start (Containing_Range))
- and then
- Sought_Loc < Offset (Range_End (Containing_Range));
- end;
- end In_Range;
-
- --------------
- -- Location --
- --------------
-
- function Location
- (TU : Clang_Translation_Unit;
- File : GNATCOLL.VFS.Virtual_File;
- Line, Column : Natural) return Clang_Location
- is
- begin
- return clang_getLocation
- (TU, Libclang.File.File (TU, File),
- unsigned (Line), unsigned (Column));
- end Location;
-
- --------------
- -- Location --
- --------------
-
- function Location
- (TU : Clang_Translation_Unit;
- File : GNATCOLL.VFS.Virtual_File;
- Offset : Natural) return Clang_Location is
- begin
- return clang_getLocationForOffset
- (TU, Libclang.File.File (TU, File),
- unsigned (Offset));
- end Location;
-
- --------------
- -- Location --
- --------------
-
- function Location (Cursor : Clang_Cursor) return Clang_Raw_Location
- is
- begin
- return Value (Location (Cursor));
- end Location;
-
- ------------------
- -- Display_Name --
- ------------------
-
- function Display_Name
- (Cursor : Clang_Cursor) return String
- is
- begin
- return To_String (clang_getCursorDisplayName (Cursor));
- end Display_Name;
-
- ---------------
- -- To_String --
- ---------------
-
- function To_String
- (Clang_String : clang_c_CXString_h.CXString) return String
- is
- C_String : constant chars_ptr :=
- clang_getCString (Clang_String);
- begin
- if C_String /= Null_Ptr then
- declare
- Str : constant String := Value (C_String);
- begin
- clang_disposeString (Clang_String);
- return Str;
- end;
- else
- return "";
- end if;
- end To_String;
-
- ---------------------
- -- PP_Clang_Cursor --
- ---------------------
-
- procedure PP_Clang_Cursor (C : Clang_Cursor) is
- begin
- Put_Line ("");
- end PP_Clang_Cursor;
-
-end Libclang.Index;
diff --git a/libclang/libclang/libclang-index.ads b/libclang/libclang/libclang-index.ads
deleted file mode 100644
index e216053f2e..0000000000
--- a/libclang/libclang/libclang-index.ads
+++ /dev/null
@@ -1,812 +0,0 @@
-------------------------------------------------------------------------------
--- GNAT Studio --
--- --
--- Copyright (C) 2014-2021, AdaCore --
--- --
--- This is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 3, or (at your option) any later ver- --
--- sion. This software is distributed in the hope that it will be useful, --
--- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
--- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
--- License for more details. You should have received a copy of the GNU --
--- General Public License distributed with this software; see file --
--- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
--- of the license. --
-------------------------------------------------------------------------------
-
-with clang_c_Index_h; use clang_c_Index_h;
-
-with System;
-
-with Interfaces.C;
-with Interfaces.C.Strings;
-
-with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
-with GNATCOLL.Utils; use GNATCOLL.Utils;
-with GNATCOLL.VFS;
-use GNATCOLL.VFS;
-with Ada.Containers.Vectors;
-with clang_c_CXString_h;
-with Ada.Containers; use Ada.Containers;
-with Array_Utils;
-
-package Libclang.Index is
-
- -----------
- -- Index --
- -----------
-
- subtype Clang_Index is clang_c_Index_h.CXIndex;
-
- No_Index : constant Clang_Index;
-
- function Create_Index
- (Exclude_Declarations_From_PCH : Boolean;
- Display_Diagnostics : Boolean) return Clang_Index;
- -- Provides a shared context for creating translation units.
- --
- -- It provides two options:
- --
- -- - excludeDeclarationsFromPCH : When non-zero, allows enumeration of
- -- "local" declarations (when loading any new translation units). A "local"
- -- declaration is one that belongs in the translation unit itself and not
- -- in a precompiled header that was used by the translation unit. If zero,
- -- all declarations will be enumerated.
- --
- -- Here is an example:
- --
- -- \code
- -- // excludeDeclsFromPCH = 1, displayDiagnostics=1
- -- Idx = clang_createIndex(1, 1);
- --
- -- // IndexTest.pch was produced with the following command:
- -- // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch"
- -- TU = clang_createTranslationUnit(Idx, "IndexTest.pch");
- --
- -- // This will load all the symbols from 'IndexTest.pch'
- -- clang_visitChildren(clang_getTranslationUnitCursor(TU),
- -- TranslationUnitVisitor, 0);
- -- clang_disposeTranslationUnit(TU);
- --
- -- // This will load all the symbols from 'IndexTest.c', excluding symbols
- -- // from 'IndexTest.pch'.
- -- char *args[] = { "-Xclang", "-include-pch=IndexTest.pch" };
- -- TU = clang_createTranslationUnitFromSourceFile
- -- (Idx, "IndexTest.c", 2, args,
- -- 0, 0);
- -- clang_visitChildren(clang_getTranslationUnitCursor(TU),
- -- TranslationUnitVisitor, 0);
- -- clang_disposeTranslationUnit(TU);
- -- \endcode
- --
- -- This process of creating the 'pch', loading it separately, and using
- -- it (via -include-pch) allows 'excludeDeclsFromPCH' to remove redundant
- -- callbacks (which gives the indexer the same performance benefit as the
- -- compiler).
-
- procedure Dispose (Index : Clang_Index);
- -- Free Index
-
- -------------------
- -- Unsaved files --
- -------------------
-
- type Unsaved_File is new clang_c_Index_h.CXUnsavedFile;
- No_Unsaved_File : constant Unsaved_File :=
- (Filename => Interfaces.C.Strings.Null_Ptr,
- Contents => Interfaces.C.Strings.Null_Ptr,
- Length => 0);
-
- function Create_Unsaved_File
- (Filename : String;
- Buffer : String_Access) return Unsaved_File;
- -- Create an Unsaved file.
- -- If Length = -1, do not consider it, but compute the length of Buffer.
-
- procedure Destroy_Unsaved_File (F : in out Unsaved_File);
-
- type Unsaved_File_Array is array (Natural range <>) of Unsaved_File;
- type Unsaved_File_Array_Access is access all Unsaved_File_Array;
-
- procedure Destroy (Files : in out Unsaved_File_Array_Access);
-
- No_Unsaved_Files : constant Unsaved_File_Array (1 .. 0) :=
- (others => No_Unsaved_File);
-
- -----------------------
- -- Translation units --
- -----------------------
-
- subtype Clang_Translation_Unit is clang_c_Index_h.CXTranslationUnit;
-
- No_Translation_Unit : constant Clang_Translation_Unit;
-
- type Clang_Translation_Unit_Flags is mod 2 ** Integer'Size;
- No_Translation_Unit_Flags : constant Clang_Translation_Unit_Flags := 0;
- Detailedpreprocessingrecord : constant Clang_Translation_Unit_Flags := 1;
- Incomplete : constant Clang_Translation_Unit_Flags := 2;
- Precompiledpreamble : constant Clang_Translation_Unit_Flags := 4;
- Cachecompletionresults : constant Clang_Translation_Unit_Flags := 8;
- Forserialization : constant Clang_Translation_Unit_Flags := 16;
- Cxxchainedpch : constant Clang_Translation_Unit_Flags := 32;
- Skipfunctionbodies : constant Clang_Translation_Unit_Flags := 64;
- Includebriefcommentsincodecompletion : constant
- Clang_Translation_Unit_Flags := 128;
-
- function Parse_Translation_Unit
- (Index : Clang_Index;
- Source_Filename : String;
- Command_Line_Args : GNATCOLL.Utils.Unbounded_String_Array;
- Unsaved_Files : Unsaved_File_Array := No_Unsaved_Files;
- Options : Clang_Translation_Unit_Flags :=
- No_Translation_Unit_Flags)
- return Clang_Translation_Unit;
- -- \brief Parse the given source file and the translation unit corresponding
- -- to that file.
- --
- -- This routine is the main entry point for the Clang C API, providing the
- -- ability to parse a source file into a translation unit that can then
- -- be queried by other functions in the API. This routine accepts a set of
- -- command-line arguments so that the compilation can be configured in the
- -- same way that the compiler is configured on the command line.
- --
- -- \param CIdx The index object with which the translation unit will be
- -- associated.
- --
- -- \param source_filename The name of the source file to load, or NULL if
- -- the source file is included in \c command_line_args.
- --
- -- \param command_line_args The command-line arguments that would be passed
- -- to the \c clang executable if it were being invoked out-of-process. These
- -- command-line options will be parsed and will affect how the translation
- -- unit is parsed. Note that the following options are ignored: '-c',
- -- '-emit-ast', '-fsyntax-only' (which is the default), and '-o \