clang 20.0.0git
Public Attributes | List of all members
CXIndexOptions Struct Reference

Index initialization options. More...

#include "clang-c/Index.h"

Public Attributes

unsigned Size
 The size of struct CXIndexOptions used for option versioning.
 
unsigned char ThreadBackgroundPriorityForIndexing
 A CXChoice enumerator that specifies the indexing priority policy.
 
unsigned char ThreadBackgroundPriorityForEditing
 A CXChoice enumerator that specifies the editing priority policy.
 
unsigned ExcludeDeclarationsFromPCH: 1
 
unsigned DisplayDiagnostics: 1
 
unsigned StorePreamblesInMemory: 1
 Store PCH in memory.
 
unsigned __pad0__: 13
 
const char * PreambleStoragePath
 The path to a directory, in which to store temporary PCH files.
 
const char * InvocationEmissionPath
 Specifies a path which will contain log files for certain libclang invocations.
 

Detailed Description

Index initialization options.

0 is the default value of each member of this struct except for Size. Initialize the struct in one of the following three ways to avoid adapting code each time a new member is added to it:

memset(&Opts, 0, sizeof(Opts));
Opts.Size = sizeof(CXIndexOptions);
__DEVICE__ void * memset(void *__a, int __b, size_t __c)
Index initialization options.
Definition: Index.h:353
unsigned Size
The size of struct CXIndexOptions used for option versioning.
Definition: Index.h:360

or explicitly initialize the first data member and zero-initialize the rest:

CXIndexOptions Opts = { sizeof(CXIndexOptions) };

or to prevent the -Wmissing-field-initializers warning for the above version:

Opts.Size = sizeof(CXIndexOptions);

Definition at line 353 of file Index.h.

Member Data Documentation

◆ __pad0__

unsigned CXIndexOptions::__pad0__

Definition at line 383 of file Index.h.

◆ DisplayDiagnostics

unsigned CXIndexOptions::DisplayDiagnostics
See also
clang_createIndex()

Definition at line 378 of file Index.h.

◆ ExcludeDeclarationsFromPCH

unsigned CXIndexOptions::ExcludeDeclarationsFromPCH
See also
clang_createIndex()

Definition at line 374 of file Index.h.

◆ InvocationEmissionPath

const char* CXIndexOptions::InvocationEmissionPath

Specifies a path which will contain log files for certain libclang invocations.

A null value implies that libclang invocations are not logged.

Definition at line 400 of file Index.h.

◆ PreambleStoragePath

const char* CXIndexOptions::PreambleStoragePath

The path to a directory, in which to store temporary PCH files.

If null or empty, the default system temporary directory is used. These PCH files are deleted on clean exit but stay on disk if the program crashes or is killed.

This option is ignored if StorePreamblesInMemory is non-zero.

Libclang does not create the directory at the specified path in the file system. Therefore it must exist, or storing PCH files will fail.

Definition at line 395 of file Index.h.

◆ Size

unsigned CXIndexOptions::Size

The size of struct CXIndexOptions used for option versioning.

Always initialize this member to sizeof(CXIndexOptions), or assign sizeof(CXIndexOptions) to it right after creating a CXIndexOptions object.

Definition at line 360 of file Index.h.

◆ StorePreamblesInMemory

unsigned CXIndexOptions::StorePreamblesInMemory

Store PCH in memory.

If zero, PCH are stored in temporary files.

Definition at line 382 of file Index.h.

◆ ThreadBackgroundPriorityForEditing

unsigned char CXIndexOptions::ThreadBackgroundPriorityForEditing

A CXChoice enumerator that specifies the editing priority policy.

See also
CXGlobalOpt_ThreadBackgroundPriorityForEditing

Definition at line 370 of file Index.h.

◆ ThreadBackgroundPriorityForIndexing

unsigned char CXIndexOptions::ThreadBackgroundPriorityForIndexing

A CXChoice enumerator that specifies the indexing priority policy.

See also
CXGlobalOpt_ThreadBackgroundPriorityForIndexing

Definition at line 365 of file Index.h.


The documentation for this struct was generated from the following file: