Class ClangCompilationDatabase


  • public class ClangCompilationDatabase
    extends java.lang.Object
    • Method Detail

      • nclang_CompilationDatabase_fromDirectory

        public static long nclang_CompilationDatabase_fromDirectory​(long BuildDir,
                                                                    long ErrorCode)
      • clang_CompilationDatabase_fromDirectory

        public static long clang_CompilationDatabase_fromDirectory​(java.nio.ByteBuffer BuildDir,
                                                                   java.nio.IntBuffer ErrorCode)
        
        public static long clang_CompilationDatabase_fromDirectory​(java.lang.CharSequence BuildDir,
                                                                   java.nio.IntBuffer ErrorCode)
        
        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 clang_CompilationDatabase_dispose.

      • clang_CompilationDatabase_dispose

        public static void clang_CompilationDatabase_dispose​(long database)
        Free the given compilation database
      • nclang_CompilationDatabase_getCompileCommands

        public static long nclang_CompilationDatabase_getCompileCommands​(long database,
                                                                         long CompleteFileName)
      • clang_CompilationDatabase_getCompileCommands

        public static long clang_CompilationDatabase_getCompileCommands​(long database,
                                                                        java.nio.ByteBuffer CompleteFileName)
        
        public static long clang_CompilationDatabase_getCompileCommands​(long database,
                                                                        java.lang.CharSequence CompleteFileName)
        
        Find the compile commands used for a file. The compile commands must be freed by clang_CompileCommands_dispose.
      • clang_CompilationDatabase_getAllCompileCommands

        public static long clang_CompilationDatabase_getAllCompileCommands​(long database)
        Get all the compile commands in the given compilation database.
      • clang_CompileCommands_dispose

        public static void clang_CompileCommands_dispose​(long commands)
        Free the given CompileCommands
      • clang_CompileCommands_getSize

        public static int clang_CompileCommands_getSize​(long commands)
        Get the number of CompileCommand we have for a file
      • clang_CompileCommands_getCommand

        public static long clang_CompileCommands_getCommand​(long commands,
                                                            int I)
        Get the I'th CompileCommand for a file

        Note : 0 <= i <clang_CompileCommands_getSize(CXCompileCommands)

      • nclang_CompileCommand_getDirectory

        public static void nclang_CompileCommand_getDirectory​(long command,
                                                              long __functionAddress,
                                                              long __result)
        
        public static void nclang_CompileCommand_getDirectory​(long command,
                                                              long __result)
        
        Unsafe version of: CompileCommand_getDirectory
      • clang_CompileCommand_getDirectory

        public static CXString clang_CompileCommand_getDirectory​(long command,
                                                                 CXString __result)
        Get the working directory where the CompileCommand was executed from
      • nclang_CompileCommand_getFilename

        public static void nclang_CompileCommand_getFilename​(long command,
                                                             long __functionAddress,
                                                             long __result)
        
        public static void nclang_CompileCommand_getFilename​(long command,
                                                             long __result)
        
        Unsafe version of: CompileCommand_getFilename
      • clang_CompileCommand_getFilename

        public static CXString clang_CompileCommand_getFilename​(long command,
                                                                CXString __result)
        Get the filename associated with the CompileCommand.
      • clang_CompileCommand_getNumArgs

        public static int clang_CompileCommand_getNumArgs​(long command)
        Get the number of arguments in the compiler invocation.
      • nclang_CompileCommand_getArg

        public static void nclang_CompileCommand_getArg​(long command,
                                                        int I,
                                                        long __functionAddress,
                                                        long __result)
        
        public static void nclang_CompileCommand_getArg​(long command,
                                                        int I,
                                                        long __result)
        
        Unsafe version of: CompileCommand_getArg
      • clang_CompileCommand_getArg

        public static CXString clang_CompileCommand_getArg​(long command,
                                                           int I,
                                                           CXString __result)
        Get the I'th argument value in the compiler invocations

        Invariant :

        • argument 0 is the compiler executable
      • clang_CompileCommand_getNumMappedSources

        public static int clang_CompileCommand_getNumMappedSources​(long command)
        Get the number of source mappings for the compiler invocation.
      • nclang_CompileCommand_getMappedSourcePath

        public static void nclang_CompileCommand_getMappedSourcePath​(long command,
                                                                     int I,
                                                                     long __functionAddress,
                                                                     long __result)
        
        public static void nclang_CompileCommand_getMappedSourcePath​(long command,
                                                                     int I,
                                                                     long __result)
        
      • clang_CompileCommand_getMappedSourcePath

        public static CXString clang_CompileCommand_getMappedSourcePath​(long command,
                                                                        int I,
                                                                        CXString __result)
        Get the I'th mapped source path for the compiler invocation.
      • nclang_CompileCommand_getMappedSourceContent

        public static void nclang_CompileCommand_getMappedSourceContent​(long command,
                                                                        int I,
                                                                        long __functionAddress,
                                                                        long __result)
        
        public static void nclang_CompileCommand_getMappedSourceContent​(long command,
                                                                        int I,
                                                                        long __result)
        
      • clang_CompileCommand_getMappedSourceContent

        public static CXString clang_CompileCommand_getMappedSourceContent​(long command,
                                                                           int I,
                                                                           CXString __result)
        Get the I'th mapped source content for the compiler invocation.