Lines Matching +full:suppress +full:- +full:preamble

1 /*===-- clang-c/Index.h - Indexing Public C Interface -------------*- C -*-===*\
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
8 |*===----------------------------------------------------------------------===*|
11 |* high-level symbol information from source files without exposing the full *|
14 \*===----------------------------------------------------------------------===*/
19 #include "clang-c/BuildSystem.h"
20 #include "clang-c/CXDiagnostic.h"
21 #include "clang-c/CXErrorCode.h"
22 #include "clang-c/CXFile.h"
23 #include "clang-c/CXSourceLocation.h"
24 #include "clang-c/CXString.h"
25 #include "clang-c/ExternC.h"
26 #include "clang-c/Platform.h"
61 * loading already-parsed ASTs, traversing the AST, associating
63 * facilities that support Clang-based development tools.
236 * - excludeDeclarationsFromPCH: When non-zero, allows enumeration of "local"
249 * // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch"
259 * char *args[] = { "-Xclang", "-include-pch=IndexTest.pch" };
268 * -include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks
343 * or explicitly initialize the first data member and zero-initialize the rest:
347 * or to prevent the -Wmissing-field-initializers warning for the above version:
390 * This option is ignored if \a StorePreamblesInMemory is non-zero.
410 * value of options->Size.
521 * \param size [out] if non-NULL, will be set to the size of the buffer.
573 * \param Index the zero-based diagnostic number to retrieve.
617 * '-c'
618 * '-emit-ast'
619 * '-fsyntax-only'
620 * '-o \<output file>' (both '-o' and '\<output file>' are ignored)
628 * \param num_clang_command_line_args The number of command-line arguments in
631 * \param clang_command_line_args The command-line arguments that would be
632 * passed to the \c clang executable if it were being invoked out-of-process.
633 * These command-line options will be parsed and will affect how the translation
634 * unit is parsed. Note that the following options are ignored: '-c',
635 * '-emit-ast', '-fsyntax-only' (which is the default), and '-o \<output file>'.
661 * Create a translation unit from an AST file (\c -emit-ast).
663 * \param[out] out_TU A non-NULL pointer to store the created
681 * Used to indicate that no special translation-unit options are
705 * instantiation of implicitly-instantiation function templates in
713 * implicit precompiled header for the preamble.
720 * the "preamble" of the file). In subsequent parses, if the
721 * preamble or the files in it have not changed, \c
722 * clang_reparseTranslationUnit() will re-use the implicit
729 * code-completion results with each reparse of the source file.
731 * Caching of code-completion results is a performance optimization that
733 * code-completion operations.
750 * we are testing C++ precompiled preamble support. It is deprecated.
771 * Used to indicate that the precompiled preamble should be created on
773 * trades runtime on the first parse (serializing the preamble takes time) for
774 * reduced runtime on the second parse (can now reuse the preamble).
796 * constrain the skipping of function bodies to the preamble.
813 * Used to indicate that non-errors from included files should be ignored.
837 * preamble) geared toward improving the performance of these routines. The
861 * command-line arguments so that the compilation can be configured in the same
870 * \param command_line_args The command-line arguments that would be
871 * passed to the \c clang executable if it were being invoked out-of-process.
872 * These command-line options will be parsed and will affect how the translation
873 * unit is parsed. Note that the following options are ignored: '-c',
874 * '-emit-ast', '-fsyntax-only' (which is the default), and '-o \<output file>'.
876 * \param num_command_line_args The number of command-line arguments in
892 * \param[out] out_TU A non-NULL pointer to store the created
936 * the most commonly-requested data.
996 * saved successfully, while a non-zero value indicates that a problem occurred.
1045 * This routine can be used to re-parse the source files that originally
1048 * source code will be reparsed with the same command-line options as it
1054 * creating a new translation unit with the same command-line arguments.
1058 * \param TU The translation unit whose contents will be re-parsed. The
1075 * \returns 0 if the sources could be reparsed. A non-zero error code will be
1113 * Returns the human-readable null-terminated C string that represents
1137 /* An array of key-value pairs, representing the breakdown of memory
1175 * Returns -1 in case of error.
1207 * A field (in C) or non-static data member (in C++) in a
1219 /** An Objective-C \@interface. */
1221 /** An Objective-C \@interface for a category. */
1223 /** An Objective-C \@protocol declaration. */
1225 /** An Objective-C \@property declaration. */
1227 /** An Objective-C instance variable. */
1229 /** An Objective-C instance method. */
1231 /** An Objective-C class method. */
1233 /** An Objective-C \@implementation. */
1235 /** An Objective-C \@implementation for a category. */
1253 /** A C++ non-type template parameter. */
1271 /** An Objective-C \@synthesize definition. */
1273 /** An Objective-C \@dynamic definition. */
1314 * some non-expression context, e.g., a designated initializer.
1349 * while (first < last - 1) {
1350 * swap(*first, *--last);
1363 * argument-dependent lookup (e.g., the "swap" function at the end of the
1373 * A reference to a variable that occurs in some non-expression
1410 * class, Objective-C class, etc.
1417 /** An expression that sends a message to an Objective-C
1450 /** This represents the unary-expression's (except sizeof and
1472 /** An explicit cast in C (C99 6.5.4) or a C-style cast in C++
1553 * This handles 'throw' and 'throw' assignment-expression. When
1554 * assignment-expression isn't present, Op will be null.
1572 /** An Objective-C string literal i.e. @"foo".
1576 /** An Objective-C \@encode expression.
1580 /** An Objective-C \@selector expression.
1584 /** An Objective-C \@protocol expression.
1588 /** An Objective-C "bridged" cast expression, which casts between
1589 * Objective-C pointers and C pointers, transferring ownership in the process.
1638 /** Objective-c Boolean Literal.
1642 /** Represents the "self" expression in an Objective-C method.
1782 /** Objective-C's overall \@try-\@catch-\@finally statement.
1786 /** Objective-C's \@catch statement.
1790 /** Objective-C's \@finally statement.
1794 /** Objective-C's \@throw statement.
1798 /** Objective-C's \@synchronized statement.
1802 /** Objective-C's autorelease pool statement.
1806 /** Objective-C's collection statement.
2268 * program--declaration, statements, expressions, references to declarations,
2269 * etc.--under a single "cursor" abstraction with a common set of operations.
2312 * Returns non-zero if \p cursor is null.
2336 * \returns non-zero if the cursor represents a declaration and it is
2404 * have automatic storage. This covers normal (non-extern) local variables.
2501 * \param always_deprecated If non-NULL, will be set to indicate whether the
2504 * \param deprecated_message If non-NULL, will be set to the message text
2508 * \param always_unavailable If non-NULL, will be set to indicate whether the
2511 * \param unavailable_message If non-NULL, will be set to the message text
2515 * \param availability If non-NULL, an array of CXPlatformAvailability instances
2528 * platform-availability structures returned. There are
2551 * returns 0. Otherwise returns -1.
2558 * external storage returns 0. Otherwise returns -1.
2578 * Describe the "thread-local storage (TLS) kind" of the declaration
2584 * Determine the "thread-local storage (TLS) kind" of the declaration
2612 * \returns non-zero if the set contains the specified cursor.
2620 * \returns zero if the CXCursor was already in the set, and non-zero otherwise.
2632 * definitions are provided out-of-line. For example:
2642 * In the out-of-line definition of \c C::f, the semantic parent is
2667 * definitions are provided out-of-line. For example:
2677 * In the out-of-line definition of \c C::f, the semantic parent is
2700 * In both Objective-C and C++, a method (aka virtual member function,
2702 * Objective-C, a method is said to override any method in the class's
2706 * its protocols, and its categories, and so on. A method from an Objective-C
2722 * invoke this function again, given the previously-found overridden
2723 * methods, to map out the complete method-override set.
2725 * \param cursor A cursor representing an Objective-C or C++
3028 * Pretty-print the underlying type using the rules of the
3073 * Returns non-zero if the cursor specifies a Record member that is a bit-field.
3078 * Retrieve the bit width of a bit-field declaration as an integer.
3080 * If the cursor does not reference a bit-field, or if the bit-field's width
3081 * expression cannot be evaluated, -1 is returned.
3087 * if (Width != -1) {
3088 * // The bit-field width is not value-dependent.
3096 * Retrieve the number of non-variadic arguments associated with a given
3100 * declarations of functions or methods. For other cursors -1 is returned.
3138 * declaration, -1 is returned.
3145 * void foo<float, -7, true>();
3163 * void foo<float, -7, true>();
3184 * void foo<float, -7, true>();
3205 * void foo<float, -7, true>();
3207 * If called with I = 1 or 2, -7 or true will be returned, respectively.
3237 * \returns non-zero if the CXTypes represent the same type and
3360 * Returns the Objective-C type encoding for the specified declaration.
3365 * Returns the Objective-C type encoding for the specified CXType.
3377 * If a non-function type is passed in, CXCallingConv_Invalid is returned.
3384 * If a non-function type is passed in, an invalid type is returned.
3392 * If a non-function type is passed in, an error code of -1 is returned.
3397 * Retrieve the number of non-variadic parameters associated with a
3400 * If a non-function type is passed in, -1 is returned.
3407 * If a non-function type is passed in or the function does not have enough
3488 * -1 is returned.
3495 * If a non-array type is passed in, an invalid type is returned.
3502 * If a non-array type is passed in, -1 is returned.
3507 * Retrieve the type named by the qualified-id.
3509 * If a non-elaborated type is passed in, an invalid type is returned.
3519 * \returns non-zero if transparent and zero otherwise.
3570 CXTypeLayoutError_Invalid = -1,
3574 CXTypeLayoutError_Incomplete = -2,
3578 CXTypeLayoutError_Dependent = -3,
3582 CXTypeLayoutError_NotConstantSize = -4,
3586 CXTypeLayoutError_InvalidFieldName = -5,
3590 CXTypeLayoutError_Undeduced = -6
3610 * If a non-member-pointer type is passed in, an invalid type is returned.
3650 * If a non-atomic type is passed in, an invalid type is returned.
3657 * If the cursor is not a field declaration, -1 is returned.
3688 /** No ref-qualifier was provided. */
3690 /** An lvalue ref-qualifier was provided (\c &). */
3692 /** An rvalue ref-qualifier was provided (\c &&). */
3698 * specialization, or -1 if type \c T is not a template specialization.
3713 * Retrieve the ref-qualifier kind of a function or method.
3715 * The ref-qualifier is returned for C++ functions or methods. For other types
3716 * or non-C++ declarations, CXRefQualifier_None is returned.
3839 * \param index The zero-based index into the set of overloaded declarations in
3939 * \returns a non-zero value if the traversal was terminated
3974 * \defgroup CINDEX_CURSOR_XREF Cross-referencing in the AST
3996 * Construct a USR for a specified Objective-C class.
4001 * Construct a USR for a specified Objective-C category.
4007 * Construct a USR for a specified Objective-C protocol.
4013 * Construct a USR for a specified Objective-C instance variable and
4020 * Construct a USR for a specified Objective-C method and
4028 * Construct a USR for a specified Objective-C property and the USR
4042 * Objective-C methods and Objective-C message expressions, there are multiple
4150 * Objective-C superclass reference cursor refers to an Objective-C class.
4151 * This function produces the cursor for the Objective-C class from the
4199 * be forward-declared (possibly multiple times) and later defined:
4221 * If the cursor points to a selector identifier in an Objective-C
4227 * \returns The selector index if the cursor is an Objective-C method or message
4228 * expression and the cursor is pointing to a selector identifier, or -1
4234 * Given a cursor pointing to a C++ method call or an Objective-C
4235 * message, returns non-zero if the method/message is "dynamic", meaning:
4238 * For an Objective-C message: the receiver is an object instance, not 'super'
4247 * Given a cursor pointing to an Objective-C message or property
4296 * Objective-C method declarations.
4309 * Given a cursor that represents an Objective-C method or parameter
4310 * declaration, return the associated Objective-C qualifiers for the return
4317 * Given a cursor that represents an Objective-C method or property
4318 * declaration, return non-zero if the declaration was affected by "\@optional".
4324 * Returns non-zero if the given cursor is a variadic function or method.
4329 * Returns non-zero if the given cursor points to a symbol marked with
4332 * \param language If non-NULL, and the attribute is present, will be set to
4335 * \param definedIn If non-NULL, and the attribute is present, will be set to
4338 * \param isGenerated If non-NULL, and the attribute is present, will be set to
4339 * non-zero if the 'generated_declaration' is set in the attribute.
4427 * \returns the parent of a sub-module or NULL if the given module is top-level,
4435 * \returns the name of the module, e.g. for the 'std.vector' sub-module it
4450 * \returns non-zero if the module is a system one.
4465 * \param Index top level header index (zero-based).
4542 * Determine if a C++ member function is a copy-assignment operator,
4545 * > A copy-assignment operator `X::operator=` is a non-static,
4546 * > non-template member function of _class_ `X` with exactly one
4556 * Is a copy-assignment operator, while the `operator=` in:
4567 * Determine if a C++ member function is a move-assignment operator,
4570 * > A move-assignment operator `X::operator=` is a non-static,
4571 * > non-template member function of _class_ `X` with exactly one
4581 * Is a move-assignment operator, while the `operator=` in:
4619 * conditional compile-time expression whose value decides
4714 * non-contiguous names, this index can be used to retrieve the individual
4718 * name, or if the PieceIndex is out-of-range, a null-cursor will be returned.
4725 * Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the
4737 * If the name is non-contiguous, return the full spanning range.
4739 * Non-contiguous names occur in Objective-C when a selector with two or more
4742 * [object doSomething:here withValue:there]; // Objective-C
4863 * This token-annotation routine is equivalent to invoking
4929 * syntactically- and semantically-valid constructs that the user might want to
4937 * A semantic string that describes a code-completion result.
4939 * A semantic string that describes the formatting of a code-completion
4941 * source buffer when a particular code-completion result is selected.
4968 * The code-completion string that describes how to insert this
4969 * code-completion result into the editing buffer.
4975 * Describes a single piece of text within a code-completion string.
4977 * Each "chunk" within a code-completion string (\c CXCompletionString) is
4983 * A code-completion string that describes "optional" text that
4986 * The Optional chunk is the only kind of chunk that has a code-completion
4988 * \c clang_getCompletionChunkCompletionString(). The code-completion string
4997 * The code-completion string for this function would contain:
4998 * - a TypedText chunk for "f".
4999 * - a LeftParen chunk for "(".
5000 * - a Placeholder chunk for "int x"
5001 * - an Optional chunk containing the remaining defaulted arguments, e.g.,
5002 * - a Comma chunk for ","
5003 * - a Placeholder chunk for "float y"
5004 * - an Optional chunk containing the last defaulted argument:
5005 * - a Comma chunk for ","
5006 * - a Placeholder chunk for "double z"
5007 * - a RightParen chunk for ")"
5010 * - Completely ignore optional chunks, in which case the template for the
5012 * - Fully expand all optional chunks, in which case the template for the
5018 * code-completion result.
5023 * expected to filter the code-completion results based on the text in this
5028 * Text that should be inserted as part of a code-completion result.
5031 * inserted into user code should this particular code-completion result
5039 * into the code-completion template. For example, placeholders might mark
5051 * help the user decide whether a particular code-completion result is the
5057 * Text that describes the current parameter when code-completion is
5060 * A "current parameter" chunk occurs when code-completion is providing
5062 * code-completion point. For example, given a function
5068 * and the source code \c add(, where the code-completion point is after the
5069 * "(", the code-completion string will contain a "current parameter" chunk
5071 * parameter. After typing further, to \c add(17, (where the code-completion
5072 * point is after the ","), the code-completion string will contain a
5150 * \param chunk_number the 0-based index of the chunk in the completion string.
5164 * \param chunk_number the 0-based index of the chunk in the completion string.
5177 * \param chunk_number the 0-based index of the chunk in the completion string.
5186 * Retrieve the number of chunks in the given code-completion string.
5201 * higher-priority (more likely) completions.
5207 * Determine the availability of the entity that this code-completion
5234 * \param annotation_number the 0-based index of the annotation of the
5248 * a code completion for an Objective-C method would have the method's class
5254 * \param kind DEPRECATED: always set to CXCursor_NotImplemented if non-NULL.
5275 * \returns A non-context-sensitive completion string for declaration and macro
5282 * Contains the results of code-completion.
5290 * The code-completion results.
5295 * The number of code-completion results stored in the
5302 * Retrieve the number of fix-its for the given completion index.
5311 * \return The number of fix-its which must be applied before the completion at
5319 * Fix-its that *must* be applied before inserting the text for the
5323 * fix-its. Extra completions with non-empty fix-its should be explicitly
5327 * fix-its, the following conditions are guaranteed to hold for
5328 * replacement_range of the stored fix-its:
5329 * - Ranges in the fix-its are guaranteed to never contain the completion
5332 * - If a fix-it range starts or ends with completion point (or starts or
5335 * point after applying the fix-it.
5337 * The intuition is that provided fix-its change code around the identifier we
5340 * replacing '.' with '->' and vice versa:
5344 * replacing '.' with '->'.
5345 * In 'vec_ptr->^', one of the completions is 'release', it requires
5346 * replacing '->' with '.'.
5352 * \param fixit_index The index of the fix-it for the completion at
5355 * \param replacement_range The fix-it range that must be replaced before the
5358 * \returns The fix-it string that must replace the code at replacement_range
5369 * The enumerators in this enumeration can be bitwise-OR'd together to
5392 * Whether to speed up completion by omitting top- or namespace-level entities
5393 * defined in the preamble. There's no guarantee any particular entity is
5400 * fix-its, e.g. change '.' to '->' on member access, etc.
5408 * The enumerators in this enumeration may be bitwise-OR'd together if multiple
5429 * Completions for values that resolve to an Objective-C object should
5434 * Completions for values that resolve to an Objective-C selector
5455 * Completions for properties of the Objective-C object being accessed
5489 * Completions for Objective-C interfaces (classes) should be included
5494 * Completions for Objective-C protocols should be included in
5499 * Completions for Objective-C categories should be included in
5504 * Completions for Objective-C instance messages should be included
5509 * Completions for Objective-C class messages should be included in
5514 * Completions for Objective-C selector names should be included in
5538 CXCompletionContext_Unknown = ((1 << 23) - 1)
5542 * Returns a default set of code-completion options that can be
5554 * performing syntax checking up to the location where code-completion has
5555 * been requested. At that point, a special code-completion token is passed
5557 * current location in the C/Objective-C/C++ grammar and the state of
5563 * code-completion location will coincide with the cursor. For example, if \c p
5564 * is a pointer, code-completion might be triggered after the "-" and then
5565 * after the ">" in \c p->. When the code-completion location is after the ">",
5569 * based on the contents of the token. For example, when code-completing for
5570 * the expression \c p->get, the client should provide the location just after
5571 * the ">" (e.g., pointing at the "g") to this code-completion hook. Then, the
5574 * is to separate the relatively high-latency acquisition of code-completion
5575 * results from the filtering of results on a per-character basis, which must
5578 * \param TU The translation unit in which code-completion should
5580 * completely up-to-date (and the contents of those source files may
5588 * \param complete_line The line at which code-completion should occur.
5590 * \param complete_column The column at which code-completion should occur.
5608 * of code-completion options.
5611 * containing code-completion results, which should eventually be
5623 * Sort the code-completion results in case-insensitive alphabetical
5634 * Free the given set of code-completion results.
5650 * \param Index the zero-based diagnostic number to retrieve.
5675 * contexts where a container exists (i.e. member accesses or Objective-C
5706 * Returns the currently-entered selector for an Objective-C message
5708 * non-empty string for CXCompletionContext_ObjCInstanceMessage and
5714 * for an Objective-C message send.
5738 * \param isEnabled Flag to indicate if crash recovery is enabled. A non-zero
5748 * file included (either at the top-level or by \#include directives) within
5813 * Returns a non-zero value if the kind is Int and the evaluation
5820 * the kind is Int and clang_EvalResult_isUnsignedInt is non-zero.
5889 * \param original If non-NULL, will be set to the original filename.
5891 * \param transformed If non-NULL, will be set to the filename that the original
6032 * Non-zero if the directive was automatically turned into a module
6055 * Non-zero if an inclusion directive was automatically turned into
6167 * cases like out-of-line C++ member functions.
6176 * by the compiler, e.g. implicit Objective-C methods for properties.
6252 * An implicit reference, e.g. a reference of an Objective-C method
6320 * Should return 0 to continue, and non-zero to abort.
6450 * Function-local symbols should be indexed. If this is not set
6451 * function-local symbols will be ignored.
6462 * Suppress all compiler warnings when parsing for indexing.
6496 * a non-zero \c CXErrorCode.
6526 * -Preprocessor callbacks invocations
6527 * -Declaration/reference callbacks invocations
6528 * -Diagnostic callback invocations
6533 * non-zero, otherwise returns 0.
6589 * \returns a non-zero value if the traversal was terminated
6601 /** C++ Pointer - to - member operator. */
6603 /** C++ Pointer - to - member operator. */
6619 /** C++ three-way comparison (spaceship) operator. */