diff --git a/README.md b/README.md
index ab18a9a4..192c57eb 100644
--- a/README.md
+++ b/README.md
@@ -13,9 +13,3 @@ For documentation on supported platforms, limitations, how to install `C2CS`, ho
There are a few exceptions to this detailed below. See the [LICENSE](LICENSE) file for more details on this main
product's license.
-`C2CS` uses `libclang` which the header files are included as part of the repository under [`ext/clang`](./ext/clang).
-This is because `C2CS` generates bindings for `libclang` to which `C2CS` generates bindings for `libclang` and other C
-libraries. The C header `.h` files (no source code `.c`/`.cpp` files) for `libclang` are included for convience of a
-source-of-truth for re-generating the bindings. These files are licensed under the Apache License v2.0 with LLVM
-Exceptions; see the [ext/clang/LICENSE.txt](./ext/clang/LICENSE.txt) for more details.
-
diff --git a/ext/clang/LICENSE.txt b/ext/clang/LICENSE.txt
deleted file mode 100644
index 48985880..00000000
--- a/ext/clang/LICENSE.txt
+++ /dev/null
@@ -1,278 +0,0 @@
-==============================================================================
-The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
-==============================================================================
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
----- LLVM Exceptions to the Apache 2.0 License ----
-
-As an exception, if, as a result of your compiling your source code, portions
-of this Software are embedded into an Object form of such source code, you
-may redistribute such embedded portions in such Object form without complying
-with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
-
-In addition, if you combine or link compiled forms of this Software with
-software that is licensed under the GPLv2 ("Combined Software") and if a
-court of competent jurisdiction determines that the patent provision (Section
-3), the indemnity provision (Section 9) or other Section of the License
-conflicts with the conditions of the GPLv2, you may retroactively and
-prospectively choose to deem waived or otherwise exclude such Section(s) of
-the License, but only in their entirety and only with respect to the Combined
-Software.
-
-==============================================================================
-Software from third parties included in the LLVM Project:
-==============================================================================
-The LLVM Project contains third party software which is under different license
-terms. All such code will be identified clearly using at least one of two
-mechanisms:
-1) It will be in a separate directory tree with its own `LICENSE.txt` or
- `LICENSE` file at the top containing the specific license and restrictions
- which apply to that software, or
-2) It will contain specific license and restriction terms at the top of every
- file.
-
-==============================================================================
-Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
-==============================================================================
-University of Illinois/NCSA
-Open Source License
-
-Copyright (c) 2007-2019 University of Illinois at Urbana-Champaign.
-All rights reserved.
-
-Developed by:
-
- LLVM Team
-
- University of Illinois at Urbana-Champaign
-
- http://llvm.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimers.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimers in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the names of the LLVM Team, University of Illinois at
- Urbana-Champaign, nor the names of its contributors may be used to
- endorse or promote products derived from this Software without specific
- prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
-SOFTWARE.
\ No newline at end of file
diff --git a/ext/clang/include/clang-c/BuildSystem.h b/ext/clang/include/clang-c/BuildSystem.h
deleted file mode 100644
index 296e6124..00000000
--- a/ext/clang/include/clang-c/BuildSystem.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*==-- clang-c/BuildSystem.h - Utilities for use by build systems -*- C -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This header provides various utilities for use by build systems. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_CLANG_C_BUILDSYSTEM_H
-#define LLVM_CLANG_C_BUILDSYSTEM_H
-
-#include "clang-c/CXErrorCode.h"
-#include "clang-c/CXString.h"
-#include "clang-c/ExternC.h"
-#include "clang-c/Platform.h"
-
-LLVM_CLANG_C_EXTERN_C_BEGIN
-
-/**
- * \defgroup BUILD_SYSTEM Build system utilities
- * @{
- */
-
-/**
- * Return the timestamp for use with Clang's
- * \c -fbuild-session-timestamp= option.
- */
-CINDEX_LINKAGE unsigned long long clang_getBuildSessionTimestamp(void);
-
-/**
- * Object encapsulating information about overlaying virtual
- * file/directories over the real file system.
- */
-typedef struct CXVirtualFileOverlayImpl *CXVirtualFileOverlay;
-
-/**
- * Create a \c CXVirtualFileOverlay object.
- * Must be disposed with \c clang_VirtualFileOverlay_dispose().
- *
- * \param options is reserved, always pass 0.
- */
-CINDEX_LINKAGE CXVirtualFileOverlay
-clang_VirtualFileOverlay_create(unsigned options);
-
-/**
- * Map an absolute virtual file path to an absolute real one.
- * The virtual path must be canonicalized (not contain "."/"..").
- * \returns 0 for success, non-zero to indicate an error.
- */
-CINDEX_LINKAGE enum CXErrorCode
-clang_VirtualFileOverlay_addFileMapping(CXVirtualFileOverlay,
- const char *virtualPath,
- const char *realPath);
-
-/**
- * Set the case sensitivity for the \c CXVirtualFileOverlay object.
- * The \c CXVirtualFileOverlay object is case-sensitive by default, this
- * option can be used to override the default.
- * \returns 0 for success, non-zero to indicate an error.
- */
-CINDEX_LINKAGE enum CXErrorCode
-clang_VirtualFileOverlay_setCaseSensitivity(CXVirtualFileOverlay,
- int caseSensitive);
-
-/**
- * Write out the \c CXVirtualFileOverlay object to a char buffer.
- *
- * \param options is reserved, always pass 0.
- * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
- * disposed using \c clang_free().
- * \param out_buffer_size pointer to receive the buffer size.
- * \returns 0 for success, non-zero to indicate an error.
- */
-CINDEX_LINKAGE enum CXErrorCode
-clang_VirtualFileOverlay_writeToBuffer(CXVirtualFileOverlay, unsigned options,
- char **out_buffer_ptr,
- unsigned *out_buffer_size);
-
-/**
- * free memory allocated by libclang, such as the buffer returned by
- * \c CXVirtualFileOverlay() or \c clang_ModuleMapDescriptor_writeToBuffer().
- *
- * \param buffer memory pointer to free.
- */
-CINDEX_LINKAGE void clang_free(void *buffer);
-
-/**
- * Dispose a \c CXVirtualFileOverlay object.
- */
-CINDEX_LINKAGE void clang_VirtualFileOverlay_dispose(CXVirtualFileOverlay);
-
-/**
- * Object encapsulating information about a module.map file.
- */
-typedef struct CXModuleMapDescriptorImpl *CXModuleMapDescriptor;
-
-/**
- * Create a \c CXModuleMapDescriptor object.
- * Must be disposed with \c clang_ModuleMapDescriptor_dispose().
- *
- * \param options is reserved, always pass 0.
- */
-CINDEX_LINKAGE CXModuleMapDescriptor
-clang_ModuleMapDescriptor_create(unsigned options);
-
-/**
- * Sets the framework module name that the module.map describes.
- * \returns 0 for success, non-zero to indicate an error.
- */
-CINDEX_LINKAGE enum CXErrorCode
-clang_ModuleMapDescriptor_setFrameworkModuleName(CXModuleMapDescriptor,
- const char *name);
-
-/**
- * Sets the umbrella header name that the module.map describes.
- * \returns 0 for success, non-zero to indicate an error.
- */
-CINDEX_LINKAGE enum CXErrorCode
-clang_ModuleMapDescriptor_setUmbrellaHeader(CXModuleMapDescriptor,
- const char *name);
-
-/**
- * Write out the \c CXModuleMapDescriptor object to a char buffer.
- *
- * \param options is reserved, always pass 0.
- * \param out_buffer_ptr pointer to receive the buffer pointer, which should be
- * disposed using \c clang_free().
- * \param out_buffer_size pointer to receive the buffer size.
- * \returns 0 for success, non-zero to indicate an error.
- */
-CINDEX_LINKAGE enum CXErrorCode
-clang_ModuleMapDescriptor_writeToBuffer(CXModuleMapDescriptor, unsigned options,
- char **out_buffer_ptr,
- unsigned *out_buffer_size);
-
-/**
- * Dispose a \c CXModuleMapDescriptor object.
- */
-CINDEX_LINKAGE void clang_ModuleMapDescriptor_dispose(CXModuleMapDescriptor);
-
-/**
- * @}
- */
-
-LLVM_CLANG_C_EXTERN_C_END
-
-#endif /* CLANG_C_BUILD_SYSTEM_H */
-
diff --git a/ext/clang/include/clang-c/CXCompilationDatabase.h b/ext/clang/include/clang-c/CXCompilationDatabase.h
deleted file mode 100644
index 2b336e54..00000000
--- a/ext/clang/include/clang-c/CXCompilationDatabase.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*===-- clang-c/CXCompilationDatabase.h - Compilation database ---*- C -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This header provides a public interface to use CompilationDatabase without *|
-|* the full Clang C++ API. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_CLANG_C_CXCOMPILATIONDATABASE_H
-#define LLVM_CLANG_C_CXCOMPILATIONDATABASE_H
-
-#include "clang-c/CXString.h"
-#include "clang-c/ExternC.h"
-#include "clang-c/Platform.h"
-
-LLVM_CLANG_C_EXTERN_C_BEGIN
-
-/** \defgroup COMPILATIONDB CompilationDatabase functions
- * \ingroup CINDEX
- *
- * @{
- */
-
-/**
- * A compilation database holds all information used to compile files in a
- * project. For each file in the database, it can be queried for the working
- * directory or the command line used for the compiler invocation.
- *
- * Must be freed by \c clang_CompilationDatabase_dispose
- */
-typedef void * CXCompilationDatabase;
-
-/**
- * Contains the results of a search in the compilation database
- *
- * When searching for the compile command for a file, the compilation db can
- * return several commands, as the file may have been compiled with
- * different options in different places of the project. This choice of compile
- * commands is wrapped in this opaque data structure. It must be freed by
- * \c clang_CompileCommands_dispose.
- */
-typedef void * CXCompileCommands;
-
-/**
- * Represents the command line invocation to compile a specific file.
- */
-typedef void * CXCompileCommand;
-
-/**
- * Error codes for Compilation Database
- */
-typedef enum {
- /*
- * No error occurred
- */
- CXCompilationDatabase_NoError = 0,
-
- /*
- * Database can not be loaded
- */
- CXCompilationDatabase_CanNotLoadDatabase = 1
-
-} CXCompilationDatabase_Error;
-
-/**
- * Creates a compilation database from the database found in directory
- * buildDir. For example, CMake can output a compile_commands.json which can
- * be used to build the database.
- *
- * It must be freed by \c clang_CompilationDatabase_dispose.
- */
-CINDEX_LINKAGE CXCompilationDatabase
-clang_CompilationDatabase_fromDirectory(const char *BuildDir,
- CXCompilationDatabase_Error *ErrorCode);
-
-/**
- * Free the given compilation database
- */
-CINDEX_LINKAGE void
-clang_CompilationDatabase_dispose(CXCompilationDatabase);
-
-/**
- * Find the compile commands used for a file. The compile commands
- * must be freed by \c clang_CompileCommands_dispose.
- */
-CINDEX_LINKAGE CXCompileCommands
-clang_CompilationDatabase_getCompileCommands(CXCompilationDatabase,
- const char *CompleteFileName);
-
-/**
- * Get all the compile commands in the given compilation database.
- */
-CINDEX_LINKAGE CXCompileCommands
-clang_CompilationDatabase_getAllCompileCommands(CXCompilationDatabase);
-
-/**
- * Free the given CompileCommands
- */
-CINDEX_LINKAGE void clang_CompileCommands_dispose(CXCompileCommands);
-
-/**
- * Get the number of CompileCommand we have for a file
- */
-CINDEX_LINKAGE unsigned
-clang_CompileCommands_getSize(CXCompileCommands);
-
-/**
- * Get the I'th CompileCommand for a file
- *
- * Note : 0 <= i < clang_CompileCommands_getSize(CXCompileCommands)
- */
-CINDEX_LINKAGE CXCompileCommand
-clang_CompileCommands_getCommand(CXCompileCommands, unsigned I);
-
-/**
- * Get the working directory where the CompileCommand was executed from
- */
-CINDEX_LINKAGE CXString
-clang_CompileCommand_getDirectory(CXCompileCommand);
-
-/**
- * Get the filename associated with the CompileCommand.
- */
-CINDEX_LINKAGE CXString
-clang_CompileCommand_getFilename(CXCompileCommand);
-
-/**
- * Get the number of arguments in the compiler invocation.
- *
- */
-CINDEX_LINKAGE unsigned
-clang_CompileCommand_getNumArgs(CXCompileCommand);
-
-/**
- * Get the I'th argument value in the compiler invocations
- *
- * Invariant :
- * - argument 0 is the compiler executable
- */
-CINDEX_LINKAGE CXString
-clang_CompileCommand_getArg(CXCompileCommand, unsigned I);
-
-/**
- * Get the number of source mappings for the compiler invocation.
- */
-CINDEX_LINKAGE unsigned
-clang_CompileCommand_getNumMappedSources(CXCompileCommand);
-
-/**
- * Get the I'th mapped source path for the compiler invocation.
- */
-CINDEX_LINKAGE CXString
-clang_CompileCommand_getMappedSourcePath(CXCompileCommand, unsigned I);
-
-/**
- * Get the I'th mapped source content for the compiler invocation.
- */
-CINDEX_LINKAGE CXString
-clang_CompileCommand_getMappedSourceContent(CXCompileCommand, unsigned I);
-
-/**
- * @}
- */
-
-LLVM_CLANG_C_EXTERN_C_END
-
-#endif
-
diff --git a/ext/clang/include/clang-c/CXErrorCode.h b/ext/clang/include/clang-c/CXErrorCode.h
deleted file mode 100644
index b3a0b9d6..00000000
--- a/ext/clang/include/clang-c/CXErrorCode.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*===-- clang-c/CXErrorCode.h - C Index Error Codes --------------*- C -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This header provides the CXErrorCode enumerators. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_CLANG_C_CXERRORCODE_H
-#define LLVM_CLANG_C_CXERRORCODE_H
-
-#include "clang-c/ExternC.h"
-#include "clang-c/Platform.h"
-
-LLVM_CLANG_C_EXTERN_C_BEGIN
-
-/**
- * Error codes returned by libclang routines.
- *
- * Zero (\c CXError_Success) is the only error code indicating success. Other
- * error codes, including not yet assigned non-zero values, indicate errors.
- */
-enum CXErrorCode {
- /**
- * No error.
- */
- CXError_Success = 0,
-
- /**
- * A generic error code, no further details are available.
- *
- * Errors of this kind can get their own specific error codes in future
- * libclang versions.
- */
- CXError_Failure = 1,
-
- /**
- * libclang crashed while performing the requested operation.
- */
- CXError_Crashed = 2,
-
- /**
- * The function detected that the arguments violate the function
- * contract.
- */
- CXError_InvalidArguments = 3,
-
- /**
- * An AST deserialization error has occurred.
- */
- CXError_ASTReadError = 4
-};
-
-LLVM_CLANG_C_EXTERN_C_END
-
-#endif
-
diff --git a/ext/clang/include/clang-c/CXString.h b/ext/clang/include/clang-c/CXString.h
deleted file mode 100644
index f117010c..00000000
--- a/ext/clang/include/clang-c/CXString.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*===-- clang-c/CXString.h - C Index strings --------------------*- C -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This header provides the interface to C Index strings. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_CLANG_C_CXSTRING_H
-#define LLVM_CLANG_C_CXSTRING_H
-
-#include "clang-c/ExternC.h"
-#include "clang-c/Platform.h"
-
-LLVM_CLANG_C_EXTERN_C_BEGIN
-
-/**
- * \defgroup CINDEX_STRING String manipulation routines
- * \ingroup CINDEX
- *
- * @{
- */
-
-/**
- * A character string.
- *
- * The \c CXString type is used to return strings from the interface when
- * the ownership of that string might differ from one call to the next.
- * Use \c clang_getCString() to retrieve the string data and, once finished
- * with the string data, call \c clang_disposeString() to free the string.
- */
-typedef struct {
- const void *data;
- unsigned private_flags;
-} CXString;
-
-typedef struct {
- CXString *Strings;
- unsigned Count;
-} CXStringSet;
-
-/**
- * Retrieve the character data associated with the given string.
- */
-CINDEX_LINKAGE const char *clang_getCString(CXString string);
-
-/**
- * Free the given string.
- */
-CINDEX_LINKAGE void clang_disposeString(CXString string);
-
-/**
- * Free the given string set.
- */
-CINDEX_LINKAGE void clang_disposeStringSet(CXStringSet *set);
-
-/**
- * @}
- */
-
-LLVM_CLANG_C_EXTERN_C_END
-
-#endif
-
diff --git a/ext/clang/include/clang-c/Documentation.h b/ext/clang/include/clang-c/Documentation.h
deleted file mode 100644
index 5bece2cb..00000000
--- a/ext/clang/include/clang-c/Documentation.h
+++ /dev/null
@@ -1,555 +0,0 @@
-/*==-- clang-c/Documentation.h - Utilities for comment processing -*- C -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This header provides a supplementary interface for inspecting *|
-|* documentation comments. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_CLANG_C_DOCUMENTATION_H
-#define LLVM_CLANG_C_DOCUMENTATION_H
-
-#include "clang-c/ExternC.h"
-#include "clang-c/Index.h"
-
-LLVM_CLANG_C_EXTERN_C_BEGIN
-
-/**
- * \defgroup CINDEX_COMMENT Comment introspection
- *
- * The routines in this group provide access to information in documentation
- * comments. These facilities are distinct from the core and may be subject to
- * their own schedule of stability and deprecation.
- *
- * @{
- */
-
-/**
- * A parsed comment.
- */
-typedef struct {
- const void *ASTNode;
- CXTranslationUnit TranslationUnit;
-} CXComment;
-
-/**
- * Given a cursor that represents a documentable entity (e.g.,
- * declaration), return the associated parsed comment as a
- * \c CXComment_FullComment AST node.
- */
-CINDEX_LINKAGE CXComment clang_Cursor_getParsedComment(CXCursor C);
-
-/**
- * Describes the type of the comment AST node (\c CXComment). A comment
- * node can be considered block content (e. g., paragraph), inline content
- * (plain text) or neither (the root AST node).
- */
-enum CXCommentKind {
- /**
- * Null comment. No AST node is constructed at the requested location
- * because there is no text or a syntax error.
- */
- CXComment_Null = 0,
-
- /**
- * Plain text. Inline content.
- */
- CXComment_Text = 1,
-
- /**
- * A command with word-like arguments that is considered inline content.
- *
- * For example: \\c command.
- */
- CXComment_InlineCommand = 2,
-
- /**
- * HTML start tag with attributes (name-value pairs). Considered
- * inline content.
- *
- * For example:
- * \verbatim
- *
- * \endverbatim
- */
- CXComment_HTMLStartTag = 3,
-
- /**
- * HTML end tag. Considered inline content.
- *
- * For example:
- * \verbatim
- *
- * \endverbatim
- */
- CXComment_HTMLEndTag = 4,
-
- /**
- * A paragraph, contains inline comment. The paragraph itself is
- * block content.
- */
- CXComment_Paragraph = 5,
-
- /**
- * A command that has zero or more word-like arguments (number of
- * word-like arguments depends on command name) and a paragraph as an
- * argument. Block command is block content.
- *
- * Paragraph argument is also a child of the block command.
- *
- * For example: \has 0 word-like arguments and a paragraph argument.
- *
- * AST nodes of special kinds that parser knows about (e. g., \\param
- * command) have their own node kinds.
- */
- CXComment_BlockCommand = 6,
-
- /**
- * A \\param or \\arg command that describes the function parameter
- * (name, passing direction, description).
- *
- * For example: \\param [in] ParamName description.
- */
- CXComment_ParamCommand = 7,
-
- /**
- * A \\tparam command that describes a template parameter (name and
- * description).
- *
- * For example: \\tparam T description.
- */
- CXComment_TParamCommand = 8,
-
- /**
- * A verbatim block command (e. g., preformatted code). Verbatim
- * block has an opening and a closing command and contains multiple lines of
- * text (\c CXComment_VerbatimBlockLine child nodes).
- *
- * For example:
- * \\verbatim
- * aaa
- * \\endverbatim
- */
- CXComment_VerbatimBlockCommand = 9,
-
- /**
- * A line of text that is contained within a
- * CXComment_VerbatimBlockCommand node.
- */
- CXComment_VerbatimBlockLine = 10,
-
- /**
- * A verbatim line command. Verbatim line has an opening command,
- * a single line of text (up to the newline after the opening command) and
- * has no closing command.
- */
- CXComment_VerbatimLine = 11,
-
- /**
- * A full comment attached to a declaration, contains block content.
- */
- CXComment_FullComment = 12
-};
-
-/**
- * The most appropriate rendering mode for an inline command, chosen on
- * command semantics in Doxygen.
- */
-enum CXCommentInlineCommandRenderKind {
- /**
- * Command argument should be rendered in a normal font.
- */
- CXCommentInlineCommandRenderKind_Normal,
-
- /**
- * Command argument should be rendered in a bold font.
- */
- CXCommentInlineCommandRenderKind_Bold,
-
- /**
- * Command argument should be rendered in a monospaced font.
- */
- CXCommentInlineCommandRenderKind_Monospaced,
-
- /**
- * Command argument should be rendered emphasized (typically italic
- * font).
- */
- CXCommentInlineCommandRenderKind_Emphasized,
-
- /**
- * Command argument should not be rendered (since it only defines an anchor).
- */
- CXCommentInlineCommandRenderKind_Anchor
-};
-
-/**
- * Describes parameter passing direction for \\param or \\arg command.
- */
-enum CXCommentParamPassDirection {
- /**
- * The parameter is an input parameter.
- */
- CXCommentParamPassDirection_In,
-
- /**
- * The parameter is an output parameter.
- */
- CXCommentParamPassDirection_Out,
-
- /**
- * The parameter is an input and output parameter.
- */
- CXCommentParamPassDirection_InOut
-};
-
-/**
- * \param Comment AST node of any kind.
- *
- * \returns the type of the AST node.
- */
-CINDEX_LINKAGE enum CXCommentKind clang_Comment_getKind(CXComment Comment);
-
-/**
- * \param Comment AST node of any kind.
- *
- * \returns number of children of the AST node.
- */
-CINDEX_LINKAGE unsigned clang_Comment_getNumChildren(CXComment Comment);
-
-/**
- * \param Comment AST node of any kind.
- *
- * \param ChildIdx child index (zero-based).
- *
- * \returns the specified child of the AST node.
- */
-CINDEX_LINKAGE
-CXComment clang_Comment_getChild(CXComment Comment, unsigned ChildIdx);
-
-/**
- * A \c CXComment_Paragraph node is considered whitespace if it contains
- * only \c CXComment_Text nodes that are empty or whitespace.
- *
- * Other AST nodes (except \c CXComment_Paragraph and \c CXComment_Text) are
- * never considered whitespace.
- *
- * \returns non-zero if \c Comment is whitespace.
- */
-CINDEX_LINKAGE unsigned clang_Comment_isWhitespace(CXComment Comment);
-
-/**
- * \returns non-zero if \c Comment is inline content and has a newline
- * immediately following it in the comment text. Newlines between paragraphs
- * do not count.
- */
-CINDEX_LINKAGE
-unsigned clang_InlineContentComment_hasTrailingNewline(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_Text AST node.
- *
- * \returns text contained in the AST node.
- */
-CINDEX_LINKAGE CXString clang_TextComment_getText(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_InlineCommand AST node.
- *
- * \returns name of the inline command.
- */
-CINDEX_LINKAGE
-CXString clang_InlineCommandComment_getCommandName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_InlineCommand AST node.
- *
- * \returns the most appropriate rendering mode, chosen on command
- * semantics in Doxygen.
- */
-CINDEX_LINKAGE enum CXCommentInlineCommandRenderKind
-clang_InlineCommandComment_getRenderKind(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_InlineCommand AST node.
- *
- * \returns number of command arguments.
- */
-CINDEX_LINKAGE
-unsigned clang_InlineCommandComment_getNumArgs(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_InlineCommand AST node.
- *
- * \param ArgIdx argument index (zero-based).
- *
- * \returns text of the specified argument.
- */
-CINDEX_LINKAGE
-CXString clang_InlineCommandComment_getArgText(CXComment Comment,
- unsigned ArgIdx);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
- * node.
- *
- * \returns HTML tag name.
- */
-CINDEX_LINKAGE CXString clang_HTMLTagComment_getTagName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag AST node.
- *
- * \returns non-zero if tag is self-closing (for example, <br />).
- */
-CINDEX_LINKAGE
-unsigned clang_HTMLStartTagComment_isSelfClosing(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag AST node.
- *
- * \returns number of attributes (name-value pairs) attached to the start tag.
- */
-CINDEX_LINKAGE unsigned clang_HTMLStartTag_getNumAttrs(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag AST node.
- *
- * \param AttrIdx attribute index (zero-based).
- *
- * \returns name of the specified attribute.
- */
-CINDEX_LINKAGE
-CXString clang_HTMLStartTag_getAttrName(CXComment Comment, unsigned AttrIdx);
-
-/**
- * \param Comment a \c CXComment_HTMLStartTag AST node.
- *
- * \param AttrIdx attribute index (zero-based).
- *
- * \returns value of the specified attribute.
- */
-CINDEX_LINKAGE
-CXString clang_HTMLStartTag_getAttrValue(CXComment Comment, unsigned AttrIdx);
-
-/**
- * \param Comment a \c CXComment_BlockCommand AST node.
- *
- * \returns name of the block command.
- */
-CINDEX_LINKAGE
-CXString clang_BlockCommandComment_getCommandName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_BlockCommand AST node.
- *
- * \returns number of word-like arguments.
- */
-CINDEX_LINKAGE
-unsigned clang_BlockCommandComment_getNumArgs(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_BlockCommand AST node.
- *
- * \param ArgIdx argument index (zero-based).
- *
- * \returns text of the specified word-like argument.
- */
-CINDEX_LINKAGE
-CXString clang_BlockCommandComment_getArgText(CXComment Comment,
- unsigned ArgIdx);
-
-/**
- * \param Comment a \c CXComment_BlockCommand or
- * \c CXComment_VerbatimBlockCommand AST node.
- *
- * \returns paragraph argument of the block command.
- */
-CINDEX_LINKAGE
-CXComment clang_BlockCommandComment_getParagraph(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns parameter name.
- */
-CINDEX_LINKAGE
-CXString clang_ParamCommandComment_getParamName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns non-zero if the parameter that this AST node represents was found
- * in the function prototype and \c clang_ParamCommandComment_getParamIndex
- * function will return a meaningful value.
- */
-CINDEX_LINKAGE
-unsigned clang_ParamCommandComment_isParamIndexValid(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns zero-based parameter index in function prototype.
- */
-CINDEX_LINKAGE
-unsigned clang_ParamCommandComment_getParamIndex(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns non-zero if parameter passing direction was specified explicitly in
- * the comment.
- */
-CINDEX_LINKAGE
-unsigned clang_ParamCommandComment_isDirectionExplicit(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_ParamCommand AST node.
- *
- * \returns parameter passing direction.
- */
-CINDEX_LINKAGE
-enum CXCommentParamPassDirection clang_ParamCommandComment_getDirection(
- CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_TParamCommand AST node.
- *
- * \returns template parameter name.
- */
-CINDEX_LINKAGE
-CXString clang_TParamCommandComment_getParamName(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_TParamCommand AST node.
- *
- * \returns non-zero if the parameter that this AST node represents was found
- * in the template parameter list and
- * \c clang_TParamCommandComment_getDepth and
- * \c clang_TParamCommandComment_getIndex functions will return a meaningful
- * value.
- */
-CINDEX_LINKAGE
-unsigned clang_TParamCommandComment_isParamPositionValid(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_TParamCommand AST node.
- *
- * \returns zero-based nesting depth of this parameter in the template parameter list.
- *
- * For example,
- * \verbatim
- * template class TT>
- * void test(TT aaa);
- * \endverbatim
- * for C and TT nesting depth is 0,
- * for T nesting depth is 1.
- */
-CINDEX_LINKAGE
-unsigned clang_TParamCommandComment_getDepth(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_TParamCommand AST node.
- *
- * \returns zero-based parameter index in the template parameter list at a
- * given nesting depth.
- *
- * For example,
- * \verbatim
- * template class TT>
- * void test(TT aaa);
- * \endverbatim
- * for C and TT nesting depth is 0, so we can ask for index at depth 0:
- * at depth 0 C's index is 0, TT's index is 1.
- *
- * For T nesting depth is 1, so we can ask for index at depth 0 and 1:
- * at depth 0 T's index is 1 (same as TT's),
- * at depth 1 T's index is 0.
- */
-CINDEX_LINKAGE
-unsigned clang_TParamCommandComment_getIndex(CXComment Comment, unsigned Depth);
-
-/**
- * \param Comment a \c CXComment_VerbatimBlockLine AST node.
- *
- * \returns text contained in the AST node.
- */
-CINDEX_LINKAGE
-CXString clang_VerbatimBlockLineComment_getText(CXComment Comment);
-
-/**
- * \param Comment a \c CXComment_VerbatimLine AST node.
- *
- * \returns text contained in the AST node.
- */
-CINDEX_LINKAGE CXString clang_VerbatimLineComment_getText(CXComment Comment);
-
-/**
- * Convert an HTML tag AST node to string.
- *
- * \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
- * node.
- *
- * \returns string containing an HTML tag.
- */
-CINDEX_LINKAGE CXString clang_HTMLTagComment_getAsString(CXComment Comment);
-
-/**
- * Convert a given full parsed comment to an HTML fragment.
- *
- * Specific details of HTML layout are subject to change. Don't try to parse
- * this HTML back into an AST, use other APIs instead.
- *
- * Currently the following CSS classes are used:
- * \li "para-brief" for \paragraph and equivalent commands;
- * \li "para-returns" for \\returns paragraph and equivalent commands;
- * \li "word-returns" for the "Returns" word in \\returns paragraph.
- *
- * Function argument documentation is rendered as a \ list with arguments
- * sorted in function prototype order. CSS classes used:
- * \li "param-name-index-NUMBER" for parameter name (\- );
- * \li "param-descr-index-NUMBER" for parameter description (\
- );
- * \li "param-name-index-invalid" and "param-descr-index-invalid" are used if
- * parameter index is invalid.
- *
- * Template parameter documentation is rendered as a \
list with
- * parameters sorted in template parameter list order. CSS classes used:
- * \li "tparam-name-index-NUMBER" for parameter name (\- );
- * \li "tparam-descr-index-NUMBER" for parameter description (\
- );
- * \li "tparam-name-index-other" and "tparam-descr-index-other" are used for
- * names inside template template parameters;
- * \li "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used if
- * parameter position is invalid.
- *
- * \param Comment a \c CXComment_FullComment AST node.
- *
- * \returns string containing an HTML fragment.
- */
-CINDEX_LINKAGE CXString clang_FullComment_getAsHTML(CXComment Comment);
-
-/**
- * Convert a given full parsed comment to an XML document.
- *
- * A Relax NG schema for the XML can be found in comment-xml-schema.rng file
- * inside clang source tree.
- *
- * \param Comment a \c CXComment_FullComment AST node.
- *
- * \returns string containing an XML document.
- */
-CINDEX_LINKAGE CXString clang_FullComment_getAsXML(CXComment Comment);
-
-/**
- * @}
- */
-
-LLVM_CLANG_C_EXTERN_C_END
-
-#endif /* CLANG_C_DOCUMENTATION_H */
-
diff --git a/ext/clang/include/clang-c/ExternC.h b/ext/clang/include/clang-c/ExternC.h
deleted file mode 100644
index 384f24d4..00000000
--- a/ext/clang/include/clang-c/ExternC.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*===- clang-c/ExternC.h - Wrapper for 'extern "C"' ---------------*- C -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This file defines an 'extern "C"' wrapper. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_CLANG_C_EXTERN_C_H
-#define LLVM_CLANG_C_EXTERN_C_H
-
-#ifdef __clang__
-#define LLVM_CLANG_C_STRICT_PROTOTYPES_BEGIN \
- _Pragma("clang diagnostic push") \
- _Pragma("clang diagnostic error \"-Wstrict-prototypes\"")
-#define LLVM_CLANG_C_STRICT_PROTOTYPES_END _Pragma("clang diagnostic pop")
-#else
-#define LLVM_CLANG_C_STRICT_PROTOTYPES_BEGIN
-#define LLVM_CLANG_C_STRICT_PROTOTYPES_END
-#endif
-
-#ifdef __cplusplus
-#define LLVM_CLANG_C_EXTERN_C_BEGIN \
- extern "C" { \
- LLVM_CLANG_C_STRICT_PROTOTYPES_BEGIN
-#define LLVM_CLANG_C_EXTERN_C_END \
- LLVM_CLANG_C_STRICT_PROTOTYPES_END \
- }
-#else
-#define LLVM_CLANG_C_EXTERN_C_BEGIN LLVM_CLANG_C_STRICT_PROTOTYPES_BEGIN
-#define LLVM_CLANG_C_EXTERN_C_END LLVM_CLANG_C_STRICT_PROTOTYPES_END
-#endif
-
-#endif
diff --git a/ext/clang/include/clang-c/FatalErrorHandler.h b/ext/clang/include/clang-c/FatalErrorHandler.h
deleted file mode 100644
index 22f34fa8..00000000
--- a/ext/clang/include/clang-c/FatalErrorHandler.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*===-- clang-c/FatalErrorHandler.h - Fatal Error Handling --------*- C -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_CLANG_C_FATAL_ERROR_HANDLER_H
-#define LLVM_CLANG_C_FATAL_ERROR_HANDLER_H
-
-#include "clang-c/ExternC.h"
-
-LLVM_CLANG_C_EXTERN_C_BEGIN
-
-/**
- * Installs error handler that prints error message to stderr and calls abort().
- * Replaces currently installed error handler (if any).
- */
-void clang_install_aborting_llvm_fatal_error_handler(void);
-
-/**
- * Removes currently installed error handler (if any).
- * If no error handler is intalled, the default strategy is to print error
- * message to stderr and call exit(1).
- */
-void clang_uninstall_llvm_fatal_error_handler(void);
-
-LLVM_CLANG_C_EXTERN_C_END
-
-#endif
diff --git a/ext/clang/include/clang-c/Index.h b/ext/clang/include/clang-c/Index.h
deleted file mode 100644
index f28601c3..00000000
--- a/ext/clang/include/clang-c/Index.h
+++ /dev/null
@@ -1,6832 +0,0 @@
-/*===-- clang-c/Index.h - Indexing Public C Interface -------------*- C -*-===*\
-|* *|
-|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
-|* Exceptions. *|
-|* See https://llvm.org/LICENSE.txt for license information. *|
-|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
-|* *|
-|*===----------------------------------------------------------------------===*|
-|* *|
-|* This header provides a public interface to a Clang library for extracting *|
-|* high-level symbol information from source files without exposing the full *|
-|* Clang C++ API. *|
-|* *|
-\*===----------------------------------------------------------------------===*/
-
-#ifndef LLVM_CLANG_C_INDEX_H
-#define LLVM_CLANG_C_INDEX_H
-
-#include
-
-#include "clang-c/BuildSystem.h"
-#include "clang-c/CXErrorCode.h"
-#include "clang-c/CXString.h"
-#include "clang-c/ExternC.h"
-#include "clang-c/Platform.h"
-
-/**
- * The version constants for the libclang API.
- * CINDEX_VERSION_MINOR should increase when there are API additions.
- * CINDEX_VERSION_MAJOR is intended for "major" source/ABI breaking changes.
- *
- * The policy about the libclang API was always to keep it source and ABI
- * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
- */
-#define CINDEX_VERSION_MAJOR 0
-#define CINDEX_VERSION_MINOR 62
-
-#define CINDEX_VERSION_ENCODE(major, minor) (((major)*10000) + ((minor)*1))
-
-#define CINDEX_VERSION \
- CINDEX_VERSION_ENCODE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR)
-
-#define CINDEX_VERSION_STRINGIZE_(major, minor) #major "." #minor
-#define CINDEX_VERSION_STRINGIZE(major, minor) \
- CINDEX_VERSION_STRINGIZE_(major, minor)
-
-#define CINDEX_VERSION_STRING \
- CINDEX_VERSION_STRINGIZE(CINDEX_VERSION_MAJOR, CINDEX_VERSION_MINOR)
-
-LLVM_CLANG_C_EXTERN_C_BEGIN
-
-/** \defgroup CINDEX libclang: C Interface to Clang
- *
- * The C Interface to Clang provides a relatively small API that exposes
- * facilities for parsing source code into an abstract syntax tree (AST),
- * loading already-parsed ASTs, traversing the AST, associating
- * physical source locations with elements within the AST, and other
- * facilities that support Clang-based development tools.
- *
- * This C interface to Clang will never provide all of the information
- * representation stored in Clang's C++ AST, nor should it: the intent is to
- * maintain an API that is relatively stable from one release to the next,
- * providing only the basic functionality needed to support development tools.
- *
- * To avoid namespace pollution, data types are prefixed with "CX" and
- * functions are prefixed with "clang_".
- *
- * @{
- */
-
-/**
- * An "index" that consists of a set of translation units that would
- * typically be linked together into an executable or library.
- */
-typedef void *CXIndex;
-
-/**
- * An opaque type representing target information for a given translation
- * unit.
- */
-typedef struct CXTargetInfoImpl *CXTargetInfo;
-
-/**
- * A single translation unit, which resides in an index.
- */
-typedef struct CXTranslationUnitImpl *CXTranslationUnit;
-
-/**
- * Opaque pointer representing client data that will be passed through
- * to various callbacks and visitors.
- */
-typedef void *CXClientData;
-
-/**
- * Provides the contents of a file that has not yet been saved to disk.
- *
- * Each CXUnsavedFile instance provides the name of a file on the
- * system along with the current contents of that file that have not
- * yet been saved to disk.
- */
-struct CXUnsavedFile {
- /**
- * The file whose contents have not yet been saved.
- *
- * This file must already exist in the file system.
- */
- const char *Filename;
-
- /**
- * A buffer containing the unsaved contents of this file.
- */
- const char *Contents;
-
- /**
- * The length of the unsaved contents of this buffer.
- */
- unsigned long Length;
-};
-
-/**
- * Describes the availability of a particular entity, which indicates
- * whether the use of this entity will result in a warning or error due to
- * it being deprecated or unavailable.
- */
-enum CXAvailabilityKind {
- /**
- * The entity is available.
- */
- CXAvailability_Available,
- /**
- * The entity is available, but has been deprecated (and its use is
- * not recommended).
- */
- CXAvailability_Deprecated,
- /**
- * The entity is not available; any use of it will be an error.
- */
- CXAvailability_NotAvailable,
- /**
- * The entity is available, but not accessible; any use of it will be
- * an error.
- */
- CXAvailability_NotAccessible
-};
-
-/**
- * Describes a version number of the form major.minor.subminor.
- */
-typedef struct CXVersion {
- /**
- * The major version number, e.g., the '10' in '10.7.3'. A negative
- * value indicates that there is no version number at all.
- */
- int Major;
- /**
- * The minor version number, e.g., the '7' in '10.7.3'. This value
- * will be negative if no minor version number was provided, e.g., for
- * version '10'.
- */
- int Minor;
- /**
- * The subminor version number, e.g., the '3' in '10.7.3'. This value
- * will be negative if no minor or subminor version number was provided,
- * e.g., in version '10' or '10.7'.
- */
- int Subminor;
-} CXVersion;
-
-/**
- * Describes the exception specification of a cursor.
- *
- * A negative value indicates that the cursor is not a function declaration.
- */
-enum CXCursor_ExceptionSpecificationKind {
- /**
- * The cursor has no exception specification.
- */
- CXCursor_ExceptionSpecificationKind_None,
-
- /**
- * The cursor has exception specification throw()
- */
- CXCursor_ExceptionSpecificationKind_DynamicNone,
-
- /**
- * The cursor has exception specification throw(T1, T2)
- */
- CXCursor_ExceptionSpecificationKind_Dynamic,
-
- /**
- * The cursor has exception specification throw(...).
- */
- CXCursor_ExceptionSpecificationKind_MSAny,
-
- /**
- * The cursor has exception specification basic noexcept.
- */
- CXCursor_ExceptionSpecificationKind_BasicNoexcept,
-
- /**
- * The cursor has exception specification computed noexcept.
- */
- CXCursor_ExceptionSpecificationKind_ComputedNoexcept,
-
- /**
- * The exception specification has not yet been evaluated.
- */
- CXCursor_ExceptionSpecificationKind_Unevaluated,
-
- /**
- * The exception specification has not yet been instantiated.
- */
- CXCursor_ExceptionSpecificationKind_Uninstantiated,
-
- /**
- * The exception specification has not been parsed yet.
- */
- CXCursor_ExceptionSpecificationKind_Unparsed,
-
- /**
- * The cursor has a __declspec(nothrow) exception specification.
- */
- CXCursor_ExceptionSpecificationKind_NoThrow
-};
-
-/**
- * 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).
- */
-CINDEX_LINKAGE CXIndex clang_createIndex(int excludeDeclarationsFromPCH,
- int displayDiagnostics);
-
-/**
- * Destroy the given index.
- *
- * The index must not be destroyed until all of the translation units created
- * within that index have been destroyed.
- */
-CINDEX_LINKAGE void clang_disposeIndex(CXIndex index);
-
-typedef enum {
- /**
- * Used to indicate that no special CXIndex options are needed.
- */
- CXGlobalOpt_None = 0x0,
-
- /**
- * Used to indicate that threads that libclang creates for indexing
- * purposes should use background priority.
- *
- * Affects #clang_indexSourceFile, #clang_indexTranslationUnit,
- * #clang_parseTranslationUnit, #clang_saveTranslationUnit.
- */
- CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 0x1,
-
- /**
- * Used to indicate that threads that libclang creates for editing
- * purposes should use background priority.
- *
- * Affects #clang_reparseTranslationUnit, #clang_codeCompleteAt,
- * #clang_annotateTokens
- */
- CXGlobalOpt_ThreadBackgroundPriorityForEditing = 0x2,
-
- /**
- * Used to indicate that all threads that libclang creates should use
- * background priority.
- */
- CXGlobalOpt_ThreadBackgroundPriorityForAll =
- CXGlobalOpt_ThreadBackgroundPriorityForIndexing |
- CXGlobalOpt_ThreadBackgroundPriorityForEditing
-
-} CXGlobalOptFlags;
-
-/**
- * Sets general options associated with a CXIndex.
- *
- * For example:
- * \code
- * CXIndex idx = ...;
- * clang_CXIndex_setGlobalOptions(idx,
- * clang_CXIndex_getGlobalOptions(idx) |
- * CXGlobalOpt_ThreadBackgroundPriorityForIndexing);
- * \endcode
- *
- * \param options A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags.
- */
-CINDEX_LINKAGE void clang_CXIndex_setGlobalOptions(CXIndex, unsigned options);
-
-/**
- * Gets the general options associated with a CXIndex.
- *
- * \returns A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags that
- * are associated with the given CXIndex object.
- */
-CINDEX_LINKAGE unsigned clang_CXIndex_getGlobalOptions(CXIndex);
-
-/**
- * Sets the invocation emission path option in a CXIndex.
- *
- * The invocation emission path specifies a path which will contain log
- * files for certain libclang invocations. A null value (default) implies that
- * libclang invocations are not logged..
- */
-CINDEX_LINKAGE void
-clang_CXIndex_setInvocationEmissionPathOption(CXIndex, const char *Path);
-
-/**
- * \defgroup CINDEX_FILES File manipulation routines
- *
- * @{
- */
-
-/**
- * A particular source file that is part of a translation unit.
- */
-typedef void *CXFile;
-
-/**
- * Retrieve the complete file and path name of the given file.
- */
-CINDEX_LINKAGE CXString clang_getFileName(CXFile SFile);
-
-/**
- * Retrieve the last modification time of the given file.
- */
-CINDEX_LINKAGE time_t clang_getFileTime(CXFile SFile);
-
-/**
- * Uniquely identifies a CXFile, that refers to the same underlying file,
- * across an indexing session.
- */
-typedef struct {
- unsigned long long data[3];
-} CXFileUniqueID;
-
-/**
- * Retrieve the unique ID for the given \c file.
- *
- * \param file the file to get the ID for.
- * \param outID stores the returned CXFileUniqueID.
- * \returns If there was a failure getting the unique ID, returns non-zero,
- * otherwise returns 0.
- */
-CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID);
-
-/**
- * Determine whether the given header is guarded against
- * multiple inclusions, either with the conventional
- * \#ifndef/\#define/\#endif macro guards or with \#pragma once.
- */
-CINDEX_LINKAGE unsigned clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu,
- CXFile file);
-
-/**
- * Retrieve a file handle within the given translation unit.
- *
- * \param tu the translation unit
- *
- * \param file_name the name of the file.
- *
- * \returns the file handle for the named file in the translation unit \p tu,
- * or a NULL file handle if the file was not a part of this translation unit.
- */
-CINDEX_LINKAGE CXFile clang_getFile(CXTranslationUnit tu,
- const char *file_name);
-
-/**
- * Retrieve the buffer associated with the given file.
- *
- * \param tu the translation unit
- *
- * \param file the file for which to retrieve the buffer.
- *
- * \param size [out] if non-NULL, will be set to the size of the buffer.
- *
- * \returns a pointer to the buffer in memory that holds the contents of
- * \p file, or a NULL pointer when the file is not loaded.
- */
-CINDEX_LINKAGE const char *clang_getFileContents(CXTranslationUnit tu,
- CXFile file, size_t *size);
-
-/**
- * Returns non-zero if the \c file1 and \c file2 point to the same file,
- * or they are both NULL.
- */
-CINDEX_LINKAGE int clang_File_isEqual(CXFile file1, CXFile file2);
-
-/**
- * Returns the real path name of \c file.
- *
- * An empty string may be returned. Use \c clang_getFileName() in that case.
- */
-CINDEX_LINKAGE CXString clang_File_tryGetRealPathName(CXFile file);
-
-/**
- * @}
- */
-
-/**
- * \defgroup CINDEX_LOCATIONS Physical source locations
- *
- * Clang represents physical source locations in its abstract syntax tree in
- * great detail, with file, line, and column information for the majority of
- * the tokens parsed in the source code. These data types and functions are
- * used to represent source location information, either for a particular
- * point in the program or for a range of points in the program, and extract
- * specific location information from those data types.
- *
- * @{
- */
-
-/**
- * Identifies a specific source location within a translation
- * unit.
- *
- * Use clang_getExpansionLocation() or clang_getSpellingLocation()
- * to map a source location to a particular file, line, and column.
- */
-typedef struct {
- const void *ptr_data[2];
- unsigned int_data;
-} CXSourceLocation;
-
-/**
- * Identifies a half-open character range in the source code.
- *
- * Use clang_getRangeStart() and clang_getRangeEnd() to retrieve the
- * starting and end locations from a source range, respectively.
- */
-typedef struct {
- const void *ptr_data[2];
- unsigned begin_int_data;
- unsigned end_int_data;
-} CXSourceRange;
-
-/**
- * Retrieve a NULL (invalid) source location.
- */
-CINDEX_LINKAGE CXSourceLocation clang_getNullLocation(void);
-
-/**
- * Determine whether two source locations, which must refer into
- * the same translation unit, refer to exactly the same point in the source
- * code.
- *
- * \returns non-zero if the source locations refer to the same location, zero
- * if they refer to different locations.
- */
-CINDEX_LINKAGE unsigned clang_equalLocations(CXSourceLocation loc1,
- CXSourceLocation loc2);
-
-/**
- * Retrieves the source location associated with a given file/line/column
- * in a particular translation unit.
- */
-CINDEX_LINKAGE CXSourceLocation clang_getLocation(CXTranslationUnit tu,
- CXFile file, unsigned line,
- unsigned column);
-/**
- * Retrieves the source location associated with a given character offset
- * in a particular translation unit.
- */
-CINDEX_LINKAGE CXSourceLocation clang_getLocationForOffset(CXTranslationUnit tu,
- CXFile file,
- unsigned offset);
-
-/**
- * Returns non-zero if the given source location is in a system header.
- */
-CINDEX_LINKAGE int clang_Location_isInSystemHeader(CXSourceLocation location);
-
-/**
- * Returns non-zero if the given source location is in the main file of
- * the corresponding translation unit.
- */
-CINDEX_LINKAGE int clang_Location_isFromMainFile(CXSourceLocation location);
-
-/**
- * Retrieve a NULL (invalid) source range.
- */
-CINDEX_LINKAGE CXSourceRange clang_getNullRange(void);
-
-/**
- * Retrieve a source range given the beginning and ending source
- * locations.
- */
-CINDEX_LINKAGE CXSourceRange clang_getRange(CXSourceLocation begin,
- CXSourceLocation end);
-
-/**
- * Determine whether two ranges are equivalent.
- *
- * \returns non-zero if the ranges are the same, zero if they differ.
- */
-CINDEX_LINKAGE unsigned clang_equalRanges(CXSourceRange range1,
- CXSourceRange range2);
-
-/**
- * Returns non-zero if \p range is null.
- */
-CINDEX_LINKAGE int clang_Range_isNull(CXSourceRange range);
-
-/**
- * Retrieve the file, line, column, and offset represented by
- * the given source location.
- *
- * If the location refers into a macro expansion, retrieves the
- * location of the macro expansion.
- *
- * \param location the location within a source file that will be decomposed
- * into its parts.
- *
- * \param file [out] if non-NULL, will be set to the file to which the given
- * source location points.
- *
- * \param line [out] if non-NULL, will be set to the line to which the given
- * source location points.
- *
- * \param column [out] if non-NULL, will be set to the column to which the given
- * source location points.
- *
- * \param offset [out] if non-NULL, will be set to the offset into the
- * buffer to which the given source location points.
- */
-CINDEX_LINKAGE void clang_getExpansionLocation(CXSourceLocation location,
- CXFile *file, unsigned *line,
- unsigned *column,
- unsigned *offset);
-
-/**
- * Retrieve the file, line and column represented by the given source
- * location, as specified in a # line directive.
- *
- * Example: given the following source code in a file somefile.c
- *
- * \code
- * #123 "dummy.c" 1
- *
- * static int func(void)
- * {
- * return 0;
- * }
- * \endcode
- *
- * the location information returned by this function would be
- *
- * File: dummy.c Line: 124 Column: 12
- *
- * whereas clang_getExpansionLocation would have returned
- *
- * File: somefile.c Line: 3 Column: 12
- *
- * \param location the location within a source file that will be decomposed
- * into its parts.
- *
- * \param filename [out] if non-NULL, will be set to the filename of the
- * source location. Note that filenames returned will be for "virtual" files,
- * which don't necessarily exist on the machine running clang - e.g. when
- * parsing preprocessed output obtained from a different environment. If
- * a non-NULL value is passed in, remember to dispose of the returned value
- * using \c clang_disposeString() once you've finished with it. For an invalid
- * source location, an empty string is returned.
- *
- * \param line [out] if non-NULL, will be set to the line number of the
- * source location. For an invalid source location, zero is returned.
- *
- * \param column [out] if non-NULL, will be set to the column number of the
- * source location. For an invalid source location, zero is returned.
- */
-CINDEX_LINKAGE void clang_getPresumedLocation(CXSourceLocation location,
- CXString *filename,
- unsigned *line, unsigned *column);
-
-/**
- * Legacy API to retrieve the file, line, column, and offset represented
- * by the given source location.
- *
- * This interface has been replaced by the newer interface
- * #clang_getExpansionLocation(). See that interface's documentation for
- * details.
- */
-CINDEX_LINKAGE void clang_getInstantiationLocation(CXSourceLocation location,
- CXFile *file, unsigned *line,
- unsigned *column,
- unsigned *offset);
-
-/**
- * Retrieve the file, line, column, and offset represented by
- * the given source location.
- *
- * If the location refers into a macro instantiation, return where the
- * location was originally spelled in the source file.
- *
- * \param location the location within a source file that will be decomposed
- * into its parts.
- *
- * \param file [out] if non-NULL, will be set to the file to which the given
- * source location points.
- *
- * \param line [out] if non-NULL, will be set to the line to which the given
- * source location points.
- *
- * \param column [out] if non-NULL, will be set to the column to which the given
- * source location points.
- *
- * \param offset [out] if non-NULL, will be set to the offset into the
- * buffer to which the given source location points.
- */
-CINDEX_LINKAGE void clang_getSpellingLocation(CXSourceLocation location,
- CXFile *file, unsigned *line,
- unsigned *column,
- unsigned *offset);
-
-/**
- * Retrieve the file, line, column, and offset represented by
- * the given source location.
- *
- * If the location refers into a macro expansion, return where the macro was
- * expanded or where the macro argument was written, if the location points at
- * a macro argument.
- *
- * \param location the location within a source file that will be decomposed
- * into its parts.
- *
- * \param file [out] if non-NULL, will be set to the file to which the given
- * source location points.
- *
- * \param line [out] if non-NULL, will be set to the line to which the given
- * source location points.
- *
- * \param column [out] if non-NULL, will be set to the column to which the given
- * source location points.
- *
- * \param offset [out] if non-NULL, will be set to the offset into the
- * buffer to which the given source location points.
- */
-CINDEX_LINKAGE void clang_getFileLocation(CXSourceLocation location,
- CXFile *file, unsigned *line,
- unsigned *column, unsigned *offset);
-
-/**
- * Retrieve a source location representing the first character within a
- * source range.
- */
-CINDEX_LINKAGE CXSourceLocation clang_getRangeStart(CXSourceRange range);
-
-/**
- * Retrieve a source location representing the last character within a
- * source range.
- */
-CINDEX_LINKAGE CXSourceLocation clang_getRangeEnd(CXSourceRange range);
-
-/**
- * Identifies an array of ranges.
- */
-typedef struct {
- /** The number of ranges in the \c ranges array. */
- unsigned count;
- /**
- * An array of \c CXSourceRanges.
- */
- CXSourceRange *ranges;
-} CXSourceRangeList;
-
-/**
- * Retrieve all ranges that were skipped by the preprocessor.
- *
- * The preprocessor will skip lines when they are surrounded by an
- * if/ifdef/ifndef directive whose condition does not evaluate to true.
- */
-CINDEX_LINKAGE CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit tu,
- CXFile file);
-
-/**
- * Retrieve all ranges from all files that were skipped by the
- * preprocessor.
- *
- * The preprocessor will skip lines when they are surrounded by an
- * if/ifdef/ifndef directive whose condition does not evaluate to true.
- */
-CINDEX_LINKAGE CXSourceRangeList *
-clang_getAllSkippedRanges(CXTranslationUnit tu);
-
-/**
- * Destroy the given \c CXSourceRangeList.
- */
-CINDEX_LINKAGE void clang_disposeSourceRangeList(CXSourceRangeList *ranges);
-
-/**
- * @}
- */
-
-/**
- * \defgroup CINDEX_DIAG Diagnostic reporting
- *
- * @{
- */
-
-/**
- * Describes the severity of a particular diagnostic.
- */
-enum CXDiagnosticSeverity {
- /**
- * A diagnostic that has been suppressed, e.g., by a command-line
- * option.
- */
- CXDiagnostic_Ignored = 0,
-
- /**
- * This diagnostic is a note that should be attached to the
- * previous (non-note) diagnostic.
- */
- CXDiagnostic_Note = 1,
-
- /**
- * This diagnostic indicates suspicious code that may not be
- * wrong.
- */
- CXDiagnostic_Warning = 2,
-
- /**
- * This diagnostic indicates that the code is ill-formed.
- */
- CXDiagnostic_Error = 3,
-
- /**
- * This diagnostic indicates that the code is ill-formed such
- * that future parser recovery is unlikely to produce useful
- * results.
- */
- CXDiagnostic_Fatal = 4
-};
-
-/**
- * A single diagnostic, containing the diagnostic's severity,
- * location, text, source ranges, and fix-it hints.
- */
-typedef void *CXDiagnostic;
-
-/**
- * A group of CXDiagnostics.
- */
-typedef void *CXDiagnosticSet;
-
-/**
- * Determine the number of diagnostics in a CXDiagnosticSet.
- */
-CINDEX_LINKAGE unsigned clang_getNumDiagnosticsInSet(CXDiagnosticSet Diags);
-
-/**
- * Retrieve a diagnostic associated with the given CXDiagnosticSet.
- *
- * \param Diags the CXDiagnosticSet to query.
- * \param Index the zero-based diagnostic number to retrieve.
- *
- * \returns the requested diagnostic. This diagnostic must be freed
- * via a call to \c clang_disposeDiagnostic().
- */
-CINDEX_LINKAGE CXDiagnostic clang_getDiagnosticInSet(CXDiagnosticSet Diags,
- unsigned Index);
-
-/**
- * Describes the kind of error that occurred (if any) in a call to
- * \c clang_loadDiagnostics.
- */
-enum CXLoadDiag_Error {
- /**
- * Indicates that no error occurred.
- */
- CXLoadDiag_None = 0,
-
- /**
- * Indicates that an unknown error occurred while attempting to
- * deserialize diagnostics.
- */
- CXLoadDiag_Unknown = 1,
-
- /**
- * Indicates that the file containing the serialized diagnostics
- * could not be opened.
- */
- CXLoadDiag_CannotLoad = 2,
-
- /**
- * Indicates that the serialized diagnostics file is invalid or
- * corrupt.
- */
- CXLoadDiag_InvalidFile = 3
-};
-
-/**
- * Deserialize a set of diagnostics from a Clang diagnostics bitcode
- * file.
- *
- * \param file The name of the file to deserialize.
- * \param error A pointer to a enum value recording if there was a problem
- * deserializing the diagnostics.
- * \param errorString A pointer to a CXString for recording the error string
- * if the file was not successfully loaded.
- *
- * \returns A loaded CXDiagnosticSet if successful, and NULL otherwise. These
- * diagnostics should be released using clang_disposeDiagnosticSet().
- */
-CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics(
- const char *file, enum CXLoadDiag_Error *error, CXString *errorString);
-
-/**
- * Release a CXDiagnosticSet and all of its contained diagnostics.
- */
-CINDEX_LINKAGE void clang_disposeDiagnosticSet(CXDiagnosticSet Diags);
-
-/**
- * Retrieve the child diagnostics of a CXDiagnostic.
- *
- * This CXDiagnosticSet does not need to be released by
- * clang_disposeDiagnosticSet.
- */
-CINDEX_LINKAGE CXDiagnosticSet clang_getChildDiagnostics(CXDiagnostic D);
-
-/**
- * Determine the number of diagnostics produced for the given
- * translation unit.
- */
-CINDEX_LINKAGE unsigned clang_getNumDiagnostics(CXTranslationUnit Unit);
-
-/**
- * Retrieve a diagnostic associated with the given translation unit.
- *
- * \param Unit the translation unit to query.
- * \param Index the zero-based diagnostic number to retrieve.
- *
- * \returns the requested diagnostic. This diagnostic must be freed
- * via a call to \c clang_disposeDiagnostic().
- */
-CINDEX_LINKAGE CXDiagnostic clang_getDiagnostic(CXTranslationUnit Unit,
- unsigned Index);
-
-/**
- * Retrieve the complete set of diagnostics associated with a
- * translation unit.
- *
- * \param Unit the translation unit to query.
- */
-CINDEX_LINKAGE CXDiagnosticSet
-clang_getDiagnosticSetFromTU(CXTranslationUnit Unit);
-
-/**
- * Destroy a diagnostic.
- */
-CINDEX_LINKAGE void clang_disposeDiagnostic(CXDiagnostic Diagnostic);
-
-/**
- * Options to control the display of diagnostics.
- *
- * The values in this enum are meant to be combined to customize the
- * behavior of \c clang_formatDiagnostic().
- */
-enum CXDiagnosticDisplayOptions {
- /**
- * Display the source-location information where the
- * diagnostic was located.
- *
- * When set, diagnostics will be prefixed by the file, line, and
- * (optionally) column to which the diagnostic refers. For example,
- *
- * \code
- * test.c:28: warning: extra tokens at end of #endif directive
- * \endcode
- *
- * This option corresponds to the clang flag \c -fshow-source-location.
- */
- CXDiagnostic_DisplaySourceLocation = 0x01,
-
- /**
- * If displaying the source-location information of the
- * diagnostic, also include the column number.
- *
- * This option corresponds to the clang flag \c -fshow-column.
- */
- CXDiagnostic_DisplayColumn = 0x02,
-
- /**
- * If displaying the source-location information of the
- * diagnostic, also include information about source ranges in a
- * machine-parsable format.
- *
- * This option corresponds to the clang flag
- * \c -fdiagnostics-print-source-range-info.
- */
- CXDiagnostic_DisplaySourceRanges = 0x04,
-
- /**
- * Display the option name associated with this diagnostic, if any.
- *
- * The option name displayed (e.g., -Wconversion) will be placed in brackets
- * after the diagnostic text. This option corresponds to the clang flag
- * \c -fdiagnostics-show-option.
- */
- CXDiagnostic_DisplayOption = 0x08,
-
- /**
- * Display the category number associated with this diagnostic, if any.
- *
- * The category number is displayed within brackets after the diagnostic text.
- * This option corresponds to the clang flag
- * \c -fdiagnostics-show-category=id.
- */
- CXDiagnostic_DisplayCategoryId = 0x10,
-
- /**
- * Display the category name associated with this diagnostic, if any.
- *
- * The category name is displayed within brackets after the diagnostic text.
- * This option corresponds to the clang flag
- * \c -fdiagnostics-show-category=name.
- */
- CXDiagnostic_DisplayCategoryName = 0x20
-};
-
-/**
- * Format the given diagnostic in a manner that is suitable for display.
- *
- * This routine will format the given diagnostic to a string, rendering
- * the diagnostic according to the various options given. The
- * \c clang_defaultDiagnosticDisplayOptions() function returns the set of
- * options that most closely mimics the behavior of the clang compiler.
- *
- * \param Diagnostic The diagnostic to print.
- *
- * \param Options A set of options that control the diagnostic display,
- * created by combining \c CXDiagnosticDisplayOptions values.
- *
- * \returns A new string containing for formatted diagnostic.
- */
-CINDEX_LINKAGE CXString clang_formatDiagnostic(CXDiagnostic Diagnostic,
- unsigned Options);
-
-/**
- * Retrieve the set of display options most similar to the
- * default behavior of the clang compiler.
- *
- * \returns A set of display options suitable for use with \c
- * clang_formatDiagnostic().
- */
-CINDEX_LINKAGE unsigned clang_defaultDiagnosticDisplayOptions(void);
-
-/**
- * Determine the severity of the given diagnostic.
- */
-CINDEX_LINKAGE enum CXDiagnosticSeverity
- clang_getDiagnosticSeverity(CXDiagnostic);
-
-/**
- * Retrieve the source location of the given diagnostic.
- *
- * This location is where Clang would print the caret ('^') when
- * displaying the diagnostic on the command line.
- */
-CINDEX_LINKAGE CXSourceLocation clang_getDiagnosticLocation(CXDiagnostic);
-
-/**
- * Retrieve the text of the given diagnostic.
- */
-CINDEX_LINKAGE CXString clang_getDiagnosticSpelling(CXDiagnostic);
-
-/**
- * Retrieve the name of the command-line option that enabled this
- * diagnostic.
- *
- * \param Diag The diagnostic to be queried.
- *
- * \param Disable If non-NULL, will be set to the option that disables this
- * diagnostic (if any).
- *
- * \returns A string that contains the command-line option used to enable this
- * warning, such as "-Wconversion" or "-pedantic".
- */
-CINDEX_LINKAGE CXString clang_getDiagnosticOption(CXDiagnostic Diag,
- CXString *Disable);
-
-/**
- * Retrieve the category number for this diagnostic.
- *
- * Diagnostics can be categorized into groups along with other, related
- * diagnostics (e.g., diagnostics under the same warning flag). This routine
- * retrieves the category number for the given diagnostic.
- *
- * \returns The number of the category that contains this diagnostic, or zero
- * if this diagnostic is uncategorized.
- */
-CINDEX_LINKAGE unsigned clang_getDiagnosticCategory(CXDiagnostic);
-
-/**
- * Retrieve the name of a particular diagnostic category. This
- * is now deprecated. Use clang_getDiagnosticCategoryText()
- * instead.
- *
- * \param Category A diagnostic category number, as returned by
- * \c clang_getDiagnosticCategory().
- *
- * \returns The name of the given diagnostic category.
- */
-CINDEX_DEPRECATED CINDEX_LINKAGE CXString
-clang_getDiagnosticCategoryName(unsigned Category);
-
-/**
- * Retrieve the diagnostic category text for a given diagnostic.
- *
- * \returns The text of the given diagnostic category.
- */
-CINDEX_LINKAGE CXString clang_getDiagnosticCategoryText(CXDiagnostic);
-
-/**
- * Determine the number of source ranges associated with the given
- * diagnostic.
- */
-CINDEX_LINKAGE unsigned clang_getDiagnosticNumRanges(CXDiagnostic);
-
-/**
- * Retrieve a source range associated with the diagnostic.
- *
- * A diagnostic's source ranges highlight important elements in the source
- * code. On the command line, Clang displays source ranges by
- * underlining them with '~' characters.
- *
- * \param Diagnostic the diagnostic whose range is being extracted.
- *
- * \param Range the zero-based index specifying which range to
- *
- * \returns the requested source range.
- */
-CINDEX_LINKAGE CXSourceRange clang_getDiagnosticRange(CXDiagnostic Diagnostic,
- unsigned Range);
-
-/**
- * Determine the number of fix-it hints associated with the
- * given diagnostic.
- */
-CINDEX_LINKAGE unsigned clang_getDiagnosticNumFixIts(CXDiagnostic Diagnostic);
-
-/**
- * Retrieve the replacement information for a given fix-it.
- *
- * Fix-its are described in terms of a source range whose contents
- * should be replaced by a string. This approach generalizes over
- * three kinds of operations: removal of source code (the range covers
- * the code to be removed and the replacement string is empty),
- * replacement of source code (the range covers the code to be
- * replaced and the replacement string provides the new code), and
- * insertion (both the start and end of the range point at the
- * insertion location, and the replacement string provides the text to
- * insert).
- *
- * \param Diagnostic The diagnostic whose fix-its are being queried.
- *
- * \param FixIt The zero-based index of the fix-it.
- *
- * \param ReplacementRange The source range whose contents will be
- * replaced with the returned replacement string. Note that source
- * ranges are half-open ranges [a, b), so the source code should be
- * replaced from a and up to (but not including) b.
- *
- * \returns A string containing text that should be replace the source
- * code indicated by the \c ReplacementRange.
- */
-CINDEX_LINKAGE CXString clang_getDiagnosticFixIt(
- CXDiagnostic Diagnostic, unsigned FixIt, CXSourceRange *ReplacementRange);
-
-/**
- * @}
- */
-
-/**
- * \defgroup CINDEX_TRANSLATION_UNIT Translation unit manipulation
- *
- * The routines in this group provide the ability to create and destroy
- * translation units from files, either by parsing the contents of the files or
- * by reading in a serialized representation of a translation unit.
- *
- * @{
- */
-
-/**
- * Get the original translation unit source file name.
- */
-CINDEX_LINKAGE CXString
-clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit);
-
-/**
- * Return the CXTranslationUnit for a given source file and the provided
- * command line arguments one would pass to the compiler.
- *
- * Note: The 'source_filename' argument is optional. If the caller provides a
- * NULL pointer, the name of the source file is expected to reside in the
- * specified command line arguments.
- *
- * Note: When encountered in 'clang_command_line_args', the following options
- * are ignored:
- *
- * '-c'
- * '-emit-ast'
- * '-fsyntax-only'
- * '-o \