forked from OSchip/llvm-project
Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
This commit is contained in:
parent
ce9b3e084c
commit
6907ce2f8f
|
@ -160,7 +160,7 @@ typedef struct CXVersion {
|
|||
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
|
||||
* will be negative if no minor version number was provided, e.g., for
|
||||
* version '10'.
|
||||
*/
|
||||
int Minor;
|
||||
|
@ -387,7 +387,7 @@ CINDEX_LINKAGE int clang_getFileUniqueID(CXFile file, CXFileUniqueID *outID);
|
|||
* multiple inclusions, either with the conventional
|
||||
* \#ifndef/\#define/\#endif macro guards or with \#pragma once.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned
|
||||
CINDEX_LINKAGE unsigned
|
||||
clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file);
|
||||
|
||||
/**
|
||||
|
@ -786,7 +786,7 @@ typedef void *CXDiagnostic;
|
|||
* A group of CXDiagnostics.
|
||||
*/
|
||||
typedef void *CXDiagnosticSet;
|
||||
|
||||
|
||||
/**
|
||||
* Determine the number of diagnostics in a CXDiagnosticSet.
|
||||
*/
|
||||
|
@ -802,7 +802,7 @@ CINDEX_LINKAGE unsigned clang_getNumDiagnosticsInSet(CXDiagnosticSet Diags);
|
|||
* via a call to \c clang_disposeDiagnostic().
|
||||
*/
|
||||
CINDEX_LINKAGE CXDiagnostic clang_getDiagnosticInSet(CXDiagnosticSet Diags,
|
||||
unsigned Index);
|
||||
unsigned Index);
|
||||
|
||||
/**
|
||||
* Describes the kind of error that occurred (if any) in a call to
|
||||
|
@ -813,26 +813,26 @@ 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.
|
||||
|
@ -856,7 +856,7 @@ CINDEX_LINKAGE CXDiagnosticSet clang_loadDiagnostics(const char *file,
|
|||
CINDEX_LINKAGE void clang_disposeDiagnosticSet(CXDiagnosticSet Diags);
|
||||
|
||||
/**
|
||||
* Retrieve the child diagnostics of a CXDiagnostic.
|
||||
* Retrieve the child diagnostics of a CXDiagnostic.
|
||||
*
|
||||
* This CXDiagnosticSet does not need to be released by
|
||||
* clang_disposeDiagnosticSet.
|
||||
|
@ -888,7 +888,7 @@ CINDEX_LINKAGE CXDiagnostic clang_getDiagnostic(CXTranslationUnit Unit,
|
|||
* \param Unit the translation unit to query.
|
||||
*/
|
||||
CINDEX_LINKAGE CXDiagnosticSet
|
||||
clang_getDiagnosticSetFromTU(CXTranslationUnit Unit);
|
||||
clang_getDiagnosticSetFromTU(CXTranslationUnit Unit);
|
||||
|
||||
/**
|
||||
* Destroy a diagnostic.
|
||||
|
@ -934,7 +934,7 @@ enum CXDiagnosticDisplayOptions {
|
|||
* \c -fdiagnostics-print-source-range-info.
|
||||
*/
|
||||
CXDiagnostic_DisplaySourceRanges = 0x04,
|
||||
|
||||
|
||||
/**
|
||||
* Display the option name associated with this diagnostic, if any.
|
||||
*
|
||||
|
@ -943,12 +943,12 @@ enum CXDiagnosticDisplayOptions {
|
|||
* \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
|
||||
* This option corresponds to the clang flag
|
||||
* \c -fdiagnostics-show-category=id.
|
||||
*/
|
||||
CXDiagnostic_DisplayCategoryId = 0x10,
|
||||
|
@ -957,7 +957,7 @@ enum CXDiagnosticDisplayOptions {
|
|||
* 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
|
||||
* This option corresponds to the clang flag
|
||||
* \c -fdiagnostics-show-category=name.
|
||||
*/
|
||||
CXDiagnostic_DisplayCategoryName = 0x20
|
||||
|
@ -1019,7 +1019,7 @@ CINDEX_LINKAGE CXString clang_getDiagnosticSpelling(CXDiagnostic);
|
|||
* diagnostic (if any).
|
||||
*
|
||||
* \returns A string that contains the command-line option used to enable this
|
||||
* warning, such as "-Wconversion" or "-pedantic".
|
||||
* warning, such as "-Wconversion" or "-pedantic".
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_getDiagnosticOption(CXDiagnostic Diag,
|
||||
CXString *Disable);
|
||||
|
@ -1028,7 +1028,7 @@ CINDEX_LINKAGE CXString clang_getDiagnosticOption(CXDiagnostic Diag,
|
|||
* 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
|
||||
* 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
|
||||
|
@ -1041,7 +1041,7 @@ CINDEX_LINKAGE unsigned clang_getDiagnosticCategory(CXDiagnostic);
|
|||
* is now deprecated. Use clang_getDiagnosticCategoryText()
|
||||
* instead.
|
||||
*
|
||||
* \param Category A diagnostic category number, as returned by
|
||||
* \param Category A diagnostic category number, as returned by
|
||||
* \c clang_getDiagnosticCategory().
|
||||
*
|
||||
* \returns The name of the given diagnostic category.
|
||||
|
@ -1055,7 +1055,7 @@ CXString clang_getDiagnosticCategoryName(unsigned Category);
|
|||
* \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.
|
||||
|
@ -1242,9 +1242,9 @@ enum CXTranslationUnit_Flags {
|
|||
* intent of producing a precompiled header.
|
||||
*/
|
||||
CXTranslationUnit_Incomplete = 0x02,
|
||||
|
||||
|
||||
/**
|
||||
* Used to indicate that the translation unit should be built with an
|
||||
* Used to indicate that the translation unit should be built with an
|
||||
* implicit precompiled header for the preamble.
|
||||
*
|
||||
* An implicit precompiled header is used as an optimization when a
|
||||
|
@ -1258,7 +1258,7 @@ enum CXTranslationUnit_Flags {
|
|||
* precompiled header to improve parsing performance.
|
||||
*/
|
||||
CXTranslationUnit_PrecompiledPreamble = 0x04,
|
||||
|
||||
|
||||
/**
|
||||
* Used to indicate that the translation unit should cache some
|
||||
* code-completion results with each reparse of the source file.
|
||||
|
@ -1343,7 +1343,7 @@ enum CXTranslationUnit_Flags {
|
|||
* to indicate that the translation unit is likely to be reparsed many times,
|
||||
* either explicitly (via \c clang_reparseTranslationUnit()) or implicitly
|
||||
* (e.g., by code completion (\c clang_codeCompletionAt())). The returned flag
|
||||
* set contains an unspecified set of optimizations (e.g., the precompiled
|
||||
* set contains an unspecified set of optimizations (e.g., the precompiled
|
||||
* preamble) geared toward improving the performance of these routines. The
|
||||
* set of optimizations enabled may change from one version to the next.
|
||||
*/
|
||||
|
@ -1374,7 +1374,7 @@ clang_parseTranslationUnit(CXIndex CIdx,
|
|||
* command-line arguments so that the compilation can be configured in the same
|
||||
* way that the compiler is configured on the command line.
|
||||
*
|
||||
* \param CIdx The index object with which the translation unit will be
|
||||
* \param CIdx The index object with which the translation unit will be
|
||||
* associated.
|
||||
*
|
||||
* \param source_filename The name of the source file to load, or NULL if the
|
||||
|
@ -1383,7 +1383,7 @@ clang_parseTranslationUnit(CXIndex CIdx,
|
|||
* \param command_line_args The command-line arguments that would be
|
||||
* passed to the \c clang executable if it were being invoked out-of-process.
|
||||
* These command-line options will be parsed and will affect how the translation
|
||||
* unit is parsed. Note that the following options are ignored: '-c',
|
||||
* unit is parsed. Note that the following options are ignored: '-c',
|
||||
* '-emit-ast', '-fsyntax-only' (which is the default), and '-o \<output file>'.
|
||||
*
|
||||
* \param num_command_line_args The number of command-line arguments in
|
||||
|
@ -1463,32 +1463,32 @@ enum CXSaveError {
|
|||
* Indicates that no error occurred while saving a translation unit.
|
||||
*/
|
||||
CXSaveError_None = 0,
|
||||
|
||||
|
||||
/**
|
||||
* Indicates that an unknown error occurred while attempting to save
|
||||
* the file.
|
||||
*
|
||||
* This error typically indicates that file I/O failed when attempting to
|
||||
* This error typically indicates that file I/O failed when attempting to
|
||||
* write the file.
|
||||
*/
|
||||
CXSaveError_Unknown = 1,
|
||||
|
||||
|
||||
/**
|
||||
* Indicates that errors during translation prevented this attempt
|
||||
* to save the translation unit.
|
||||
*
|
||||
*
|
||||
* Errors that prevent the translation unit from being saved can be
|
||||
* extracted using \c clang_getNumDiagnostics() and \c clang_getDiagnostic().
|
||||
*/
|
||||
CXSaveError_TranslationErrors = 2,
|
||||
|
||||
|
||||
/**
|
||||
* Indicates that the translation unit to be saved was somehow
|
||||
* invalid (e.g., NULL).
|
||||
*/
|
||||
CXSaveError_InvalidTU = 3
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Saves a translation unit into a serialized representation of
|
||||
* that translation unit on disk.
|
||||
|
@ -1509,7 +1509,7 @@ enum CXSaveError {
|
|||
* CXSaveTranslationUnit_XXX flags.
|
||||
*
|
||||
* \returns A value that will match one of the enumerators of the CXSaveError
|
||||
* enumeration. Zero (CXSaveError_None) indicates that the translation unit was
|
||||
* enumeration. Zero (CXSaveError_None) indicates that the translation unit was
|
||||
* saved successfully, while a non-zero value indicates that a problem occurred.
|
||||
*/
|
||||
CINDEX_LINKAGE int clang_saveTranslationUnit(CXTranslationUnit TU,
|
||||
|
@ -1543,7 +1543,7 @@ enum CXReparse_Flags {
|
|||
*/
|
||||
CXReparse_None = 0x0
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns the set of flags that is suitable for reparsing a translation
|
||||
* unit.
|
||||
|
@ -1551,7 +1551,7 @@ enum CXReparse_Flags {
|
|||
* The set of flags returned provide options for
|
||||
* \c clang_reparseTranslationUnit() by default. The returned flag
|
||||
* set contains an unspecified set of optimizations geared toward common uses
|
||||
* of reparsing. The set of optimizations enabled may change from one version
|
||||
* of reparsing. The set of optimizations enabled may change from one version
|
||||
* to the next.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU);
|
||||
|
@ -1563,17 +1563,17 @@ CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU);
|
|||
* created the given translation unit, for example because those source files
|
||||
* have changed (either on disk or as passed via \p unsaved_files). The
|
||||
* source code will be reparsed with the same command-line options as it
|
||||
* was originally parsed.
|
||||
* was originally parsed.
|
||||
*
|
||||
* Reparsing a translation unit invalidates all cursors and source locations
|
||||
* that refer into that translation unit. This makes reparsing a translation
|
||||
* unit semantically equivalent to destroying the translation unit and then
|
||||
* creating a new translation unit with the same command-line arguments.
|
||||
* However, it may be more efficient to reparse a translation
|
||||
* However, it may be more efficient to reparse a translation
|
||||
* unit using this routine.
|
||||
*
|
||||
* \param TU The translation unit whose contents will be re-parsed. The
|
||||
* translation unit must originally have been built with
|
||||
* translation unit must originally have been built with
|
||||
* \c clang_createTranslationUnitFromSourceFile().
|
||||
*
|
||||
* \param num_unsaved_files The number of unsaved file entries in \p
|
||||
|
@ -1584,7 +1584,7 @@ CINDEX_LINKAGE unsigned clang_defaultReparseOptions(CXTranslationUnit TU);
|
|||
* those files. The contents and name of these files (as specified by
|
||||
* CXUnsavedFile) are copied when necessary, so the client only needs to
|
||||
* guarantee their validity until the call to this function returns.
|
||||
*
|
||||
*
|
||||
* \param options A bitset of options composed of the flags in CXReparse_Flags.
|
||||
* The function \c clang_defaultReparseOptions() produces a default set of
|
||||
* options recommended for most uses, based on the translation unit.
|
||||
|
@ -1612,8 +1612,8 @@ enum CXTUResourceUsageKind {
|
|||
CXTUResourceUsage_AST_SideTables = 6,
|
||||
CXTUResourceUsage_SourceManager_Membuffer_Malloc = 7,
|
||||
CXTUResourceUsage_SourceManager_Membuffer_MMap = 8,
|
||||
CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9,
|
||||
CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10,
|
||||
CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9,
|
||||
CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10,
|
||||
CXTUResourceUsage_Preprocessor = 11,
|
||||
CXTUResourceUsage_PreprocessingRecord = 12,
|
||||
CXTUResourceUsage_SourceManager_DataStructures = 13,
|
||||
|
@ -1635,8 +1635,8 @@ const char *clang_getTUResourceUsageName(enum CXTUResourceUsageKind kind);
|
|||
|
||||
typedef struct CXTUResourceUsageEntry {
|
||||
/* The memory usage category. */
|
||||
enum CXTUResourceUsageKind kind;
|
||||
/* Amount of resources used.
|
||||
enum CXTUResourceUsageKind kind;
|
||||
/* Amount of resources used.
|
||||
The units will depend on the resource kind. */
|
||||
unsigned long amount;
|
||||
} CXTUResourceUsageEntry;
|
||||
|
@ -1819,7 +1819,7 @@ enum CXCursorKind {
|
|||
*/
|
||||
CXCursor_TypeRef = 43,
|
||||
CXCursor_CXXBaseSpecifier = 44,
|
||||
/**
|
||||
/**
|
||||
* A reference to a class template, function template, template
|
||||
* template parameter, or class template partial specialization.
|
||||
*/
|
||||
|
@ -1829,14 +1829,14 @@ enum CXCursorKind {
|
|||
*/
|
||||
CXCursor_NamespaceRef = 46,
|
||||
/**
|
||||
* A reference to a member of a struct, union, or class that occurs in
|
||||
* A reference to a member of a struct, union, or class that occurs in
|
||||
* some non-expression context, e.g., a designated initializer.
|
||||
*/
|
||||
CXCursor_MemberRef = 47,
|
||||
/**
|
||||
* A reference to a labeled statement.
|
||||
*
|
||||
* This cursor kind is used to describe the jump to "start_over" in the
|
||||
* This cursor kind is used to describe the jump to "start_over" in the
|
||||
* goto statement in the following example:
|
||||
*
|
||||
* \code
|
||||
|
@ -1849,7 +1849,7 @@ enum CXCursorKind {
|
|||
* A label reference cursor refers to a label statement.
|
||||
*/
|
||||
CXCursor_LabelRef = 48,
|
||||
|
||||
|
||||
/**
|
||||
* A reference to a set of overloaded functions or function templates
|
||||
* that has not yet been resolved to a specific function or function template.
|
||||
|
@ -1882,18 +1882,18 @@ enum CXCursorKind {
|
|||
* argument-dependent lookup (e.g., the "swap" function at the end of the
|
||||
* example).
|
||||
*
|
||||
* The functions \c clang_getNumOverloadedDecls() and
|
||||
* The functions \c clang_getNumOverloadedDecls() and
|
||||
* \c clang_getOverloadedDecl() can be used to retrieve the definitions
|
||||
* referenced by this cursor.
|
||||
*/
|
||||
CXCursor_OverloadedDeclRef = 49,
|
||||
|
||||
|
||||
/**
|
||||
* A reference to a variable that occurs in some non-expression
|
||||
* A reference to a variable that occurs in some non-expression
|
||||
* context, e.g., a C++ lambda capture list.
|
||||
*/
|
||||
CXCursor_VariableRef = 50,
|
||||
|
||||
|
||||
CXCursor_LastRef = CXCursor_VariableRef,
|
||||
|
||||
/* Error conditions */
|
||||
|
@ -2153,7 +2153,7 @@ enum CXCursorKind {
|
|||
* \endcode
|
||||
*/
|
||||
CXCursor_LambdaExpr = 144,
|
||||
|
||||
|
||||
/** Objective-c Boolean Literal.
|
||||
*/
|
||||
CXCursor_ObjCBoolLiteralExpr = 145,
|
||||
|
@ -2189,10 +2189,10 @@ enum CXCursorKind {
|
|||
* reported.
|
||||
*/
|
||||
CXCursor_UnexposedStmt = 200,
|
||||
|
||||
/** A labelled statement in a function.
|
||||
|
||||
/** A labelled statement in a function.
|
||||
*
|
||||
* This cursor kind is used to describe the "start_over:" label statement in
|
||||
* This cursor kind is used to describe the "start_over:" label statement in
|
||||
* the following example:
|
||||
*
|
||||
* \code
|
||||
|
@ -2650,7 +2650,7 @@ CINDEX_LINKAGE int clang_Cursor_isNull(CXCursor cursor);
|
|||
* Compute a hash value for the given cursor.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_hashCursor(CXCursor);
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the kind of the given cursor.
|
||||
*/
|
||||
|
@ -2718,7 +2718,7 @@ CINDEX_LINKAGE unsigned clang_isTranslationUnit(enum CXCursorKind);
|
|||
* element, such as a preprocessor directive or macro instantiation.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_isPreprocessing(enum CXCursorKind);
|
||||
|
||||
|
||||
/***
|
||||
* Determine whether the given cursor represents a currently
|
||||
* unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).
|
||||
|
@ -2785,7 +2785,7 @@ CINDEX_LINKAGE enum CXVisibilityKind clang_getCursorVisibility(CXCursor cursor);
|
|||
*
|
||||
* \returns The availability of the cursor.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXAvailabilityKind
|
||||
CINDEX_LINKAGE enum CXAvailabilityKind
|
||||
clang_getCursorAvailability(CXCursor cursor);
|
||||
|
||||
/**
|
||||
|
@ -2831,10 +2831,10 @@ typedef struct CXPlatformAvailability {
|
|||
*
|
||||
* \param cursor The cursor to query.
|
||||
*
|
||||
* \param always_deprecated If non-NULL, will be set to indicate whether the
|
||||
* \param always_deprecated If non-NULL, will be set to indicate whether the
|
||||
* entity is deprecated on all platforms.
|
||||
*
|
||||
* \param deprecated_message If non-NULL, will be set to the message text
|
||||
* \param deprecated_message If non-NULL, will be set to the message text
|
||||
* provided along with the unconditional deprecation of this entity. The client
|
||||
* is responsible for deallocating this string.
|
||||
*
|
||||
|
@ -2842,7 +2842,7 @@ typedef struct CXPlatformAvailability {
|
|||
* entity is unavailable on all platforms.
|
||||
*
|
||||
* \param unavailable_message If non-NULL, will be set to the message text
|
||||
* provided along with the unconditional unavailability of this entity. The
|
||||
* provided along with the unconditional unavailability of this entity. The
|
||||
* client is responsible for deallocating this string.
|
||||
*
|
||||
* \param availability If non-NULL, an array of CXPlatformAvailability instances
|
||||
|
@ -2850,15 +2850,15 @@ typedef struct CXPlatformAvailability {
|
|||
* the number of platforms for which availability information is available (as
|
||||
* returned by this function) or \c availability_size, whichever is smaller.
|
||||
*
|
||||
* \param availability_size The number of elements available in the
|
||||
* \param availability_size The number of elements available in the
|
||||
* \c availability array.
|
||||
*
|
||||
* \returns The number of platforms (N) for which availability information is
|
||||
* available (which is unrelated to \c availability_size).
|
||||
*
|
||||
* Note that the client is responsible for calling
|
||||
* \c clang_disposeCXPlatformAvailability to free each of the
|
||||
* platform-availability structures returned. There are
|
||||
* Note that the client is responsible for calling
|
||||
* \c clang_disposeCXPlatformAvailability to free each of the
|
||||
* platform-availability structures returned. There are
|
||||
* \c min(N, availability_size) such structures.
|
||||
*/
|
||||
CINDEX_LINKAGE int
|
||||
|
@ -2875,7 +2875,7 @@ clang_getCursorPlatformAvailability(CXCursor cursor,
|
|||
*/
|
||||
CINDEX_LINKAGE void
|
||||
clang_disposeCXPlatformAvailability(CXPlatformAvailability *availability);
|
||||
|
||||
|
||||
/**
|
||||
* Describe the "language" of the entity referred to by a cursor.
|
||||
*/
|
||||
|
@ -2948,7 +2948,7 @@ CINDEX_LINKAGE unsigned clang_CXCursorSet_insert(CXCursorSet cset,
|
|||
*
|
||||
* The semantic parent of a cursor is the cursor that semantically contains
|
||||
* the given \p cursor. For many declarations, the lexical and semantic parents
|
||||
* are equivalent (the lexical parent is returned by
|
||||
* are equivalent (the lexical parent is returned by
|
||||
* \c clang_getCursorLexicalParent()). They diverge when declarations or
|
||||
* definitions are provided out-of-line. For example:
|
||||
*
|
||||
|
@ -2983,7 +2983,7 @@ CINDEX_LINKAGE CXCursor clang_getCursorSemanticParent(CXCursor cursor);
|
|||
*
|
||||
* The lexical parent of a cursor is the cursor in which the given \p cursor
|
||||
* was actually written. For many declarations, the lexical and semantic parents
|
||||
* are equivalent (the semantic parent is returned by
|
||||
* are equivalent (the semantic parent is returned by
|
||||
* \c clang_getCursorSemanticParent()). They diverge when declarations or
|
||||
* definitions are provided out-of-line. For example:
|
||||
*
|
||||
|
@ -3046,18 +3046,18 @@ CINDEX_LINKAGE CXCursor clang_getCursorLexicalParent(CXCursor cursor);
|
|||
* \param cursor A cursor representing an Objective-C or C++
|
||||
* method. This routine will compute the set of methods that this
|
||||
* method overrides.
|
||||
*
|
||||
*
|
||||
* \param overridden A pointer whose pointee will be replaced with a
|
||||
* pointer to an array of cursors, representing the set of overridden
|
||||
* methods. If there are no overridden methods, the pointee will be
|
||||
* set to NULL. The pointee must be freed via a call to
|
||||
* set to NULL. The pointee must be freed via a call to
|
||||
* \c clang_disposeOverriddenCursors().
|
||||
*
|
||||
* \param num_overridden A pointer to the number of overridden
|
||||
* functions, will be set to the number of overridden functions in the
|
||||
* array pointed to by \p overridden.
|
||||
*/
|
||||
CINDEX_LINKAGE void clang_getOverriddenCursors(CXCursor cursor,
|
||||
CINDEX_LINKAGE void clang_getOverriddenCursors(CXCursor cursor,
|
||||
CXCursor **overridden,
|
||||
unsigned *num_overridden);
|
||||
|
||||
|
@ -3072,7 +3072,7 @@ CINDEX_LINKAGE void clang_disposeOverriddenCursors(CXCursor *overridden);
|
|||
* cursor.
|
||||
*/
|
||||
CINDEX_LINKAGE CXFile clang_getIncludedFile(CXCursor cursor);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -3133,7 +3133,7 @@ CINDEX_LINKAGE CXSourceRange clang_getCursorExtent(CXCursor);
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \defgroup CINDEX_TYPES Type information for CXCursors
|
||||
*
|
||||
|
@ -3582,7 +3582,7 @@ CINDEX_LINKAGE CXString clang_getDeclObjCTypeEncoding(CXCursor C);
|
|||
/**
|
||||
* Returns the Objective-C type encoding for the specified CXType.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_Type_getObjCEncoding(CXType type);
|
||||
CINDEX_LINKAGE CXString clang_Type_getObjCEncoding(CXType type);
|
||||
|
||||
/**
|
||||
* Retrieve the spelling of a given CXTypeKind.
|
||||
|
@ -3842,7 +3842,7 @@ CINDEX_LINKAGE unsigned clang_Cursor_isBitField(CXCursor C);
|
|||
* CX_CXXBaseSpecifier is virtual.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor);
|
||||
|
||||
|
||||
/**
|
||||
* Represents the C++ access control level to a base class for a
|
||||
* cursor with kind CX_CXXBaseSpecifier.
|
||||
|
@ -3887,7 +3887,7 @@ enum CX_StorageClass {
|
|||
CINDEX_LINKAGE enum CX_StorageClass clang_Cursor_getStorageClass(CXCursor);
|
||||
|
||||
/**
|
||||
* Determine the number of overloaded declarations referenced by a
|
||||
* Determine the number of overloaded declarations referenced by a
|
||||
* \c CXCursor_OverloadedDeclRef cursor.
|
||||
*
|
||||
* \param cursor The cursor whose overloaded declarations are being queried.
|
||||
|
@ -3906,18 +3906,18 @@ CINDEX_LINKAGE unsigned clang_getNumOverloadedDecls(CXCursor cursor);
|
|||
* \param index The zero-based index into the set of overloaded declarations in
|
||||
* the cursor.
|
||||
*
|
||||
* \returns A cursor representing the declaration referenced by the given
|
||||
* \c cursor at the specified \c index. If the cursor does not have an
|
||||
* \returns A cursor representing the declaration referenced by the given
|
||||
* \c cursor at the specified \c index. If the cursor does not have an
|
||||
* associated set of overloaded declarations, or if the index is out of bounds,
|
||||
* returns \c clang_getNullCursor();
|
||||
*/
|
||||
CINDEX_LINKAGE CXCursor clang_getOverloadedDecl(CXCursor cursor,
|
||||
CINDEX_LINKAGE CXCursor clang_getOverloadedDecl(CXCursor cursor,
|
||||
unsigned index);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \defgroup CINDEX_ATTRIBUTES Information for attributes
|
||||
*
|
||||
|
@ -4021,7 +4021,7 @@ CINDEX_LINKAGE unsigned clang_visitChildren(CXCursor parent,
|
|||
* The visitor should return one of the \c CXChildVisitResult values
|
||||
* to direct clang_visitChildrenWithBlock().
|
||||
*/
|
||||
typedef enum CXChildVisitResult
|
||||
typedef enum CXChildVisitResult
|
||||
(^CXCursorVisitorBlock)(CXCursor cursor, CXCursor parent);
|
||||
|
||||
/**
|
||||
|
@ -4109,10 +4109,10 @@ CINDEX_LINKAGE CXString clang_getCursorSpelling(CXCursor);
|
|||
* Most of the times there is only one range for the complete spelling but for
|
||||
* Objective-C methods and Objective-C message expressions, there are multiple
|
||||
* pieces for each selector identifier.
|
||||
*
|
||||
*
|
||||
* \param pieceIndex the index of the spelling name piece. If this is greater
|
||||
* than the actual number of pieces, it will return a NULL (invalid) range.
|
||||
*
|
||||
*
|
||||
* \param options Reserved.
|
||||
*/
|
||||
CINDEX_LINKAGE CXSourceRange clang_Cursor_getSpellingNameRange(CXCursor,
|
||||
|
@ -4206,11 +4206,11 @@ CINDEX_LINKAGE CXString clang_getCursorPrettyPrinted(CXCursor Cursor,
|
|||
* Retrieve the display name for the entity referenced by this cursor.
|
||||
*
|
||||
* The display name contains extra information that helps identify the cursor,
|
||||
* such as the parameters of a function or template or the arguments of a
|
||||
* such as the parameters of a function or template or the arguments of a
|
||||
* class template specialization.
|
||||
*/
|
||||
CINDEX_LINKAGE CXString clang_getCursorDisplayName(CXCursor);
|
||||
|
||||
|
||||
/** For a cursor that is a reference, retrieve a cursor representing the
|
||||
* entity that it references.
|
||||
*
|
||||
|
@ -4274,10 +4274,10 @@ CINDEX_LINKAGE unsigned clang_isCursorDefinition(CXCursor);
|
|||
* };
|
||||
* \endcode
|
||||
*
|
||||
* The declarations and the definition of \c X are represented by three
|
||||
* different cursors, all of which are declarations of the same underlying
|
||||
* The declarations and the definition of \c X are represented by three
|
||||
* different cursors, all of which are declarations of the same underlying
|
||||
* entity. One of these cursor is considered the "canonical" cursor, which
|
||||
* is effectively the representative for the underlying entity. One can
|
||||
* is effectively the representative for the underlying entity. One can
|
||||
* determine if two cursors are declarations of the same underlying entity by
|
||||
* comparing their canonical cursors.
|
||||
*
|
||||
|
@ -4301,11 +4301,11 @@ CINDEX_LINKAGE int clang_Cursor_getObjCSelectorIndex(CXCursor);
|
|||
/**
|
||||
* Given a cursor pointing to a C++ method call or an Objective-C
|
||||
* message, returns non-zero if the method/message is "dynamic", meaning:
|
||||
*
|
||||
*
|
||||
* For a C++ method: the call is virtual.
|
||||
* For an Objective-C message: the receiver is an object instance, not 'super'
|
||||
* or a specific class.
|
||||
*
|
||||
*
|
||||
* If the method/message is "static" or the cursor does not point to a
|
||||
* method/message, it will return zero.
|
||||
*/
|
||||
|
@ -4575,7 +4575,7 @@ CINDEX_LINKAGE unsigned clang_CXXMethod_isDefaulted(CXCursor C);
|
|||
CINDEX_LINKAGE unsigned clang_CXXMethod_isPureVirtual(CXCursor C);
|
||||
|
||||
/**
|
||||
* Determine if a C++ member function or member function template is
|
||||
* Determine if a C++ member function or member function template is
|
||||
* declared 'static'.
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_CXXMethod_isStatic(CXCursor C);
|
||||
|
@ -4622,16 +4622,16 @@ CINDEX_LINKAGE unsigned clang_CXXMethod_isConst(CXCursor C);
|
|||
* \c CXCursor_NoDeclFound.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C);
|
||||
|
||||
|
||||
/**
|
||||
* Given a cursor that may represent a specialization or instantiation
|
||||
* of a template, retrieve the cursor that represents the template that it
|
||||
* specializes or from which it was instantiated.
|
||||
*
|
||||
* This routine determines the template involved both for explicit
|
||||
* This routine determines the template involved both for explicit
|
||||
* specializations of templates and for implicit instantiations of the template,
|
||||
* both of which are referred to as "specializations". For a class template
|
||||
* specialization (e.g., \c std::vector<bool>), this routine will return
|
||||
* specialization (e.g., \c std::vector<bool>), this routine will return
|
||||
* either the primary template (\c std::vector) or, if the specialization was
|
||||
* instantiated from a class template partial specialization, the class template
|
||||
* partial specialization. For a class template partial specialization and a
|
||||
|
@ -4639,7 +4639,7 @@ CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C);
|
|||
* this routine will return the specialized template.
|
||||
*
|
||||
* For members of a class template (e.g., member functions, member classes, or
|
||||
* static data members), returns the specialized or instantiated member.
|
||||
* static data members), returns the specialized or instantiated member.
|
||||
* Although not strictly "templates" in the C++ language, members of class
|
||||
* templates have the same notions of specializations and instantiations that
|
||||
* templates do, so this routine treats them similarly.
|
||||
|
@ -4647,7 +4647,7 @@ CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C);
|
|||
* \param C A cursor that may be a specialization of a template or a member
|
||||
* of a template.
|
||||
*
|
||||
* \returns If the given cursor is a specialization or instantiation of a
|
||||
* \returns If the given cursor is a specialization or instantiation of a
|
||||
* template or a member thereof, the template or member that it specializes or
|
||||
* from which it was instantiated. Otherwise, returns a NULL cursor.
|
||||
*/
|
||||
|
@ -4659,11 +4659,11 @@ CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C);
|
|||
*
|
||||
* \param C A cursor pointing to a member reference, a declaration reference, or
|
||||
* an operator call.
|
||||
* \param NameFlags A bitset with three independent flags:
|
||||
* \param NameFlags A bitset with three independent flags:
|
||||
* CXNameRange_WantQualifier, CXNameRange_WantTemplateArgs, and
|
||||
* CXNameRange_WantSinglePiece.
|
||||
* \param PieceIndex For contiguous names or when passing the flag
|
||||
* CXNameRange_WantSinglePiece, only one piece with index 0 is
|
||||
* \param PieceIndex For contiguous names or when passing the flag
|
||||
* CXNameRange_WantSinglePiece, only one piece with index 0 is
|
||||
* available. When the CXNameRange_WantSinglePiece flag is not passed for a
|
||||
* non-contiguous names, this index can be used to retrieve the individual
|
||||
* pieces of the name. See also CXNameRange_WantSinglePiece.
|
||||
|
@ -4672,7 +4672,7 @@ CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C);
|
|||
* name, or if the PieceIndex is out-of-range, a null-cursor will be returned.
|
||||
*/
|
||||
CINDEX_LINKAGE CXSourceRange clang_getCursorReferenceNameRange(CXCursor C,
|
||||
unsigned NameFlags,
|
||||
unsigned NameFlags,
|
||||
unsigned PieceIndex);
|
||||
|
||||
enum CXNameRefFlags {
|
||||
|
@ -4681,7 +4681,7 @@ enum CXNameRefFlags {
|
|||
* range.
|
||||
*/
|
||||
CXNameRange_WantQualifier = 0x1,
|
||||
|
||||
|
||||
/**
|
||||
* Include the explicit template arguments, e.g. \<int> in x.f<int>,
|
||||
* in the range.
|
||||
|
@ -4700,7 +4700,7 @@ enum CXNameRefFlags {
|
|||
*/
|
||||
CXNameRange_WantSinglePiece = 0x4
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -5153,7 +5153,7 @@ clang_getNumCompletionChunks(CXCompletionString completion_string);
|
|||
/**
|
||||
* Determine the priority of this code completion.
|
||||
*
|
||||
* The priority of a code completion indicates how likely it is that this
|
||||
* The priority of a code completion indicates how likely it is that this
|
||||
* particular completion is the completion that the user will select. The
|
||||
* priority is selected by various internal heuristics.
|
||||
*
|
||||
|
@ -5164,7 +5164,7 @@ clang_getNumCompletionChunks(CXCompletionString completion_string);
|
|||
*/
|
||||
CINDEX_LINKAGE unsigned
|
||||
clang_getCompletionPriority(CXCompletionString completion_string);
|
||||
|
||||
|
||||
/**
|
||||
* Determine the availability of the entity that this code-completion
|
||||
* string refers to.
|
||||
|
@ -5173,7 +5173,7 @@ clang_getCompletionPriority(CXCompletionString completion_string);
|
|||
*
|
||||
* \returns The availability of the completion string.
|
||||
*/
|
||||
CINDEX_LINKAGE enum CXAvailabilityKind
|
||||
CINDEX_LINKAGE enum CXAvailabilityKind
|
||||
clang_getCompletionAvailability(CXCompletionString completion_string);
|
||||
|
||||
/**
|
||||
|
@ -5206,7 +5206,7 @@ clang_getCompletionAnnotation(CXCompletionString completion_string,
|
|||
/**
|
||||
* Retrieve the parent context of the given completion string.
|
||||
*
|
||||
* The parent context of a completion string is the semantic parent of
|
||||
* The parent context of a completion string is the semantic parent of
|
||||
* the declaration (if any) that the code completion represents. For example,
|
||||
* a code completion for an Objective-C method would have the method's class
|
||||
* or protocol as its context.
|
||||
|
@ -5241,7 +5241,7 @@ clang_getCompletionBriefComment(CXCompletionString completion_string);
|
|||
*/
|
||||
CINDEX_LINKAGE CXCompletionString
|
||||
clang_getCursorCompletionString(CXCursor cursor);
|
||||
|
||||
|
||||
/**
|
||||
* Contains the results of code-completion.
|
||||
*
|
||||
|
@ -5378,12 +5378,12 @@ enum CXCompletionContext {
|
|||
* should be included. (This is equivalent to having no context bits set.)
|
||||
*/
|
||||
CXCompletionContext_Unexposed = 0,
|
||||
|
||||
|
||||
/**
|
||||
* Completions for any possible type should be included in the results.
|
||||
*/
|
||||
CXCompletionContext_AnyType = 1 << 0,
|
||||
|
||||
|
||||
/**
|
||||
* Completions for any possible value (variables, function calls, etc.)
|
||||
* should be included in the results.
|
||||
|
@ -5404,7 +5404,7 @@ enum CXCompletionContext {
|
|||
* included in the results.
|
||||
*/
|
||||
CXCompletionContext_CXXClassTypeValue = 1 << 4,
|
||||
|
||||
|
||||
/**
|
||||
* Completions for fields of the member being accessed using the dot
|
||||
* operator should be included in the results.
|
||||
|
@ -5420,7 +5420,7 @@ enum CXCompletionContext {
|
|||
* using the dot operator should be included in the results.
|
||||
*/
|
||||
CXCompletionContext_ObjCPropertyAccess = 1 << 7,
|
||||
|
||||
|
||||
/**
|
||||
* Completions for enum tags should be included in the results.
|
||||
*/
|
||||
|
@ -5433,7 +5433,7 @@ enum CXCompletionContext {
|
|||
* Completions for struct tags should be included in the results.
|
||||
*/
|
||||
CXCompletionContext_StructTag = 1 << 10,
|
||||
|
||||
|
||||
/**
|
||||
* Completions for C++ class names should be included in the results.
|
||||
*/
|
||||
|
@ -5448,7 +5448,7 @@ enum CXCompletionContext {
|
|||
* the results.
|
||||
*/
|
||||
CXCompletionContext_NestedNameSpecifier = 1 << 13,
|
||||
|
||||
|
||||
/**
|
||||
* Completions for Objective-C interfaces (classes) should be included
|
||||
* in the results.
|
||||
|
@ -5479,27 +5479,27 @@ enum CXCompletionContext {
|
|||
* the results.
|
||||
*/
|
||||
CXCompletionContext_ObjCSelectorName = 1 << 19,
|
||||
|
||||
|
||||
/**
|
||||
* Completions for preprocessor macro names should be included in
|
||||
* the results.
|
||||
*/
|
||||
CXCompletionContext_MacroName = 1 << 20,
|
||||
|
||||
|
||||
/**
|
||||
* Natural language completions should be included in the results.
|
||||
*/
|
||||
CXCompletionContext_NaturalLanguage = 1 << 21,
|
||||
|
||||
|
||||
/**
|
||||
* The current context is unknown, so set all contexts.
|
||||
*/
|
||||
CXCompletionContext_Unknown = ((1 << 22) - 1)
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns a default set of code-completion options that can be
|
||||
* passed to\c clang_codeCompleteAt().
|
||||
* passed to\c clang_codeCompleteAt().
|
||||
*/
|
||||
CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void);
|
||||
|
||||
|
@ -5562,7 +5562,7 @@ CINDEX_LINKAGE unsigned clang_defaultCodeCompleteOptions(void);
|
|||
*
|
||||
* \param options Extra options that control the behavior of code
|
||||
* completion, expressed as a bitwise OR of the enumerators of the
|
||||
* CXCodeComplete_Flags enumeration. The
|
||||
* CXCodeComplete_Flags enumeration. The
|
||||
* \c clang_defaultCodeCompleteOptions() function returns a default set
|
||||
* of code-completion options.
|
||||
*
|
||||
|
@ -5581,7 +5581,7 @@ CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU,
|
|||
unsigned options);
|
||||
|
||||
/**
|
||||
* Sort the code-completion results in case-insensitive alphabetical
|
||||
* Sort the code-completion results in case-insensitive alphabetical
|
||||
* order.
|
||||
*
|
||||
* \param Results The set of results to sort.
|
||||
|
@ -5590,13 +5590,13 @@ CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU,
|
|||
CINDEX_LINKAGE
|
||||
void clang_sortCodeCompletionResults(CXCompletionResult *Results,
|
||||
unsigned NumResults);
|
||||
|
||||
|
||||
/**
|
||||
* Free the given set of code-completion results.
|
||||
*/
|
||||
CINDEX_LINKAGE
|
||||
void clang_disposeCodeCompleteResults(CXCodeCompleteResults *Results);
|
||||
|
||||
|
||||
/**
|
||||
* Determine the number of diagnostics produced prior to the
|
||||
* location where code completion was performed.
|
||||
|
@ -5620,7 +5620,7 @@ CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults *Results,
|
|||
/**
|
||||
* Determines what completions are appropriate for the context
|
||||
* the given code completion.
|
||||
*
|
||||
*
|
||||
* \param Results the code completion results to query
|
||||
*
|
||||
* \returns the kinds of completions that are appropriate for use
|
||||
|
@ -5676,7 +5676,7 @@ CXString clang_codeCompleteGetContainerUSR(CXCodeCompleteResults *Results);
|
|||
*/
|
||||
CINDEX_LINKAGE
|
||||
CXString clang_codeCompleteGetObjCSelector(CXCodeCompleteResults *Results);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -5700,7 +5700,7 @@ CINDEX_LINKAGE CXString clang_getClangVersion(void);
|
|||
* value enables crash recovery, while 0 disables it.
|
||||
*/
|
||||
CINDEX_LINKAGE void clang_toggleCrashRecovery(unsigned isEnabled);
|
||||
|
||||
|
||||
/**
|
||||
* Visitor invoked for each file in a translation unit
|
||||
* (used with clang_getInclusions()).
|
||||
|
@ -5745,7 +5745,7 @@ typedef enum {
|
|||
typedef void * CXEvalResult;
|
||||
|
||||
/**
|
||||
* If cursor is a statement declaration tries to evaluate the
|
||||
* If cursor is a statement declaration tries to evaluate the
|
||||
* statement and if its variable, tries to evaluate its initializer,
|
||||
* into its corresponding type.
|
||||
*/
|
||||
|
@ -5844,7 +5844,7 @@ CINDEX_LINKAGE unsigned clang_remap_getNumFiles(CXRemapping);
|
|||
|
||||
/**
|
||||
* Get the original and the associated filename from the remapping.
|
||||
*
|
||||
*
|
||||
* \param original If non-NULL, will be set to the original filename.
|
||||
*
|
||||
* \param transformed If non-NULL, will be set to the filename that the original
|
||||
|
@ -5896,7 +5896,7 @@ typedef enum {
|
|||
|
||||
/**
|
||||
* Find references of a declaration in a specific file.
|
||||
*
|
||||
*
|
||||
* \param cursor pointing to a declaration or a reference of one.
|
||||
*
|
||||
* \param file to search for references.
|
||||
|
@ -6255,11 +6255,11 @@ typedef struct {
|
|||
const CXIdxEntityInfo *referencedEntity;
|
||||
/**
|
||||
* Immediate "parent" of the reference. For example:
|
||||
*
|
||||
*
|
||||
* \code
|
||||
* Foo *var;
|
||||
* \endcode
|
||||
*
|
||||
*
|
||||
* The parent of reference of type 'Foo' is the variable 'var'.
|
||||
* For references inside statement bodies of functions/methods,
|
||||
* the parentEntity will be the function/method.
|
||||
|
@ -6294,16 +6294,16 @@ typedef struct {
|
|||
|
||||
CXIdxClientFile (*enteredMainFile)(CXClientData client_data,
|
||||
CXFile mainFile, void *reserved);
|
||||
|
||||
|
||||
/**
|
||||
* Called when a file gets \#included/\#imported.
|
||||
*/
|
||||
CXIdxClientFile (*ppIncludedFile)(CXClientData client_data,
|
||||
const CXIdxIncludedFileInfo *);
|
||||
|
||||
|
||||
/**
|
||||
* Called when a AST file (PCH or module) gets imported.
|
||||
*
|
||||
*
|
||||
* AST files will not get indexed (there will not be callbacks to index all
|
||||
* the entities in an AST file). The recommended action is that, if the AST
|
||||
* file is not already indexed, to initiate a new indexing job specific to
|
||||
|
@ -6405,7 +6405,7 @@ typedef enum {
|
|||
* Used to indicate that no special indexing options are needed.
|
||||
*/
|
||||
CXIndexOpt_None = 0x0,
|
||||
|
||||
|
||||
/**
|
||||
* Used to indicate that IndexerCallbacks#indexEntityReference should
|
||||
* be invoked for only one reference of an entity per source file that does
|
||||
|
@ -6492,16 +6492,16 @@ CINDEX_LINKAGE int clang_indexSourceFileFullArgv(
|
|||
/**
|
||||
* Index the given translation unit via callbacks implemented through
|
||||
* #IndexerCallbacks.
|
||||
*
|
||||
*
|
||||
* The order of callback invocations is not guaranteed to be the same as
|
||||
* when indexing a source file. The high level order will be:
|
||||
*
|
||||
*
|
||||
* -Preprocessor callbacks invocations
|
||||
* -Declaration/reference callbacks invocations
|
||||
* -Diagnostic callback invocations
|
||||
*
|
||||
* The parameters are the same as #clang_indexSourceFile.
|
||||
*
|
||||
*
|
||||
* \returns If there is a failure from which there is no recovery, returns
|
||||
* non-zero, otherwise returns 0.
|
||||
*/
|
||||
|
|
|
@ -41,7 +41,7 @@ class FileRemapper {
|
|||
public:
|
||||
FileRemapper();
|
||||
~FileRemapper();
|
||||
|
||||
|
||||
bool initFromDisk(StringRef outputDir, DiagnosticsEngine &Diag,
|
||||
bool ignoreIfFilesChanged);
|
||||
bool initFromFile(StringRef filePath, DiagnosticsEngine &Diag,
|
||||
|
|
|
@ -1528,7 +1528,7 @@ public:
|
|||
/// The sizeof operator requires this (C99 6.5.3.4p4).
|
||||
CanQualType getSizeType() const;
|
||||
|
||||
/// Return the unique signed counterpart of
|
||||
/// Return the unique signed counterpart of
|
||||
/// the integer type corresponding to size_t.
|
||||
CanQualType getSignedSizeType() const;
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@ namespace clang {
|
|||
NUM_BUILTIN_AST_DIAGNOSTICS
|
||||
};
|
||||
} // end namespace diag
|
||||
|
||||
|
||||
/// DiagnosticsEngine argument formatting function for diagnostics that
|
||||
/// involve AST nodes.
|
||||
///
|
||||
/// This function formats diagnostic arguments for various AST nodes,
|
||||
/// This function formats diagnostic arguments for various AST nodes,
|
||||
/// including types, declaration names, nested name specifiers, and
|
||||
/// declaration contexts, into strings that can be printed as part of
|
||||
/// diagnostics. It is meant to be used as the argument to
|
||||
|
|
|
@ -63,7 +63,7 @@ class Attr;
|
|||
private:
|
||||
/// The contexts we're importing to and from.
|
||||
ASTContext &ToContext, &FromContext;
|
||||
|
||||
|
||||
/// The file managers we're importing to and from.
|
||||
FileManager &ToFileManager, &FromFileManager;
|
||||
|
||||
|
@ -72,11 +72,11 @@ class Attr;
|
|||
|
||||
/// Whether the last diagnostic came from the "from" context.
|
||||
bool LastDiagFromFrom = false;
|
||||
|
||||
|
||||
/// Mapping from the already-imported types in the "from" context
|
||||
/// to the corresponding types in the "to" context.
|
||||
llvm::DenseMap<const Type *, const Type *> ImportedTypes;
|
||||
|
||||
|
||||
/// Mapping from the already-imported declarations in the "from"
|
||||
/// context to the corresponding declarations in the "to" context.
|
||||
llvm::DenseMap<Decl *, Decl *> ImportedDecls;
|
||||
|
@ -93,11 +93,11 @@ class Attr;
|
|||
/// the "from" source manager to the corresponding CXXBasesSpecifier
|
||||
/// in the "to" source manager.
|
||||
ImportedCXXBaseSpecifierMap ImportedCXXBaseSpecifiers;
|
||||
|
||||
|
||||
/// Declaration (from, to) pairs that are known not to be equivalent
|
||||
/// (which we have already complained about).
|
||||
NonEquivalentDeclSet NonEquivalentDecls;
|
||||
|
||||
|
||||
public:
|
||||
/// Create a new AST importer.
|
||||
///
|
||||
|
@ -115,13 +115,13 @@ class Attr;
|
|||
ASTImporter(ASTContext &ToContext, FileManager &ToFileManager,
|
||||
ASTContext &FromContext, FileManager &FromFileManager,
|
||||
bool MinimalImport);
|
||||
|
||||
|
||||
virtual ~ASTImporter();
|
||||
|
||||
|
||||
/// Whether the importer will perform a minimal import, creating
|
||||
/// to-be-completed forward declarations when possible.
|
||||
bool isMinimalImport() const { return Minimal; }
|
||||
|
||||
|
||||
/// Import the given type from the "from" context into the "to"
|
||||
/// context.
|
||||
///
|
||||
|
@ -142,10 +142,10 @@ class Attr;
|
|||
/// \returns the equivalent attribute in the "to" context.
|
||||
Attr *Import(const Attr *FromAttr);
|
||||
|
||||
/// Import the given declaration from the "from" context into the
|
||||
/// Import the given declaration from the "from" context into the
|
||||
/// "to" context.
|
||||
///
|
||||
/// \returns the equivalent declaration in the "to" context, or a NULL type
|
||||
/// \returns the equivalent declaration in the "to" context, or a NULL type
|
||||
/// if an error occurred.
|
||||
Decl *Import(Decl *FromD);
|
||||
Decl *Import(const Decl *FromD) {
|
||||
|
@ -163,7 +163,7 @@ class Attr;
|
|||
/// \returns the equivalent declaration context in the "to"
|
||||
/// context, or a NULL type if an error occurred.
|
||||
DeclContext *ImportContext(DeclContext *FromDC);
|
||||
|
||||
|
||||
/// Import the given expression from the "from" context into the
|
||||
/// "to" context.
|
||||
///
|
||||
|
@ -195,7 +195,7 @@ class Attr;
|
|||
/// Import the goven template name from the "from" context into the
|
||||
/// "to" context.
|
||||
TemplateName Import(TemplateName From);
|
||||
|
||||
|
||||
/// Import the given source location from the "from" context into
|
||||
/// the "to" context.
|
||||
///
|
||||
|
@ -229,7 +229,7 @@ class Attr;
|
|||
/// \returns the equivalent selector in the "to" context.
|
||||
Selector Import(Selector FromSel);
|
||||
|
||||
/// Import the given file ID from the "from" context into the
|
||||
/// Import the given file ID from the "from" context into the
|
||||
/// "to" context.
|
||||
///
|
||||
/// \returns the equivalent file ID in the source manager of the "to"
|
||||
|
@ -252,13 +252,13 @@ class Attr;
|
|||
/// Import the definition of the given declaration, including all of
|
||||
/// the declarations it contains.
|
||||
///
|
||||
/// This routine is intended to be used
|
||||
/// This routine is intended to be used
|
||||
void ImportDefinition(Decl *From);
|
||||
|
||||
/// Cope with a name conflict when importing a declaration into the
|
||||
/// given context.
|
||||
///
|
||||
/// This routine is invoked whenever there is a name conflict while
|
||||
/// This routine is invoked whenever there is a name conflict while
|
||||
/// importing a declaration. The returned name will become the name of the
|
||||
/// imported declaration. By default, the returned name is the same as the
|
||||
/// original name, leaving the conflict unresolve such that name lookup
|
||||
|
@ -270,7 +270,7 @@ class Attr;
|
|||
/// \param Name the name of the declaration being imported, which conflicts
|
||||
/// with other declarations.
|
||||
///
|
||||
/// \param DC the declaration context (in the "to" AST context) in which
|
||||
/// \param DC the declaration context (in the "to" AST context) in which
|
||||
/// the name is being imported.
|
||||
///
|
||||
/// \param IDNS the identifier namespace in which the name will be found.
|
||||
|
@ -286,25 +286,25 @@ class Attr;
|
|||
unsigned IDNS,
|
||||
NamedDecl **Decls,
|
||||
unsigned NumDecls);
|
||||
|
||||
|
||||
/// Retrieve the context that AST nodes are being imported into.
|
||||
ASTContext &getToContext() const { return ToContext; }
|
||||
|
||||
|
||||
/// Retrieve the context that AST nodes are being imported from.
|
||||
ASTContext &getFromContext() const { return FromContext; }
|
||||
|
||||
|
||||
/// Retrieve the file manager that AST nodes are being imported into.
|
||||
FileManager &getToFileManager() const { return ToFileManager; }
|
||||
|
||||
/// Retrieve the file manager that AST nodes are being imported from.
|
||||
FileManager &getFromFileManager() const { return FromFileManager; }
|
||||
|
||||
|
||||
/// Report a diagnostic in the "to" context.
|
||||
DiagnosticBuilder ToDiag(SourceLocation Loc, unsigned DiagID);
|
||||
|
||||
|
||||
/// Report a diagnostic in the "from" context.
|
||||
DiagnosticBuilder FromDiag(SourceLocation Loc, unsigned DiagID);
|
||||
|
||||
|
||||
/// Return the set of declarations that we know are not equivalent.
|
||||
NonEquivalentDeclSet &getNonEquivalentDecls() { return NonEquivalentDecls; }
|
||||
|
||||
|
@ -313,7 +313,7 @@ class Attr;
|
|||
///
|
||||
/// \param D A declaration in the "to" context.
|
||||
virtual void CompleteDecl(Decl* D);
|
||||
|
||||
|
||||
/// Subclasses can override this function to observe all of the \c From ->
|
||||
/// \c To declaration mappings as they are imported.
|
||||
virtual Decl *Imported(Decl *From, Decl *To) { return To; }
|
||||
|
@ -328,7 +328,7 @@ class Attr;
|
|||
/// RecordDecl can be found, we can complete it without the need for
|
||||
/// importation, eliminating this loop.
|
||||
virtual Decl *GetOriginalDecl(Decl *To) { return nullptr; }
|
||||
|
||||
|
||||
/// Determine whether the given types are structurally
|
||||
/// equivalent.
|
||||
bool IsStructurallyEquivalent(QualType From, QualType To,
|
||||
|
|
|
@ -40,7 +40,7 @@ inline bool isGenericLambdaCallOperatorSpecialization(const CXXMethodDecl *MD) {
|
|||
if (!MD) return false;
|
||||
const CXXRecordDecl *LambdaClass = MD->getParent();
|
||||
if (LambdaClass && LambdaClass->isGenericLambda())
|
||||
return isLambdaCallOperator(MD) &&
|
||||
return isLambdaCallOperator(MD) &&
|
||||
MD->isFunctionTemplateSpecialization();
|
||||
return false;
|
||||
}
|
||||
|
@ -51,11 +51,11 @@ inline bool isLambdaConversionOperator(CXXConversionDecl *C) {
|
|||
|
||||
inline bool isLambdaConversionOperator(Decl *D) {
|
||||
if (!D) return false;
|
||||
if (CXXConversionDecl *Conv = dyn_cast<CXXConversionDecl>(D))
|
||||
return isLambdaConversionOperator(Conv);
|
||||
if (FunctionTemplateDecl *F = dyn_cast<FunctionTemplateDecl>(D))
|
||||
if (CXXConversionDecl *Conv =
|
||||
dyn_cast_or_null<CXXConversionDecl>(F->getTemplatedDecl()))
|
||||
if (CXXConversionDecl *Conv = dyn_cast<CXXConversionDecl>(D))
|
||||
return isLambdaConversionOperator(Conv);
|
||||
if (FunctionTemplateDecl *F = dyn_cast<FunctionTemplateDecl>(D))
|
||||
if (CXXConversionDecl *Conv =
|
||||
dyn_cast_or_null<CXXConversionDecl>(F->getTemplatedDecl()))
|
||||
return isLambdaConversionOperator(Conv);
|
||||
return false;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ inline bool isGenericLambdaCallOperatorSpecialization(DeclContext *DC) {
|
|||
inline DeclContext *getLambdaAwareParentOfDeclContext(DeclContext *DC) {
|
||||
if (isLambdaCallOperator(DC))
|
||||
return DC->getParent()->getParent();
|
||||
else
|
||||
else
|
||||
return DC->getParent();
|
||||
}
|
||||
|
||||
|
|
|
@ -134,13 +134,13 @@ public:
|
|||
/// \param M The containing module in which the definition was made visible,
|
||||
/// if any.
|
||||
virtual void RedefinedHiddenDefinition(const NamedDecl *D, Module *M) {}
|
||||
|
||||
|
||||
/// An attribute was added to a RecordDecl
|
||||
///
|
||||
/// \param Attr The attribute that was added to the Record
|
||||
///
|
||||
/// \param Record The RecordDecl that got a new attribute
|
||||
virtual void AddedAttributeToRecord(const Attr *Attr,
|
||||
virtual void AddedAttributeToRecord(const Attr *Attr,
|
||||
const RecordDecl *Record) {}
|
||||
|
||||
// NOTE: If new methods are added they should also be added to
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
attr::Kind getKind() const {
|
||||
return static_cast<attr::Kind>(AttrKind);
|
||||
}
|
||||
|
||||
|
||||
unsigned getSpellingListIndex() const { return SpellingListIndex; }
|
||||
const char *getSpelling() const;
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ public:
|
|||
specific_attr_iterator Right) {
|
||||
assert((Left.Current == nullptr) == (Right.Current == nullptr));
|
||||
if (Left.Current < Right.Current)
|
||||
Left.AdvanceToNext(Right.Current);
|
||||
Left.AdvanceToNext(Right.Current);
|
||||
else
|
||||
Right.AdvanceToNext(Left.Current);
|
||||
return Left.Current == Right.Current;
|
||||
|
|
|
@ -24,21 +24,21 @@ namespace clang {
|
|||
|
||||
class CXXRecordDecl;
|
||||
|
||||
// BaseSubobject - Uniquely identifies a direct or indirect base class.
|
||||
// BaseSubobject - Uniquely identifies a direct or indirect base class.
|
||||
// Stores both the base class decl and the offset from the most derived class to
|
||||
// the base class. Used for vtable and VTT generation.
|
||||
class BaseSubobject {
|
||||
/// Base - The base class declaration.
|
||||
const CXXRecordDecl *Base;
|
||||
|
||||
|
||||
/// BaseOffset - The offset from the most derived class to the base class.
|
||||
CharUnits BaseOffset;
|
||||
|
||||
|
||||
public:
|
||||
BaseSubobject() = default;
|
||||
BaseSubobject(const CXXRecordDecl *Base, CharUnits BaseOffset)
|
||||
: Base(Base), BaseOffset(BaseOffset) {}
|
||||
|
||||
|
||||
/// getBase - Returns the base class declaration.
|
||||
const CXXRecordDecl *getBase() const { return Base; }
|
||||
|
||||
|
@ -74,7 +74,7 @@ template<> struct DenseMapInfo<clang::BaseSubobject> {
|
|||
Base.getBaseOffset()));
|
||||
}
|
||||
|
||||
static bool isEqual(const clang::BaseSubobject &LHS,
|
||||
static bool isEqual(const clang::BaseSubobject &LHS,
|
||||
const clang::BaseSubobject &RHS) {
|
||||
return LHS == RHS;
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ namespace clang {
|
|||
|
||||
class ASTContext;
|
||||
class NamedDecl;
|
||||
|
||||
|
||||
/// Represents an element in a path from a derived class to a
|
||||
/// base class.
|
||||
///
|
||||
/// base class.
|
||||
///
|
||||
/// Each step in the path references the link from a
|
||||
/// derived class to one of its direct base classes, along with a
|
||||
/// base "number" that identifies which base subobject of the
|
||||
|
@ -47,12 +47,12 @@ struct CXXBasePathElement {
|
|||
/// class to a base class, which will be followed by this base
|
||||
/// path element.
|
||||
const CXXBaseSpecifier *Base;
|
||||
|
||||
|
||||
/// The record decl of the class that the base is a base of.
|
||||
const CXXRecordDecl *Class;
|
||||
|
||||
|
||||
/// Identifies which base class subobject (of type
|
||||
/// \c Base->getType()) this base path element refers to.
|
||||
/// \c Base->getType()) this base path element refers to.
|
||||
///
|
||||
/// This value is only valid if \c !Base->isVirtual(), because there
|
||||
/// is no base numbering for the zero or one virtual bases of a
|
||||
|
@ -64,7 +64,7 @@ struct CXXBasePathElement {
|
|||
/// (which is not represented as part of the path) to a particular
|
||||
/// (direct or indirect) base class subobject.
|
||||
///
|
||||
/// Individual elements in the path are described by the \c CXXBasePathElement
|
||||
/// Individual elements in the path are described by the \c CXXBasePathElement
|
||||
/// structure, which captures both the link from a derived class to one of its
|
||||
/// direct bases and identification describing which base class
|
||||
/// subobject is being used.
|
||||
|
@ -121,7 +121,7 @@ class CXXBasePaths {
|
|||
|
||||
/// The type from which this search originated.
|
||||
CXXRecordDecl *Origin = nullptr;
|
||||
|
||||
|
||||
/// Paths - The actual set of paths that can be taken from the
|
||||
/// derived class to the same base class.
|
||||
std::list<CXXBasePath> Paths;
|
||||
|
@ -160,12 +160,12 @@ class CXXBasePaths {
|
|||
/// ambiguous paths while it is looking for a path from a derived
|
||||
/// type to a base type.
|
||||
bool FindAmbiguities;
|
||||
|
||||
|
||||
/// RecordPaths - Whether Sema::IsDerivedFrom should record paths
|
||||
/// while it is determining whether there are paths from a derived
|
||||
/// type to a base type.
|
||||
bool RecordPaths;
|
||||
|
||||
|
||||
/// DetectVirtual - Whether Sema::IsDerivedFrom should abort the search
|
||||
/// if it finds a path that goes across a virtual base. The virtual class
|
||||
/// is also recorded.
|
||||
|
@ -181,7 +181,7 @@ public:
|
|||
using paths_iterator = std::list<CXXBasePath>::iterator;
|
||||
using const_paths_iterator = std::list<CXXBasePath>::const_iterator;
|
||||
using decl_iterator = NamedDecl **;
|
||||
|
||||
|
||||
/// BasePaths - Construct a new BasePaths structure to record the
|
||||
/// paths for a derived-to-base search.
|
||||
explicit CXXBasePaths(bool FindAmbiguities = true, bool RecordPaths = true,
|
||||
|
@ -193,31 +193,31 @@ public:
|
|||
paths_iterator end() { return Paths.end(); }
|
||||
const_paths_iterator begin() const { return Paths.begin(); }
|
||||
const_paths_iterator end() const { return Paths.end(); }
|
||||
|
||||
|
||||
CXXBasePath& front() { return Paths.front(); }
|
||||
const CXXBasePath& front() const { return Paths.front(); }
|
||||
|
||||
|
||||
using decl_range = llvm::iterator_range<decl_iterator>;
|
||||
|
||||
decl_range found_decls();
|
||||
|
||||
|
||||
/// Determine whether the path from the most-derived type to the
|
||||
/// given base type is ambiguous (i.e., it refers to multiple subobjects of
|
||||
/// the same base type).
|
||||
bool isAmbiguous(CanQualType BaseType);
|
||||
|
||||
|
||||
/// Whether we are finding multiple paths to detect ambiguities.
|
||||
bool isFindingAmbiguities() const { return FindAmbiguities; }
|
||||
|
||||
|
||||
/// Whether we are recording paths.
|
||||
bool isRecordingPaths() const { return RecordPaths; }
|
||||
|
||||
|
||||
/// Specify whether we should be recording paths or not.
|
||||
void setRecordingPaths(bool RP) { RecordPaths = RP; }
|
||||
|
||||
|
||||
/// Whether we are detecting virtual bases.
|
||||
bool isDetectingVirtual() const { return DetectVirtual; }
|
||||
|
||||
|
||||
/// The virtual base discovered on the path (if we are merely
|
||||
/// detecting virtuals).
|
||||
const RecordType* getDetectedVirtual() const {
|
||||
|
@ -228,11 +228,11 @@ public:
|
|||
/// began
|
||||
CXXRecordDecl *getOrigin() const { return Origin; }
|
||||
void setOrigin(CXXRecordDecl *Rec) { Origin = Rec; }
|
||||
|
||||
|
||||
/// Clear the base-paths results.
|
||||
void clear();
|
||||
|
||||
/// Swap this data structure's contents with another CXXBasePaths
|
||||
|
||||
/// Swap this data structure's contents with another CXXBasePaths
|
||||
/// object.
|
||||
void swap(CXXBasePaths &Other);
|
||||
};
|
||||
|
|
|
@ -85,8 +85,8 @@ public:
|
|||
|
||||
/// Retrieve the underlying type pointer, which refers to a
|
||||
/// canonical type, or nullptr.
|
||||
const T *getTypePtrOrNull() const {
|
||||
return cast_or_null<T>(Stored.getTypePtrOrNull());
|
||||
const T *getTypePtrOrNull() const {
|
||||
return cast_or_null<T>(Stored.getTypePtrOrNull());
|
||||
}
|
||||
|
||||
/// Implicit conversion to a qualified type.
|
||||
|
@ -94,7 +94,7 @@ public:
|
|||
|
||||
/// Implicit conversion to bool.
|
||||
explicit operator bool() const { return !isNull(); }
|
||||
|
||||
|
||||
bool isNull() const {
|
||||
return Stored.isNull();
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace clang {
|
|||
|
||||
/// fromQuantity - Construct a CharUnits quantity from a raw integer type.
|
||||
static CharUnits fromQuantity(QuantityType Quantity) {
|
||||
return CharUnits(Quantity);
|
||||
return CharUnits(Quantity);
|
||||
}
|
||||
|
||||
// Compound assignment.
|
||||
|
@ -87,7 +87,7 @@ namespace clang {
|
|||
CharUnits operator-- (int) {
|
||||
return CharUnits(Quantity--);
|
||||
}
|
||||
|
||||
|
||||
// Comparison operators.
|
||||
bool operator== (const CharUnits &Other) const {
|
||||
return Quantity == Other.Quantity;
|
||||
|
@ -97,21 +97,21 @@ namespace clang {
|
|||
}
|
||||
|
||||
// Relational operators.
|
||||
bool operator< (const CharUnits &Other) const {
|
||||
return Quantity < Other.Quantity;
|
||||
bool operator< (const CharUnits &Other) const {
|
||||
return Quantity < Other.Quantity;
|
||||
}
|
||||
bool operator<= (const CharUnits &Other) const {
|
||||
bool operator<= (const CharUnits &Other) const {
|
||||
return Quantity <= Other.Quantity;
|
||||
}
|
||||
bool operator> (const CharUnits &Other) const {
|
||||
return Quantity > Other.Quantity;
|
||||
bool operator> (const CharUnits &Other) const {
|
||||
return Quantity > Other.Quantity;
|
||||
}
|
||||
bool operator>= (const CharUnits &Other) const {
|
||||
return Quantity >= Other.Quantity;
|
||||
bool operator>= (const CharUnits &Other) const {
|
||||
return Quantity >= Other.Quantity;
|
||||
}
|
||||
|
||||
// Other predicates.
|
||||
|
||||
|
||||
/// isZero - Test whether the quantity equals zero.
|
||||
bool isZero() const { return Quantity == 0; }
|
||||
|
||||
|
@ -172,7 +172,7 @@ namespace clang {
|
|||
return CharUnits(-Quantity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Conversions.
|
||||
|
||||
/// getQuantity - Get the raw integer representation of this quantity.
|
||||
|
@ -205,7 +205,7 @@ namespace clang {
|
|||
}; // class CharUnit
|
||||
} // namespace clang
|
||||
|
||||
inline clang::CharUnits operator* (clang::CharUnits::QuantityType Scale,
|
||||
inline clang::CharUnits operator* (clang::CharUnits::QuantityType Scale,
|
||||
const clang::CharUnits &CU) {
|
||||
return CU * Scale;
|
||||
}
|
||||
|
@ -223,8 +223,8 @@ template<> struct DenseMapInfo<clang::CharUnits> {
|
|||
static clang::CharUnits getTombstoneKey() {
|
||||
clang::CharUnits::QuantityType Quantity =
|
||||
DenseMapInfo<clang::CharUnits::QuantityType>::getTombstoneKey();
|
||||
|
||||
return clang::CharUnits::fromQuantity(Quantity);
|
||||
|
||||
return clang::CharUnits::fromQuantity(Quantity);
|
||||
}
|
||||
|
||||
static unsigned getHashValue(const clang::CharUnits &CU) {
|
||||
|
@ -232,7 +232,7 @@ template<> struct DenseMapInfo<clang::CharUnits> {
|
|||
return DenseMapInfo<clang::CharUnits::QuantityType>::getHashValue(Quantity);
|
||||
}
|
||||
|
||||
static bool isEqual(const clang::CharUnits &LHS,
|
||||
static bool isEqual(const clang::CharUnits &LHS,
|
||||
const clang::CharUnits &RHS) {
|
||||
return LHS == RHS;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ template<> struct DenseMapInfo<clang::CharUnits> {
|
|||
template <> struct isPodLike<clang::CharUnits> {
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
#endif // LLVM_CLANG_AST_CHARUNITS_H
|
||||
|
|
|
@ -98,7 +98,7 @@ protected:
|
|||
unsigned RenderKind : 2;
|
||||
unsigned CommandID : CommandInfo::NumCommandIDBits;
|
||||
};
|
||||
enum { NumInlineCommandCommentBits = NumInlineContentCommentBits + 2 +
|
||||
enum { NumInlineCommandCommentBits = NumInlineContentCommentBits + 2 +
|
||||
CommandInfo::NumCommandIDBits };
|
||||
|
||||
class HTMLTagCommentBitfields {
|
||||
|
@ -146,7 +146,7 @@ protected:
|
|||
/// Contains values from CommandMarkerKind enum.
|
||||
unsigned CommandMarker : 1;
|
||||
};
|
||||
enum { NumBlockCommandCommentBits = NumCommentBits +
|
||||
enum { NumBlockCommandCommentBits = NumCommentBits +
|
||||
CommandInfo::NumCommandIDBits + 1 };
|
||||
|
||||
class ParamCommandCommentBitfields {
|
||||
|
@ -987,7 +987,7 @@ struct DeclInfo {
|
|||
/// Declaration the comment is actually attached to (in the source).
|
||||
/// Should not be NULL.
|
||||
const Decl *CommentDecl;
|
||||
|
||||
|
||||
/// CurrentDecl is the declaration with which the FullComment is associated.
|
||||
///
|
||||
/// It can be different from \c CommentDecl. It happens when we decide
|
||||
|
@ -997,7 +997,7 @@ struct DeclInfo {
|
|||
///
|
||||
/// The information in the DeclInfo corresponds to CurrentDecl.
|
||||
const Decl *CurrentDecl;
|
||||
|
||||
|
||||
/// Parameters that can be referenced by \\param if \c CommentDecl is something
|
||||
/// that we consider a "function".
|
||||
ArrayRef<const ParmVarDecl *> ParamVars;
|
||||
|
@ -1119,21 +1119,21 @@ public:
|
|||
}
|
||||
|
||||
child_iterator child_end() const {
|
||||
return reinterpret_cast<child_iterator>(Blocks.end());
|
||||
return reinterpret_cast<child_iterator>(Blocks.end());
|
||||
}
|
||||
|
||||
const Decl *getDecl() const LLVM_READONLY {
|
||||
return ThisDeclInfo->CommentDecl;
|
||||
}
|
||||
|
||||
|
||||
const DeclInfo *getDeclInfo() const LLVM_READONLY {
|
||||
if (!ThisDeclInfo->IsFilled)
|
||||
ThisDeclInfo->fill();
|
||||
return ThisDeclInfo;
|
||||
}
|
||||
|
||||
|
||||
ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; }
|
||||
|
||||
|
||||
};
|
||||
} // end namespace comments
|
||||
} // end namespace clang
|
||||
|
|
|
@ -107,17 +107,17 @@ struct CommandInfo {
|
|||
/// \fn void f(int a);
|
||||
/// \endcode
|
||||
unsigned IsDeclarationCommand : 1;
|
||||
|
||||
|
||||
/// True if verbatim-like line command is a function declaration.
|
||||
unsigned IsFunctionDeclarationCommand : 1;
|
||||
|
||||
/// True if block command is further describing a container API; such
|
||||
/// as \@coclass, \@classdesign, etc.
|
||||
unsigned IsRecordLikeDetailCommand : 1;
|
||||
|
||||
|
||||
/// True if block command is a container API; such as \@interface.
|
||||
unsigned IsRecordLikeDeclarationCommand : 1;
|
||||
|
||||
|
||||
/// True if this command is unknown. This \c CommandInfo object was
|
||||
/// created during parsing.
|
||||
unsigned IsUnknownCommand : 1;
|
||||
|
@ -150,7 +150,7 @@ public:
|
|||
}
|
||||
|
||||
const CommandInfo *getTypoCorrectCommandInfo(StringRef Typo) const;
|
||||
|
||||
|
||||
const CommandInfo *getCommandInfo(unsigned CommandID) const;
|
||||
|
||||
const CommandInfo *registerUnknownCommand(StringRef CommandName);
|
||||
|
|
|
@ -76,7 +76,7 @@ class Token {
|
|||
/// unused (command spelling can be found with CommandTraits). Otherwise,
|
||||
/// contains the length of the string that starts at TextPtr.
|
||||
unsigned IntVal;
|
||||
|
||||
|
||||
public:
|
||||
SourceLocation getLocation() const LLVM_READONLY { return Loc; }
|
||||
void setLocation(SourceLocation SL) { Loc = SL; }
|
||||
|
@ -228,7 +228,7 @@ private:
|
|||
llvm::BumpPtrAllocator &Allocator;
|
||||
|
||||
DiagnosticsEngine &Diags;
|
||||
|
||||
|
||||
const CommandTraits &Traits;
|
||||
|
||||
const char *const BufferStart;
|
||||
|
|
|
@ -191,11 +191,11 @@ public:
|
|||
void checkBlockCommandDuplicate(const BlockCommandComment *Command);
|
||||
|
||||
void checkDeprecatedCommand(const BlockCommandComment *Comment);
|
||||
|
||||
|
||||
void checkFunctionDeclVerbatimLine(const BlockCommandComment *Comment);
|
||||
|
||||
|
||||
void checkContainerDeclVerbatimLine(const BlockCommandComment *Comment);
|
||||
|
||||
|
||||
void checkContainerDecl(const BlockCommandComment *Comment);
|
||||
|
||||
/// Resolve parameter names to parameter indexes in function declaration.
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
|
||||
/// Return the TypeLoc wrapper for the type source info.
|
||||
TypeLoc getTypeLoc() const; // implemented in TypeLoc.h
|
||||
|
||||
|
||||
/// Override the type stored in this TypeSourceInfo. Use with caution!
|
||||
void overrideType(QualType T) { Ty = T; }
|
||||
};
|
||||
|
@ -488,7 +488,7 @@ public:
|
|||
SourceLocation IdentL, IdentifierInfo *II,
|
||||
SourceLocation GnuLabelL);
|
||||
static LabelDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
LabelStmt *getStmt() const { return TheStmt; }
|
||||
void setStmt(LabelStmt *T) { TheStmt = T; }
|
||||
|
||||
|
@ -511,8 +511,8 @@ public:
|
|||
};
|
||||
|
||||
/// Represent a C++ namespace.
|
||||
class NamespaceDecl : public NamedDecl, public DeclContext,
|
||||
public Redeclarable<NamespaceDecl>
|
||||
class NamespaceDecl : public NamedDecl, public DeclContext,
|
||||
public Redeclarable<NamespaceDecl>
|
||||
{
|
||||
/// The starting location of the source range, pointing
|
||||
/// to either the namespace or the inline keyword.
|
||||
|
@ -523,7 +523,7 @@ class NamespaceDecl : public NamedDecl, public DeclContext,
|
|||
|
||||
/// A pointer to either the anonymous namespace that lives just inside
|
||||
/// this namespace or to the first namespace in the chain (the latter case
|
||||
/// only when this is not the first in the chain), along with a
|
||||
/// only when this is not the first in the chain), along with a
|
||||
/// boolean value indicating whether this is an inline namespace.
|
||||
llvm::PointerIntPair<NamespaceDecl *, 1, bool> AnonOrFirstNamespaceAndInline;
|
||||
|
||||
|
@ -1931,7 +1931,7 @@ public:
|
|||
bool isConstexprSpecified = false);
|
||||
|
||||
static FunctionDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
DeclarationNameInfo getNameInfo() const {
|
||||
return DeclarationNameInfo(getDeclName(), getLocation(), DNLoc);
|
||||
}
|
||||
|
@ -2598,7 +2598,7 @@ public:
|
|||
InClassInitStyle InitStyle);
|
||||
|
||||
static FieldDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
/// Returns the index of this field within its record,
|
||||
/// as appropriate for passing to ASTRecordLayout::getFieldOffset.
|
||||
unsigned getFieldIndex() const;
|
||||
|
@ -2754,7 +2754,7 @@ public:
|
|||
QualType T, Expr *E,
|
||||
const llvm::APSInt &V);
|
||||
static EnumConstantDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
const Expr *getInitExpr() const { return (const Expr*) Init; }
|
||||
Expr *getInitExpr() { return (Expr*) Init; }
|
||||
const llvm::APSInt &getInitVal() const { return Val; }
|
||||
|
@ -3812,7 +3812,7 @@ public:
|
|||
|
||||
/// Finds the first data member which has a name.
|
||||
/// nullptr is returned if no named data member exists.
|
||||
const FieldDecl *findFirstNamedDataMember() const;
|
||||
const FieldDecl *findFirstNamedDataMember() const;
|
||||
|
||||
private:
|
||||
/// Deserialize just the fields.
|
||||
|
@ -3835,7 +3835,7 @@ public:
|
|||
SourceLocation RParenLoc);
|
||||
|
||||
static FileScopeAsmDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
SourceLocation getAsmLoc() const { return getLocation(); }
|
||||
SourceLocation getRParenLoc() const { return RParenLoc; }
|
||||
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
|
||||
|
@ -3927,9 +3927,9 @@ protected:
|
|||
IsConversionFromLambda(false), DoesNotEscape(false) {}
|
||||
|
||||
public:
|
||||
static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L);
|
||||
static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L);
|
||||
static BlockDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
SourceLocation getCaretLocation() const { return getLocation(); }
|
||||
|
||||
bool isVariadic() const { return IsVariadic; }
|
||||
|
@ -4009,7 +4009,7 @@ public:
|
|||
}
|
||||
|
||||
Decl *getBlockManglingContextDecl() const {
|
||||
return ManglingContextDecl;
|
||||
return ManglingContextDecl;
|
||||
}
|
||||
|
||||
void setBlockMangling(unsigned Number, Decl *Ctx) {
|
||||
|
@ -4145,16 +4145,16 @@ class ImportDecl final : public Decl,
|
|||
|
||||
/// The imported module, along with a bit that indicates whether
|
||||
/// we have source-location information for each identifier in the module
|
||||
/// name.
|
||||
/// name.
|
||||
///
|
||||
/// When the bit is false, we only have a single source location for the
|
||||
/// end of the import declaration.
|
||||
llvm::PointerIntPair<Module *, 1, bool> ImportedAndComplete;
|
||||
|
||||
|
||||
/// The next import in the list of imports local to the translation
|
||||
/// unit being parsed (not loaded from an AST file).
|
||||
ImportDecl *NextLocalImport = nullptr;
|
||||
|
||||
|
||||
ImportDecl(DeclContext *DC, SourceLocation StartLoc, Module *Imported,
|
||||
ArrayRef<SourceLocation> IdentifierLocs);
|
||||
|
||||
|
@ -4162,26 +4162,26 @@ class ImportDecl final : public Decl,
|
|||
SourceLocation EndLoc);
|
||||
|
||||
ImportDecl(EmptyShell Empty) : Decl(Import, Empty) {}
|
||||
|
||||
|
||||
public:
|
||||
/// Create a new module import declaration.
|
||||
static ImportDecl *Create(ASTContext &C, DeclContext *DC,
|
||||
static ImportDecl *Create(ASTContext &C, DeclContext *DC,
|
||||
SourceLocation StartLoc, Module *Imported,
|
||||
ArrayRef<SourceLocation> IdentifierLocs);
|
||||
|
||||
|
||||
/// Create a new module import declaration for an implicitly-generated
|
||||
/// import.
|
||||
static ImportDecl *CreateImplicit(ASTContext &C, DeclContext *DC,
|
||||
SourceLocation StartLoc, Module *Imported,
|
||||
static ImportDecl *CreateImplicit(ASTContext &C, DeclContext *DC,
|
||||
SourceLocation StartLoc, Module *Imported,
|
||||
SourceLocation EndLoc);
|
||||
|
||||
|
||||
/// Create a new, deserialized module import declaration.
|
||||
static ImportDecl *CreateDeserialized(ASTContext &C, unsigned ID,
|
||||
static ImportDecl *CreateDeserialized(ASTContext &C, unsigned ID,
|
||||
unsigned NumLocations);
|
||||
|
||||
|
||||
/// Retrieve the module that was imported by the import declaration.
|
||||
Module *getImportedModule() const { return ImportedAndComplete.getPointer(); }
|
||||
|
||||
|
||||
/// Retrieves the locations of each of the identifiers that make up
|
||||
/// the complete module name in the import declaration.
|
||||
///
|
||||
|
@ -4218,7 +4218,7 @@ public:
|
|||
static ExportDecl *Create(ASTContext &C, DeclContext *DC,
|
||||
SourceLocation ExportLoc);
|
||||
static ExportDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
SourceLocation getExportLoc() const { return getLocation(); }
|
||||
SourceLocation getRBraceLoc() const { return RBraceLoc; }
|
||||
void setRBraceLoc(SourceLocation L) { RBraceLoc = L; }
|
||||
|
|
|
@ -302,7 +302,7 @@ private:
|
|||
/// global variable, etc.) that is lexically inside an objc container
|
||||
/// definition.
|
||||
unsigned TopLevelDeclInObjCContainer : 1;
|
||||
|
||||
|
||||
/// Whether statistic collection is enabled.
|
||||
static bool StatisticsEnabled;
|
||||
|
||||
|
@ -629,7 +629,7 @@ protected:
|
|||
assert(isFromASTFile() && "Only works on a deserialized declaration");
|
||||
*((unsigned*)this - 2) = ID;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
/// Determine the availability of the given declaration.
|
||||
///
|
||||
|
@ -879,7 +879,7 @@ public:
|
|||
|
||||
/// Whether this particular Decl is a canonical one.
|
||||
bool isCanonicalDecl() const { return getCanonicalDecl() == this; }
|
||||
|
||||
|
||||
protected:
|
||||
/// Returns the next redeclaration or itself if this is the only decl.
|
||||
///
|
||||
|
@ -956,10 +956,10 @@ public:
|
|||
/// Retrieve the previous declaration that declares the same entity
|
||||
/// as this declaration, or NULL if there is no previous declaration.
|
||||
Decl *getPreviousDecl() { return getPreviousDeclImpl(); }
|
||||
|
||||
|
||||
/// Retrieve the most recent declaration that declares the same entity
|
||||
/// as this declaration, or NULL if there is no previous declaration.
|
||||
const Decl *getPreviousDecl() const {
|
||||
const Decl *getPreviousDecl() const {
|
||||
return const_cast<Decl *>(this)->getPreviousDeclImpl();
|
||||
}
|
||||
|
||||
|
@ -974,7 +974,7 @@ public:
|
|||
|
||||
/// Retrieve the most recent declaration that declares the same entity
|
||||
/// as this declaration (which may be this declaration).
|
||||
const Decl *getMostRecentDecl() const {
|
||||
const Decl *getMostRecentDecl() const {
|
||||
return const_cast<Decl *>(this)->getMostRecentDeclImpl();
|
||||
}
|
||||
|
||||
|
@ -1159,13 +1159,13 @@ protected:
|
|||
inline bool declaresSameEntity(const Decl *D1, const Decl *D2) {
|
||||
if (!D1 || !D2)
|
||||
return false;
|
||||
|
||||
|
||||
if (D1 == D2)
|
||||
return true;
|
||||
|
||||
|
||||
return D1->getCanonicalDecl() == D2->getCanonicalDecl();
|
||||
}
|
||||
|
||||
|
||||
/// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when
|
||||
/// doing something to a specific decl.
|
||||
class PrettyStackTraceDecl : public llvm::PrettyStackTraceEntry {
|
||||
|
@ -1517,7 +1517,7 @@ public:
|
|||
/// connected to this declaration context.
|
||||
///
|
||||
/// For declaration contexts that have multiple semantically connected but
|
||||
/// syntactically distinct contexts, such as C++ namespaces, this routine
|
||||
/// syntactically distinct contexts, such as C++ namespaces, this routine
|
||||
/// retrieves the complete set of such declaration contexts in source order.
|
||||
/// For example, given:
|
||||
///
|
||||
|
@ -1921,7 +1921,7 @@ public:
|
|||
/// Determine whether the given declaration is stored in the list of
|
||||
/// declarations lexically within this context.
|
||||
bool isDeclInLexicalTraversal(const Decl *D) const {
|
||||
return D && (D->NextInContextAndBits.getPointer() || D == FirstDecl ||
|
||||
return D && (D->NextInContextAndBits.getPointer() || D == FirstDecl ||
|
||||
D == LastDecl);
|
||||
}
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ public:
|
|||
return EllipsisLoc;
|
||||
}
|
||||
|
||||
/// Returns the access specifier for this base specifier.
|
||||
/// Returns the access specifier for this base specifier.
|
||||
///
|
||||
/// This is the actual base specifier as used for semantic analysis, so
|
||||
/// the result can never be AS_none. To retrieve the access specifier as
|
||||
|
@ -564,7 +564,7 @@ class CXXRecordDecl : public RecordDecl {
|
|||
CXXRecordDecl *Definition;
|
||||
|
||||
/// The first friend declaration in this class, or null if there
|
||||
/// aren't any.
|
||||
/// aren't any.
|
||||
///
|
||||
/// This is actually currently stored in reverse order.
|
||||
LazyDeclPtr FirstFriend;
|
||||
|
@ -606,14 +606,14 @@ class CXXRecordDecl : public RecordDecl {
|
|||
|
||||
/// Whether this lambda is known to be dependent, even if its
|
||||
/// context isn't dependent.
|
||||
///
|
||||
///
|
||||
/// A lambda with a non-dependent context can be dependent if it occurs
|
||||
/// within the default argument of a function template, because the
|
||||
/// lambda will have been created with the enclosing context as its
|
||||
/// declaration context, rather than function. This is an unfortunate
|
||||
/// artifact of having to parse the default arguments before.
|
||||
/// artifact of having to parse the default arguments before.
|
||||
unsigned Dependent : 1;
|
||||
|
||||
|
||||
/// Whether this lambda is a generic lambda.
|
||||
unsigned IsGenericLambda : 1;
|
||||
|
||||
|
@ -626,28 +626,28 @@ class CXXRecordDecl : public RecordDecl {
|
|||
/// The number of explicit captures in this lambda.
|
||||
unsigned NumExplicitCaptures : 13;
|
||||
|
||||
/// The number used to indicate this lambda expression for name
|
||||
/// The number used to indicate this lambda expression for name
|
||||
/// mangling in the Itanium C++ ABI.
|
||||
unsigned ManglingNumber = 0;
|
||||
|
||||
|
||||
/// The declaration that provides context for this lambda, if the
|
||||
/// actual DeclContext does not suffice. This is used for lambdas that
|
||||
/// occur within default arguments of function parameters within the class
|
||||
/// or within a data member initializer.
|
||||
LazyDeclPtr ContextDecl;
|
||||
|
||||
/// The list of captures, both explicit and implicit, for this
|
||||
|
||||
/// The list of captures, both explicit and implicit, for this
|
||||
/// lambda.
|
||||
Capture *Captures = nullptr;
|
||||
|
||||
/// The type of the call method.
|
||||
TypeSourceInfo *MethodTyInfo;
|
||||
|
||||
LambdaDefinitionData(CXXRecordDecl *D, TypeSourceInfo *Info,
|
||||
bool Dependent, bool IsGeneric,
|
||||
LambdaCaptureDefault CaptureDefault)
|
||||
: DefinitionData(D), Dependent(Dependent), IsGenericLambda(IsGeneric),
|
||||
CaptureDefault(CaptureDefault), NumCaptures(0), NumExplicitCaptures(0),
|
||||
LambdaDefinitionData(CXXRecordDecl *D, TypeSourceInfo *Info,
|
||||
bool Dependent, bool IsGeneric,
|
||||
LambdaCaptureDefault CaptureDefault)
|
||||
: DefinitionData(D), Dependent(Dependent), IsGenericLambda(IsGeneric),
|
||||
CaptureDefault(CaptureDefault), NumCaptures(0), NumExplicitCaptures(0),
|
||||
MethodTyInfo(Info) {
|
||||
IsLambda = true;
|
||||
|
||||
|
@ -1205,22 +1205,22 @@ public:
|
|||
return DD && DD->IsLambda;
|
||||
}
|
||||
|
||||
/// Determine whether this class describes a generic
|
||||
/// Determine whether this class describes a generic
|
||||
/// lambda function object (i.e. function call operator is
|
||||
/// a template).
|
||||
bool isGenericLambda() const;
|
||||
/// a template).
|
||||
bool isGenericLambda() const;
|
||||
|
||||
/// Retrieve the lambda call operator of the closure type
|
||||
/// if this is a closure type.
|
||||
CXXMethodDecl *getLambdaCallOperator() const;
|
||||
CXXMethodDecl *getLambdaCallOperator() const;
|
||||
|
||||
/// Retrieve the lambda static invoker, the address of which
|
||||
/// is returned by the conversion operator, and the body of which
|
||||
/// is forwarded to the lambda call operator.
|
||||
CXXMethodDecl *getLambdaStaticInvoker() const;
|
||||
/// is forwarded to the lambda call operator.
|
||||
CXXMethodDecl *getLambdaStaticInvoker() const;
|
||||
|
||||
/// Retrieve the generic lambda's template parameter list.
|
||||
/// Returns null if the class does not represent a lambda or a generic
|
||||
/// Returns null if the class does not represent a lambda or a generic
|
||||
/// lambda.
|
||||
TemplateParameterList *getGenericLambdaTemplateParameterList() const;
|
||||
|
||||
|
@ -1345,11 +1345,11 @@ public:
|
|||
/// not overridden.
|
||||
bool isAbstract() const { return data().Abstract; }
|
||||
|
||||
/// Determine whether this class is standard-layout per
|
||||
/// Determine whether this class is standard-layout per
|
||||
/// C++ [class]p7.
|
||||
bool isStandardLayout() const { return data().IsStandardLayout; }
|
||||
|
||||
/// Determine whether this class was standard-layout per
|
||||
/// Determine whether this class was standard-layout per
|
||||
/// C++11 [class]p7, specifically using the C++11 rules without any DRs.
|
||||
bool isCXX11StandardLayout() const { return data().IsCXX11StandardLayout; }
|
||||
|
||||
|
@ -1900,25 +1900,25 @@ public:
|
|||
/// If this is the closure type of a lambda expression, retrieve the
|
||||
/// number to be used for name mangling in the Itanium C++ ABI.
|
||||
///
|
||||
/// Zero indicates that this closure type has internal linkage, so the
|
||||
/// Zero indicates that this closure type has internal linkage, so the
|
||||
/// mangling number does not matter, while a non-zero value indicates which
|
||||
/// lambda expression this is in this particular context.
|
||||
unsigned getLambdaManglingNumber() const {
|
||||
assert(isLambda() && "Not a lambda closure type!");
|
||||
return getLambdaData().ManglingNumber;
|
||||
}
|
||||
|
||||
/// Retrieve the declaration that provides additional context for a
|
||||
|
||||
/// Retrieve the declaration that provides additional context for a
|
||||
/// lambda, when the normal declaration context is not specific enough.
|
||||
///
|
||||
/// Certain contexts (default arguments of in-class function parameters and
|
||||
/// Certain contexts (default arguments of in-class function parameters and
|
||||
/// the initializers of data members) have separate name mangling rules for
|
||||
/// lambdas within the Itanium C++ ABI. For these cases, this routine provides
|
||||
/// the declaration in which the lambda occurs, e.g., the function parameter
|
||||
/// the declaration in which the lambda occurs, e.g., the function parameter
|
||||
/// or the non-static data member. Otherwise, it returns NULL to imply that
|
||||
/// the declaration context suffices.
|
||||
Decl *getLambdaContextDecl() const;
|
||||
|
||||
|
||||
/// Set the mangling number and context declaration for a lambda
|
||||
/// class.
|
||||
void setLambdaMangling(unsigned ManglingNumber, Decl *ContextDecl) {
|
||||
|
@ -2799,7 +2799,7 @@ public:
|
|||
/// Determine whether this conversion function is a conversion from
|
||||
/// a lambda closure type to a block pointer.
|
||||
bool isLambdaToBlockPointerConversion() const;
|
||||
|
||||
|
||||
CXXConversionDecl *getCanonicalDecl() override {
|
||||
return cast<CXXConversionDecl>(FunctionDecl::getCanonicalDecl());
|
||||
}
|
||||
|
@ -2812,7 +2812,7 @@ public:
|
|||
static bool classofKind(Kind K) { return K == CXXConversion; }
|
||||
};
|
||||
|
||||
/// Represents a linkage specification.
|
||||
/// Represents a linkage specification.
|
||||
///
|
||||
/// For example:
|
||||
/// \code
|
||||
|
@ -2862,7 +2862,7 @@ public:
|
|||
SourceLocation LangLoc, LanguageIDs Lang,
|
||||
bool HasBraces);
|
||||
static LinkageSpecDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
/// Return the language specified by this linkage specification.
|
||||
LanguageIDs getLanguage() const { return LanguageIDs(Language); }
|
||||
|
||||
|
@ -3770,7 +3770,7 @@ public:
|
|||
Expr *AssertExpr, StringLiteral *Message,
|
||||
SourceLocation RParenLoc, bool Failed);
|
||||
static StaticAssertDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
Expr *getAssertExpr() { return AssertExprAndFailed.getPointer(); }
|
||||
const Expr *getAssertExpr() const { return AssertExprAndFailed.getPointer(); }
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ inline void CXXRecordDecl::pushFriendDecl(FriendDecl *FD) {
|
|||
FD->NextFriend = data().FirstFriend;
|
||||
data().FirstFriend = FD;
|
||||
}
|
||||
|
||||
|
||||
} // namespace clang
|
||||
|
||||
#endif // LLVM_CLANG_AST_DECLFRIEND_H
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
++It;
|
||||
} while (It != End &&
|
||||
It->first == DeclarationName::getUsingDirectiveName());
|
||||
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ class ObjCTypeParamDecl : public TypedefNameDecl {
|
|||
/// explicitly specified.
|
||||
SourceLocation ColonLoc;
|
||||
|
||||
ObjCTypeParamDecl(ASTContext &ctx, DeclContext *dc,
|
||||
ObjCTypeParamDecl(ASTContext &ctx, DeclContext *dc,
|
||||
ObjCTypeParamVariance variance, SourceLocation varianceLoc,
|
||||
unsigned index,
|
||||
SourceLocation nameLoc, IdentifierInfo *name,
|
||||
|
@ -659,7 +659,7 @@ class ObjCTypeParamList final
|
|||
unsigned End;
|
||||
};
|
||||
|
||||
union {
|
||||
union {
|
||||
/// Location of the left and right angle brackets.
|
||||
PODSourceRange Brackets;
|
||||
|
||||
|
@ -1123,7 +1123,7 @@ public:
|
|||
ObjCPropertyDecl *>;
|
||||
using ProtocolPropertySet = llvm::SmallDenseSet<const ObjCProtocolDecl *, 8>;
|
||||
using PropertyDeclOrder = llvm::SmallVector<ObjCPropertyDecl *, 8>;
|
||||
|
||||
|
||||
/// This routine collects list of properties to be implemented in the class.
|
||||
/// This includes, class's and its conforming protocols' properties.
|
||||
/// Note, the superclass's properties are not included in the list.
|
||||
|
@ -1195,15 +1195,15 @@ class ObjCInterfaceDecl : public ObjCContainerDecl
|
|||
/// TypeForDecl - This indicates the Type object that represents this
|
||||
/// TypeDecl. It is a cache maintained by ASTContext::getObjCInterfaceType
|
||||
mutable const Type *TypeForDecl = nullptr;
|
||||
|
||||
|
||||
struct DefinitionData {
|
||||
/// The definition of this class, for quick access from any
|
||||
/// The definition of this class, for quick access from any
|
||||
/// declaration.
|
||||
ObjCInterfaceDecl *Definition = nullptr;
|
||||
|
||||
|
||||
/// When non-null, this is always an ObjCObjectType.
|
||||
TypeSourceInfo *SuperClassTInfo = nullptr;
|
||||
|
||||
|
||||
/// Protocols referenced in the \@interface declaration
|
||||
ObjCProtocolList ReferencedProtocols;
|
||||
|
||||
|
@ -1247,11 +1247,11 @@ class ObjCInterfaceDecl : public ObjCContainerDecl
|
|||
|
||||
/// One of the \c InheritedDesignatedInitializersState enumeratos.
|
||||
mutable unsigned InheritedDesignatedInitializers : 2;
|
||||
|
||||
|
||||
/// The location of the last location in this declaration, before
|
||||
/// the properties/methods. For example, this will be the '>', '}', or
|
||||
/// identifier,
|
||||
SourceLocation EndLoc;
|
||||
/// the properties/methods. For example, this will be the '>', '}', or
|
||||
/// identifier,
|
||||
SourceLocation EndLoc;
|
||||
|
||||
DefinitionData()
|
||||
: ExternallyCompleted(false), IvarListMissingImplementation(true),
|
||||
|
@ -1285,7 +1285,7 @@ class ObjCInterfaceDecl : public ObjCContainerDecl
|
|||
|
||||
/// Allocate the definition data for this class.
|
||||
void allocateDefinitionData();
|
||||
|
||||
|
||||
using redeclarable_base = Redeclarable<ObjCInterfaceDecl>;
|
||||
|
||||
ObjCInterfaceDecl *getNextRedeclarationImpl() override {
|
||||
|
@ -1334,7 +1334,7 @@ public:
|
|||
SourceRange getSourceRange() const override LLVM_READONLY {
|
||||
if (isThisDeclarationADefinition())
|
||||
return ObjCContainerDecl::getSourceRange();
|
||||
|
||||
|
||||
return SourceRange(getAtStartLoc(), getLocation());
|
||||
}
|
||||
|
||||
|
@ -1390,7 +1390,7 @@ public:
|
|||
// FIXME: Should make sure no callers ever do this.
|
||||
if (!hasDefinition())
|
||||
return protocol_iterator();
|
||||
|
||||
|
||||
if (data().ExternallyCompleted)
|
||||
LoadExternalDefinition();
|
||||
|
||||
|
@ -1453,7 +1453,7 @@ public:
|
|||
if (data().ExternallyCompleted)
|
||||
LoadExternalDefinition();
|
||||
|
||||
return data().AllReferencedProtocols.empty()
|
||||
return data().AllReferencedProtocols.empty()
|
||||
? protocol_begin()
|
||||
: data().AllReferencedProtocols.begin();
|
||||
}
|
||||
|
@ -1462,11 +1462,11 @@ public:
|
|||
// FIXME: Should make sure no callers ever do this.
|
||||
if (!hasDefinition())
|
||||
return all_protocol_iterator();
|
||||
|
||||
|
||||
if (data().ExternallyCompleted)
|
||||
LoadExternalDefinition();
|
||||
|
||||
return data().AllReferencedProtocols.empty()
|
||||
return data().AllReferencedProtocols.empty()
|
||||
? protocol_end()
|
||||
: data().AllReferencedProtocols.end();
|
||||
}
|
||||
|
@ -1476,17 +1476,17 @@ public:
|
|||
|
||||
ivar_range ivars() const { return ivar_range(ivar_begin(), ivar_end()); }
|
||||
|
||||
ivar_iterator ivar_begin() const {
|
||||
ivar_iterator ivar_begin() const {
|
||||
if (const ObjCInterfaceDecl *Def = getDefinition())
|
||||
return ivar_iterator(Def->decls_begin());
|
||||
|
||||
return ivar_iterator(Def->decls_begin());
|
||||
|
||||
// FIXME: Should make sure no callers ever do this.
|
||||
return ivar_iterator();
|
||||
}
|
||||
|
||||
ivar_iterator ivar_end() const {
|
||||
ivar_iterator ivar_end() const {
|
||||
if (const ObjCInterfaceDecl *Def = getDefinition())
|
||||
return ivar_iterator(Def->decls_end());
|
||||
return ivar_iterator(Def->decls_end());
|
||||
|
||||
// FIXME: Should make sure no callers ever do this.
|
||||
return ivar_iterator();
|
||||
|
@ -1546,10 +1546,10 @@ public:
|
|||
|
||||
/// Determine whether this particular declaration of this class is
|
||||
/// actually also a definition.
|
||||
bool isThisDeclarationADefinition() const {
|
||||
bool isThisDeclarationADefinition() const {
|
||||
return getDefinition() == this;
|
||||
}
|
||||
|
||||
|
||||
/// Determine whether this class has been defined.
|
||||
bool hasDefinition() const {
|
||||
// If the name of this class is out-of-date, bring it up-to-date, which
|
||||
|
@ -1561,16 +1561,16 @@ public:
|
|||
|
||||
return Data.getPointer();
|
||||
}
|
||||
|
||||
/// Retrieve the definition of this class, or NULL if this class
|
||||
/// has been forward-declared (with \@class) but not yet defined (with
|
||||
|
||||
/// Retrieve the definition of this class, or NULL if this class
|
||||
/// has been forward-declared (with \@class) but not yet defined (with
|
||||
/// \@interface).
|
||||
ObjCInterfaceDecl *getDefinition() {
|
||||
return hasDefinition()? Data.getPointer()->Definition : nullptr;
|
||||
}
|
||||
|
||||
/// Retrieve the definition of this class, or NULL if this class
|
||||
/// has been forward-declared (with \@class) but not yet defined (with
|
||||
/// Retrieve the definition of this class, or NULL if this class
|
||||
/// has been forward-declared (with \@class) but not yet defined (with
|
||||
/// \@interface).
|
||||
const ObjCInterfaceDecl *getDefinition() const {
|
||||
return hasDefinition()? Data.getPointer()->Definition : nullptr;
|
||||
|
@ -1579,7 +1579,7 @@ public:
|
|||
/// Starts the definition of this Objective-C class, taking it from
|
||||
/// a forward declaration (\@class) to a definition (\@interface).
|
||||
void startDefinition();
|
||||
|
||||
|
||||
/// Retrieve the superclass type.
|
||||
const ObjCObjectType *getSuperClassType() const {
|
||||
if (TypeSourceInfo *TInfo = getSuperClassTInfo())
|
||||
|
@ -1593,7 +1593,7 @@ public:
|
|||
// FIXME: Should make sure no callers ever do this.
|
||||
if (!hasDefinition())
|
||||
return nullptr;
|
||||
|
||||
|
||||
if (data().ExternallyCompleted)
|
||||
LoadExternalDefinition();
|
||||
|
||||
|
@ -1604,7 +1604,7 @@ public:
|
|||
// does not include any type arguments that apply to the superclass.
|
||||
ObjCInterfaceDecl *getSuperClass() const;
|
||||
|
||||
void setSuperClass(TypeSourceInfo *superClass) {
|
||||
void setSuperClass(TypeSourceInfo *superClass) {
|
||||
data().SuperClassTInfo = superClass;
|
||||
}
|
||||
|
||||
|
@ -1618,7 +1618,7 @@ public:
|
|||
ObjCCategoryDecl *Current = nullptr;
|
||||
|
||||
void findAcceptableCategory();
|
||||
|
||||
|
||||
public:
|
||||
using value_type = ObjCCategoryDecl *;
|
||||
using reference = value_type;
|
||||
|
@ -1659,7 +1659,7 @@ private:
|
|||
///
|
||||
/// Used in the \c visible_categories_iterator.
|
||||
static bool isVisibleCategory(ObjCCategoryDecl *Cat);
|
||||
|
||||
|
||||
public:
|
||||
/// Iterator that walks over the list of categories and extensions
|
||||
/// that are visible, i.e., not hidden in a non-imported submodule.
|
||||
|
@ -1765,7 +1765,7 @@ private:
|
|||
///
|
||||
/// Used in the \c known_extensions_iterator.
|
||||
static bool isKnownExtension(ObjCCategoryDecl *Cat);
|
||||
|
||||
|
||||
public:
|
||||
friend class ASTDeclReader;
|
||||
friend class ASTDeclWriter;
|
||||
|
@ -1787,7 +1787,7 @@ public:
|
|||
known_extensions_iterator known_extensions_begin() const {
|
||||
return known_extensions_iterator(getCategoryListRaw());
|
||||
}
|
||||
|
||||
|
||||
/// Retrieve an iterator to the end of the known-extensions list.
|
||||
known_extensions_iterator known_extensions_end() const {
|
||||
return known_extensions_iterator();
|
||||
|
@ -1804,7 +1804,7 @@ public:
|
|||
// FIXME: Should make sure no callers ever do this.
|
||||
if (!hasDefinition())
|
||||
return nullptr;
|
||||
|
||||
|
||||
if (data().ExternallyCompleted)
|
||||
LoadExternalDefinition();
|
||||
|
||||
|
@ -1831,7 +1831,7 @@ public:
|
|||
while (I != nullptr) {
|
||||
if (declaresSameEntity(this, I))
|
||||
return true;
|
||||
|
||||
|
||||
I = I->getSuperClass();
|
||||
}
|
||||
return false;
|
||||
|
@ -1841,7 +1841,7 @@ public:
|
|||
/// to be incompatible with __weak references. Returns true if it is.
|
||||
bool isArcWeakrefUnavailable() const;
|
||||
|
||||
/// isObjCRequiresPropertyDefs - Checks that a class or one of its super
|
||||
/// isObjCRequiresPropertyDefs - Checks that a class or one of its super
|
||||
/// classes must not be auto-synthesized. Returns class decl. if it must not
|
||||
/// be; 0, otherwise.
|
||||
const ObjCInterfaceDecl *isObjCRequiresPropertyDefs() const;
|
||||
|
@ -1854,7 +1854,7 @@ public:
|
|||
}
|
||||
|
||||
ObjCProtocolDecl *lookupNestedProtocol(IdentifierInfo *Name);
|
||||
|
||||
|
||||
// Lookup a method. First, we search locally. If a method isn't
|
||||
// found, we search referenced protocols and class categories.
|
||||
ObjCMethodDecl *lookupMethod(Selector Sel, bool isInstance,
|
||||
|
@ -1893,14 +1893,14 @@ public:
|
|||
true /* followsSuper */,
|
||||
Cat);
|
||||
}
|
||||
|
||||
SourceLocation getEndOfDefinitionLoc() const {
|
||||
|
||||
SourceLocation getEndOfDefinitionLoc() const {
|
||||
if (!hasDefinition())
|
||||
return getLocation();
|
||||
|
||||
return data().EndLoc;
|
||||
|
||||
return data().EndLoc;
|
||||
}
|
||||
|
||||
|
||||
void setEndOfDefinitionLoc(SourceLocation LE) { data().EndLoc = LE; }
|
||||
|
||||
/// Retrieve the starting location of the superclass.
|
||||
|
@ -1909,7 +1909,7 @@ public:
|
|||
/// isImplicitInterfaceDecl - check that this is an implicitly declared
|
||||
/// ObjCInterfaceDecl node. This is for legacy objective-c \@implementation
|
||||
/// declaration without an \@interface declaration.
|
||||
bool isImplicitInterfaceDecl() const {
|
||||
bool isImplicitInterfaceDecl() const {
|
||||
return hasDefinition() ? data().Definition->isImplicit() : isImplicit();
|
||||
}
|
||||
|
||||
|
@ -1987,7 +1987,7 @@ public:
|
|||
bool synthesized=false);
|
||||
|
||||
static ObjCIvarDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
/// Return the class interface that this ivar is logically contained
|
||||
/// in; this is either the interface where the ivar was declared, or the
|
||||
/// interface the ivar is conceptually a part of in the case of synthesized
|
||||
|
@ -2045,7 +2045,7 @@ public:
|
|||
QualType T, Expr *BW);
|
||||
|
||||
static ObjCAtDefsFieldDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
||||
// Implement isa/cast/dyncast/etc.
|
||||
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
|
||||
static bool classofKind(Kind K) { return K == ObjCAtDefsField; }
|
||||
|
@ -2087,7 +2087,7 @@ class ObjCProtocolDecl : public ObjCContainerDecl,
|
|||
ObjCProtocolDecl *Definition;
|
||||
|
||||
/// Referenced protocols
|
||||
ObjCProtocolList ReferencedProtocols;
|
||||
ObjCProtocolList ReferencedProtocols;
|
||||
};
|
||||
|
||||
/// Contains a pointer to the data associated with this class,
|
||||
|
@ -2107,7 +2107,7 @@ class ObjCProtocolDecl : public ObjCContainerDecl,
|
|||
assert(Data.getPointer() && "Objective-C protocol has no definition!");
|
||||
return *Data.getPointer();
|
||||
}
|
||||
|
||||
|
||||
void allocateDefinitionData();
|
||||
|
||||
using redeclarable_base = Redeclarable<ObjCProtocolDecl>;
|
||||
|
@ -2152,15 +2152,15 @@ public:
|
|||
protocol_iterator protocol_begin() const {
|
||||
if (!hasDefinition())
|
||||
return protocol_iterator();
|
||||
|
||||
|
||||
return data().ReferencedProtocols.begin();
|
||||
}
|
||||
|
||||
protocol_iterator protocol_end() const {
|
||||
protocol_iterator protocol_end() const {
|
||||
if (!hasDefinition())
|
||||
return protocol_iterator();
|
||||
|
||||
return data().ReferencedProtocols.end();
|
||||
|
||||
return data().ReferencedProtocols.end();
|
||||
}
|
||||
|
||||
using protocol_loc_iterator = ObjCProtocolList::loc_iterator;
|
||||
|
@ -2173,22 +2173,22 @@ public:
|
|||
protocol_loc_iterator protocol_loc_begin() const {
|
||||
if (!hasDefinition())
|
||||
return protocol_loc_iterator();
|
||||
|
||||
|
||||
return data().ReferencedProtocols.loc_begin();
|
||||
}
|
||||
|
||||
protocol_loc_iterator protocol_loc_end() const {
|
||||
if (!hasDefinition())
|
||||
return protocol_loc_iterator();
|
||||
|
||||
|
||||
return data().ReferencedProtocols.loc_end();
|
||||
}
|
||||
|
||||
unsigned protocol_size() const {
|
||||
unsigned protocol_size() const {
|
||||
if (!hasDefinition())
|
||||
return 0;
|
||||
|
||||
return data().ReferencedProtocols.size();
|
||||
|
||||
return data().ReferencedProtocols.size();
|
||||
}
|
||||
|
||||
/// setProtocolList - Set the list of protocols that this interface
|
||||
|
@ -2235,12 +2235,12 @@ public:
|
|||
return hasDefinition()? Data.getPointer()->Definition : nullptr;
|
||||
}
|
||||
|
||||
/// Determine whether this particular declaration is also the
|
||||
/// Determine whether this particular declaration is also the
|
||||
/// definition.
|
||||
bool isThisDeclarationADefinition() const {
|
||||
return getDefinition() == this;
|
||||
}
|
||||
|
||||
|
||||
/// Starts the definition of this Objective-C protocol.
|
||||
void startDefinition();
|
||||
|
||||
|
@ -2251,10 +2251,10 @@ public:
|
|||
SourceRange getSourceRange() const override LLVM_READONLY {
|
||||
if (isThisDeclarationADefinition())
|
||||
return ObjCContainerDecl::getSourceRange();
|
||||
|
||||
|
||||
return SourceRange(getAtStartLoc(), getLocation());
|
||||
}
|
||||
|
||||
|
||||
using redecl_range = redeclarable_base::redecl_range;
|
||||
using redecl_iterator = redeclarable_base::redecl_iterator;
|
||||
|
||||
|
@ -2316,7 +2316,7 @@ class ObjCCategoryDecl : public ObjCContainerDecl {
|
|||
/// class extension may have private ivars.
|
||||
SourceLocation IvarLBraceLoc;
|
||||
SourceLocation IvarRBraceLoc;
|
||||
|
||||
|
||||
ObjCCategoryDecl(DeclContext *DC, SourceLocation AtLoc,
|
||||
SourceLocation ClassNameLoc, SourceLocation CategoryNameLoc,
|
||||
IdentifierInfo *Id, ObjCInterfaceDecl *IDecl,
|
||||
|
@ -2431,7 +2431,7 @@ public:
|
|||
|
||||
SourceLocation getCategoryNameLoc() const { return CategoryNameLoc; }
|
||||
void setCategoryNameLoc(SourceLocation Loc) { CategoryNameLoc = Loc; }
|
||||
|
||||
|
||||
void setIvarLBraceLoc(SourceLocation Loc) { IvarLBraceLoc = Loc; }
|
||||
SourceLocation getIvarLBraceLoc() const { return IvarLBraceLoc; }
|
||||
void setIvarRBraceLoc(SourceLocation Loc) { IvarRBraceLoc = Loc; }
|
||||
|
@ -2576,7 +2576,7 @@ class ObjCImplementationDecl : public ObjCImplDecl {
|
|||
/// \@implementation may have private ivars.
|
||||
SourceLocation IvarLBraceLoc;
|
||||
SourceLocation IvarRBraceLoc;
|
||||
|
||||
|
||||
/// Support for ivar initialization.
|
||||
/// The arguments used to initialize the ivars
|
||||
LazyCXXCtorInitializersPtr IvarInitializers;
|
||||
|
@ -2594,7 +2594,7 @@ class ObjCImplementationDecl : public ObjCImplDecl {
|
|||
ObjCInterfaceDecl *superDecl,
|
||||
SourceLocation nameLoc, SourceLocation atStartLoc,
|
||||
SourceLocation superLoc = SourceLocation(),
|
||||
SourceLocation IvarLBraceLoc=SourceLocation(),
|
||||
SourceLocation IvarLBraceLoc=SourceLocation(),
|
||||
SourceLocation IvarRBraceLoc=SourceLocation())
|
||||
: ObjCImplDecl(ObjCImplementation, DC, classInterface,
|
||||
classInterface ? classInterface->getIdentifier()
|
||||
|
@ -2616,7 +2616,7 @@ public:
|
|||
SourceLocation nameLoc,
|
||||
SourceLocation atStartLoc,
|
||||
SourceLocation superLoc = SourceLocation(),
|
||||
SourceLocation IvarLBraceLoc=SourceLocation(),
|
||||
SourceLocation IvarLBraceLoc=SourceLocation(),
|
||||
SourceLocation IvarRBraceLoc=SourceLocation());
|
||||
|
||||
static ObjCImplementationDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
@ -2700,7 +2700,7 @@ public:
|
|||
std::string getNameAsString() const {
|
||||
return getName();
|
||||
}
|
||||
|
||||
|
||||
/// Produce a name to be used for class's metadata. It comes either via
|
||||
/// class's objc_runtime_name attribute or class name.
|
||||
StringRef getObjCRuntimeNameAsString() const;
|
||||
|
@ -2715,7 +2715,7 @@ public:
|
|||
SourceLocation getIvarLBraceLoc() const { return IvarLBraceLoc; }
|
||||
void setIvarRBraceLoc(SourceLocation Loc) { IvarRBraceLoc = Loc; }
|
||||
SourceLocation getIvarRBraceLoc() const { return IvarRBraceLoc; }
|
||||
|
||||
|
||||
using ivar_iterator = specific_decl_iterator<ObjCIvarDecl>;
|
||||
using ivar_range = llvm::iterator_range<specific_decl_iterator<ObjCIvarDecl>>;
|
||||
|
||||
|
@ -2760,9 +2760,9 @@ public:
|
|||
SourceLocation L, IdentifierInfo *Id,
|
||||
ObjCInterfaceDecl* aliasedClass);
|
||||
|
||||
static ObjCCompatibleAliasDecl *CreateDeserialized(ASTContext &C,
|
||||
static ObjCCompatibleAliasDecl *CreateDeserialized(ASTContext &C,
|
||||
unsigned ID);
|
||||
|
||||
|
||||
const ObjCInterfaceDecl *getClassInterface() const { return AliasedClass; }
|
||||
ObjCInterfaceDecl *getClassInterface() { return AliasedClass; }
|
||||
void setClassInterface(ObjCInterfaceDecl *D) { AliasedClass = D; }
|
||||
|
|
|
@ -734,8 +734,8 @@ public:
|
|||
};
|
||||
|
||||
/// Declaration of a redeclarable template.
|
||||
class RedeclarableTemplateDecl : public TemplateDecl,
|
||||
public Redeclarable<RedeclarableTemplateDecl>
|
||||
class RedeclarableTemplateDecl : public TemplateDecl,
|
||||
public Redeclarable<RedeclarableTemplateDecl>
|
||||
{
|
||||
using redeclarable_base = Redeclarable<RedeclarableTemplateDecl>;
|
||||
|
||||
|
@ -823,7 +823,7 @@ protected:
|
|||
/// Pointer to the common data shared by all declarations of this
|
||||
/// template.
|
||||
mutable CommonBase *Common = nullptr;
|
||||
|
||||
|
||||
/// Retrieves the "common" pointer shared by all (re-)declarations of
|
||||
/// the same template. Calling this routine may implicitly allocate memory
|
||||
/// for the common pointer.
|
||||
|
@ -888,10 +888,10 @@ public:
|
|||
}
|
||||
|
||||
/// Retrieve the member template from which this template was
|
||||
/// instantiated, or nullptr if this template was not instantiated from a
|
||||
/// instantiated, or nullptr if this template was not instantiated from a
|
||||
/// member template.
|
||||
///
|
||||
/// A template is instantiated from a member template when the member
|
||||
/// A template is instantiated from a member template when the member
|
||||
/// template itself is part of a class template (or member thereof). For
|
||||
/// example, given
|
||||
///
|
||||
|
@ -1178,7 +1178,7 @@ public:
|
|||
unsigned D, unsigned P,
|
||||
IdentifierInfo *Id, bool Typename,
|
||||
bool ParameterPack);
|
||||
static TemplateTypeParmDecl *CreateDeserialized(const ASTContext &C,
|
||||
static TemplateTypeParmDecl *CreateDeserialized(const ASTContext &C,
|
||||
unsigned ID);
|
||||
|
||||
/// Whether this template type parameter was declared with
|
||||
|
@ -1312,12 +1312,12 @@ public:
|
|||
QualType T, TypeSourceInfo *TInfo, ArrayRef<QualType> ExpandedTypes,
|
||||
ArrayRef<TypeSourceInfo *> ExpandedTInfos);
|
||||
|
||||
static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C,
|
||||
static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C,
|
||||
unsigned ID);
|
||||
static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C,
|
||||
static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C,
|
||||
unsigned ID,
|
||||
unsigned NumExpandedTypes);
|
||||
|
||||
|
||||
using TemplateParmPosition::getDepth;
|
||||
using TemplateParmPosition::setDepth;
|
||||
using TemplateParmPosition::getPosition;
|
||||
|
@ -1495,7 +1495,7 @@ public:
|
|||
static TemplateTemplateParmDecl *CreateDeserialized(ASTContext &C,
|
||||
unsigned ID,
|
||||
unsigned NumExpansions);
|
||||
|
||||
|
||||
using TemplateParmPosition::getDepth;
|
||||
using TemplateParmPosition::setDepth;
|
||||
using TemplateParmPosition::getPosition;
|
||||
|
@ -2442,7 +2442,7 @@ public:
|
|||
|
||||
static ClassScopeFunctionSpecializationDecl *
|
||||
CreateDeserialized(ASTContext &Context, unsigned ID);
|
||||
|
||||
|
||||
// Implement isa/cast/dyncast/etc.
|
||||
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
|
||||
|
||||
|
|
|
@ -211,14 +211,14 @@ public:
|
|||
/// getNameKind - Determine what kind of name this is.
|
||||
NameKind getNameKind() const;
|
||||
|
||||
/// Determines whether the name itself is dependent, e.g., because it
|
||||
/// Determines whether the name itself is dependent, e.g., because it
|
||||
/// involves a C++ type that is itself dependent.
|
||||
///
|
||||
/// Note that this does not capture all of the notions of "dependent name",
|
||||
/// because an identifier can be a dependent name if it is used as the
|
||||
/// because an identifier can be a dependent name if it is used as the
|
||||
/// callee in a call expression with dependent arguments.
|
||||
bool isDependentName() const;
|
||||
|
||||
|
||||
/// getNameAsString - Retrieve the human-readable string for this name.
|
||||
std::string getAsString() const;
|
||||
|
||||
|
@ -543,7 +543,7 @@ public:
|
|||
|
||||
/// Determine whether this name involves a template parameter.
|
||||
bool isInstantiationDependent() const;
|
||||
|
||||
|
||||
/// Determine whether this name contains an unexpanded
|
||||
/// parameter pack.
|
||||
bool containsUnexpandedParameterPack() const;
|
||||
|
|
|
@ -101,9 +101,9 @@ private:
|
|||
friend class DependentStoredDeclsMap;
|
||||
|
||||
DependentDiagnostic(const PartialDiagnostic &PDiag,
|
||||
PartialDiagnostic::Storage *Storage)
|
||||
PartialDiagnostic::Storage *Storage)
|
||||
: Diag(PDiag, Storage) {}
|
||||
|
||||
|
||||
static DependentDiagnostic *Create(ASTContext &Context,
|
||||
DeclContext *Parent,
|
||||
const PartialDiagnostic &PDiag);
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#include "clang/AST/StmtVisitor.h"
|
||||
|
||||
namespace clang {
|
||||
|
||||
|
||||
class ASTContext;
|
||||
|
||||
|
||||
/// Given a potentially-evaluated expression, this visitor visits all
|
||||
/// of its potentially-evaluated subexpressions, recursively.
|
||||
template<template <typename> class Ptr, typename ImplClass>
|
||||
|
|
|
@ -884,7 +884,7 @@ public:
|
|||
: Expr(OpaqueValueExprClass, T, VK, OK,
|
||||
T->isDependentType() ||
|
||||
(SourceExpr && SourceExpr->isTypeDependent()),
|
||||
T->isDependentType() ||
|
||||
T->isDependentType() ||
|
||||
(SourceExpr && SourceExpr->isValueDependent()),
|
||||
T->isInstantiationDependentType() ||
|
||||
(SourceExpr && SourceExpr->isInstantiationDependent()),
|
||||
|
@ -5341,7 +5341,7 @@ public:
|
|||
|
||||
SourceLocation getLocStart() const LLVM_READONLY { return SourceLocation(); }
|
||||
SourceLocation getLocEnd() const LLVM_READONLY { return SourceLocation(); }
|
||||
|
||||
|
||||
static bool classof(const Stmt *T) {
|
||||
return T->getStmtClass() == TypoExprClass;
|
||||
}
|
||||
|
|
|
@ -721,7 +721,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/// A member reference to an MSPropertyDecl.
|
||||
/// A member reference to an MSPropertyDecl.
|
||||
///
|
||||
/// This expression always has pseudo-object type, and therefore it is
|
||||
/// typically not encountered in a fully-typechecked expression except
|
||||
|
@ -1591,7 +1591,7 @@ class LambdaExpr final : public Expr,
|
|||
|
||||
/// The number of captures.
|
||||
unsigned NumCaptures : 16;
|
||||
|
||||
|
||||
/// The default capture kind, which is a value of type
|
||||
/// LambdaCaptureDefault.
|
||||
unsigned CaptureDefault : 2;
|
||||
|
@ -1602,10 +1602,10 @@ class LambdaExpr final : public Expr,
|
|||
|
||||
/// Whether this lambda had the result type explicitly specified.
|
||||
unsigned ExplicitResultType : 1;
|
||||
|
||||
|
||||
/// The location of the closing brace ('}') that completes
|
||||
/// the lambda.
|
||||
///
|
||||
///
|
||||
/// The location of the brace is also available by looking up the
|
||||
/// function call operator in the lambda class. However, it is
|
||||
/// stored here to improve the performance of getSourceRange(), and
|
||||
|
@ -1673,7 +1673,7 @@ public:
|
|||
|
||||
/// Retrieve this lambda's captures.
|
||||
capture_range captures() const;
|
||||
|
||||
|
||||
/// Retrieve an iterator pointing to the first lambda capture.
|
||||
capture_iterator capture_begin() const;
|
||||
|
||||
|
@ -1686,7 +1686,7 @@ public:
|
|||
|
||||
/// Retrieve this lambda's explicit captures.
|
||||
capture_range explicit_captures() const;
|
||||
|
||||
|
||||
/// Retrieve an iterator pointing to the first explicit
|
||||
/// lambda capture.
|
||||
capture_iterator explicit_capture_begin() const;
|
||||
|
@ -1754,18 +1754,18 @@ public:
|
|||
SourceRange getIntroducerRange() const { return IntroducerRange; }
|
||||
|
||||
/// Retrieve the class that corresponds to the lambda.
|
||||
///
|
||||
///
|
||||
/// This is the "closure type" (C++1y [expr.prim.lambda]), and stores the
|
||||
/// captures in its fields and provides the various operations permitted
|
||||
/// on a lambda (copying, calling).
|
||||
CXXRecordDecl *getLambdaClass() const;
|
||||
|
||||
/// Retrieve the function call operator associated with this
|
||||
/// lambda expression.
|
||||
/// lambda expression.
|
||||
CXXMethodDecl *getCallOperator() const;
|
||||
|
||||
/// If this is a generic lambda expression, retrieve the template
|
||||
/// parameter list associated with it, or else return null.
|
||||
/// If this is a generic lambda expression, retrieve the template
|
||||
/// parameter list associated with it, or else return null.
|
||||
TemplateParameterList *getTemplateParameterList() const;
|
||||
|
||||
/// Whether this is a generic lambda.
|
||||
|
@ -1784,7 +1784,7 @@ public:
|
|||
|
||||
/// Whether this lambda had its result type explicitly specified.
|
||||
bool hasExplicitResultType() const { return ExplicitResultType; }
|
||||
|
||||
|
||||
static bool classof(const Stmt *T) {
|
||||
return T->getStmtClass() == LambdaExprClass;
|
||||
}
|
||||
|
@ -2129,7 +2129,7 @@ public:
|
|||
Expr *getArgument() { return cast<Expr>(Argument); }
|
||||
const Expr *getArgument() const { return cast<Expr>(Argument); }
|
||||
|
||||
/// Retrieve the type being destroyed.
|
||||
/// Retrieve the type being destroyed.
|
||||
///
|
||||
/// If the type being destroyed is a dependent type which may or may not
|
||||
/// be a pointer, return an invalid type.
|
||||
|
@ -2345,13 +2345,13 @@ class TypeTraitExpr final
|
|||
private llvm::TrailingObjects<TypeTraitExpr, TypeSourceInfo *> {
|
||||
/// The location of the type trait keyword.
|
||||
SourceLocation Loc;
|
||||
|
||||
|
||||
/// The location of the closing parenthesis.
|
||||
SourceLocation RParenLoc;
|
||||
|
||||
|
||||
// Note: The TypeSourceInfos for the arguments are allocated after the
|
||||
// TypeTraitExpr.
|
||||
|
||||
|
||||
TypeTraitExpr(QualType T, SourceLocation Loc, TypeTrait Kind,
|
||||
ArrayRef<TypeSourceInfo *> Args,
|
||||
SourceLocation RParenLoc,
|
||||
|
@ -2377,26 +2377,26 @@ public:
|
|||
|
||||
static TypeTraitExpr *CreateDeserialized(const ASTContext &C,
|
||||
unsigned NumArgs);
|
||||
|
||||
|
||||
/// Determine which type trait this expression uses.
|
||||
TypeTrait getTrait() const {
|
||||
return static_cast<TypeTrait>(TypeTraitExprBits.Kind);
|
||||
}
|
||||
|
||||
bool getValue() const {
|
||||
assert(!isValueDependent());
|
||||
return TypeTraitExprBits.Value;
|
||||
bool getValue() const {
|
||||
assert(!isValueDependent());
|
||||
return TypeTraitExprBits.Value;
|
||||
}
|
||||
|
||||
|
||||
/// Determine the number of arguments to this type trait.
|
||||
unsigned getNumArgs() const { return TypeTraitExprBits.NumArgs; }
|
||||
|
||||
|
||||
/// Retrieve the Ith argument.
|
||||
TypeSourceInfo *getArg(unsigned I) const {
|
||||
assert(I < getNumArgs() && "Argument out-of-range");
|
||||
return getArgs()[I];
|
||||
}
|
||||
|
||||
|
||||
/// Retrieve the argument types.
|
||||
ArrayRef<TypeSourceInfo *> getArgs() const {
|
||||
return llvm::makeArrayRef(getTrailingObjects<TypeSourceInfo *>(),
|
||||
|
@ -2409,7 +2409,7 @@ public:
|
|||
static bool classof(const Stmt *T) {
|
||||
return T->getStmtClass() == TypeTraitExprClass;
|
||||
}
|
||||
|
||||
|
||||
// Iterators
|
||||
child_range children() {
|
||||
return child_range(child_iterator(), child_iterator());
|
||||
|
|
|
@ -90,16 +90,16 @@ public:
|
|||
Value(val), Loc(l) {}
|
||||
explicit ObjCBoolLiteralExpr(EmptyShell Empty)
|
||||
: Expr(ObjCBoolLiteralExprClass, Empty) {}
|
||||
|
||||
|
||||
bool getValue() const { return Value; }
|
||||
void setValue(bool V) { Value = V; }
|
||||
|
||||
|
||||
SourceLocation getLocStart() const LLVM_READONLY { return Loc; }
|
||||
SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
|
||||
|
||||
SourceLocation getLocation() const { return Loc; }
|
||||
void setLocation(SourceLocation L) { Loc = L; }
|
||||
|
||||
|
||||
// Iterators
|
||||
child_range children() {
|
||||
return child_range(child_iterator(), child_iterator());
|
||||
|
@ -124,30 +124,30 @@ public:
|
|||
|
||||
ObjCBoxedExpr(Expr *E, QualType T, ObjCMethodDecl *method,
|
||||
SourceRange R)
|
||||
: Expr(ObjCBoxedExprClass, T, VK_RValue, OK_Ordinary,
|
||||
E->isTypeDependent(), E->isValueDependent(),
|
||||
: Expr(ObjCBoxedExprClass, T, VK_RValue, OK_Ordinary,
|
||||
E->isTypeDependent(), E->isValueDependent(),
|
||||
E->isInstantiationDependent(),
|
||||
E->containsUnexpandedParameterPack()),
|
||||
E->containsUnexpandedParameterPack()),
|
||||
SubExpr(E), BoxingMethod(method), Range(R) {}
|
||||
explicit ObjCBoxedExpr(EmptyShell Empty)
|
||||
: Expr(ObjCBoxedExprClass, Empty) {}
|
||||
|
||||
|
||||
Expr *getSubExpr() { return cast<Expr>(SubExpr); }
|
||||
const Expr *getSubExpr() const { return cast<Expr>(SubExpr); }
|
||||
|
||||
|
||||
ObjCMethodDecl *getBoxingMethod() const {
|
||||
return BoxingMethod;
|
||||
return BoxingMethod;
|
||||
}
|
||||
|
||||
|
||||
SourceLocation getAtLoc() const { return Range.getBegin(); }
|
||||
|
||||
|
||||
SourceLocation getLocStart() const LLVM_READONLY { return Range.getBegin(); }
|
||||
SourceLocation getLocEnd() const LLVM_READONLY { return Range.getEnd(); }
|
||||
|
||||
SourceRange getSourceRange() const LLVM_READONLY {
|
||||
return Range;
|
||||
}
|
||||
|
||||
|
||||
// Iterators
|
||||
child_range children() { return child_range(&SubExpr, &SubExpr+1); }
|
||||
|
||||
|
@ -208,7 +208,7 @@ public:
|
|||
|
||||
/// getNumElements - Return number of elements of objective-c array literal.
|
||||
unsigned getNumElements() const { return NumElements; }
|
||||
|
||||
|
||||
/// getElement - Return the Element at the specified index.
|
||||
Expr *getElement(unsigned Index) {
|
||||
assert((Index < NumElements) && "Arg access out of range!");
|
||||
|
@ -218,11 +218,11 @@ public:
|
|||
assert((Index < NumElements) && "Arg access out of range!");
|
||||
return getElements()[Index];
|
||||
}
|
||||
|
||||
|
||||
ObjCMethodDecl *getArrayWithObjectsMethod() const {
|
||||
return ArrayWithObjectsMethod;
|
||||
return ArrayWithObjectsMethod;
|
||||
}
|
||||
|
||||
|
||||
// Iterators
|
||||
child_range children() {
|
||||
return child_range(reinterpret_cast<Stmt **>(getElements()),
|
||||
|
@ -239,13 +239,13 @@ public:
|
|||
struct ObjCDictionaryElement {
|
||||
/// The key for the dictionary element.
|
||||
Expr *Key;
|
||||
|
||||
|
||||
/// The value of the dictionary element.
|
||||
Expr *Value;
|
||||
|
||||
|
||||
/// The location of the ellipsis, if this is a pack expansion.
|
||||
SourceLocation EllipsisLoc;
|
||||
|
||||
|
||||
/// The number of elements this pack expansion will expand to, if
|
||||
/// this is a pack expansion and is known.
|
||||
Optional<unsigned> NumExpansions;
|
||||
|
@ -308,7 +308,7 @@ class ObjCDictionaryLiteral final
|
|||
using KeyValuePair = ObjCDictionaryLiteral_KeyValuePair;
|
||||
using ExpansionData = ObjCDictionaryLiteral_ExpansionData;
|
||||
|
||||
ObjCDictionaryLiteral(ArrayRef<ObjCDictionaryElement> VK,
|
||||
ObjCDictionaryLiteral(ArrayRef<ObjCDictionaryElement> VK,
|
||||
bool HasPackExpansions,
|
||||
QualType T, ObjCMethodDecl *method,
|
||||
SourceRange SR);
|
||||
|
@ -328,16 +328,16 @@ public:
|
|||
friend TrailingObjects;
|
||||
|
||||
static ObjCDictionaryLiteral *Create(const ASTContext &C,
|
||||
ArrayRef<ObjCDictionaryElement> VK,
|
||||
ArrayRef<ObjCDictionaryElement> VK,
|
||||
bool HasPackExpansions,
|
||||
QualType T, ObjCMethodDecl *method,
|
||||
SourceRange SR);
|
||||
|
||||
|
||||
static ObjCDictionaryLiteral *CreateEmpty(const ASTContext &C,
|
||||
unsigned NumElements,
|
||||
bool HasPackExpansions);
|
||||
|
||||
/// getNumElements - Return number of elements of objective-c dictionary
|
||||
|
||||
/// getNumElements - Return number of elements of objective-c dictionary
|
||||
/// literal.
|
||||
unsigned getNumElements() const { return NumElements; }
|
||||
|
||||
|
@ -354,7 +354,7 @@ public:
|
|||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
ObjCMethodDecl *getDictWithObjectsMethod() const {
|
||||
return DictWithObjectsMethod;
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ public:
|
|||
EncodedType->getType()->isDependentType(),
|
||||
EncodedType->getType()->isDependentType(),
|
||||
EncodedType->getType()->isInstantiationDependentType(),
|
||||
EncodedType->getType()->containsUnexpandedParameterPack()),
|
||||
EncodedType->getType()->containsUnexpandedParameterPack()),
|
||||
EncodedType(EncodedType), AtLoc(at), RParenLoc(rp) {}
|
||||
|
||||
explicit ObjCEncodeExpr(EmptyShell Empty) : Expr(ObjCEncodeExprClass, Empty){}
|
||||
|
@ -408,8 +408,8 @@ public:
|
|||
|
||||
TypeSourceInfo *getEncodedTypeSourceInfo() const { return EncodedType; }
|
||||
|
||||
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType) {
|
||||
EncodedType = EncType;
|
||||
void setEncodedTypeSourceInfo(TypeSourceInfo *EncType) {
|
||||
EncodedType = EncType;
|
||||
}
|
||||
|
||||
SourceLocation getLocStart() const LLVM_READONLY { return AtLoc; }
|
||||
|
@ -531,9 +531,9 @@ public:
|
|||
bool arrow = false, bool freeIvar = false)
|
||||
: Expr(ObjCIvarRefExprClass, t, VK_LValue,
|
||||
d->isBitField() ? OK_BitField : OK_Ordinary,
|
||||
/*TypeDependent=*/false, base->isValueDependent(),
|
||||
/*TypeDependent=*/false, base->isValueDependent(),
|
||||
base->isInstantiationDependent(),
|
||||
base->containsUnexpandedParameterPack()),
|
||||
base->containsUnexpandedParameterPack()),
|
||||
D(d), Base(base), Loc(l), OpLoc(oploc), IsArrow(arrow),
|
||||
IsFreeIvar(freeIvar) {}
|
||||
|
||||
|
@ -560,7 +560,7 @@ public:
|
|||
return isFreeIvar() ? Loc : getBase()->getLocStart();
|
||||
}
|
||||
SourceLocation getLocEnd() const LLVM_READONLY { return Loc; }
|
||||
|
||||
|
||||
SourceLocation getOpLoc() const { return OpLoc; }
|
||||
void setOpLoc(SourceLocation L) { OpLoc = L; }
|
||||
|
||||
|
@ -600,13 +600,13 @@ private:
|
|||
// transformation is lossy on the first character).
|
||||
|
||||
SourceLocation IdLoc;
|
||||
|
||||
|
||||
/// When the receiver in property access is 'super', this is
|
||||
/// the location of the 'super' keyword. When it's an interface,
|
||||
/// this is that interface.
|
||||
SourceLocation ReceiverLoc;
|
||||
llvm::PointerUnion3<Stmt *, const Type *, ObjCInterfaceDecl *> Receiver;
|
||||
|
||||
|
||||
public:
|
||||
ObjCPropertyRefExpr(ObjCPropertyDecl *PD, QualType t,
|
||||
ExprValueKind VK, ExprObjectKind OK,
|
||||
|
@ -618,7 +618,7 @@ public:
|
|||
PropertyOrGetter(PD, false), IdLoc(l), Receiver(base) {
|
||||
assert(t->isSpecificPlaceholderType(BuiltinType::PseudoObject));
|
||||
}
|
||||
|
||||
|
||||
ObjCPropertyRefExpr(ObjCPropertyDecl *PD, QualType t,
|
||||
ExprValueKind VK, ExprObjectKind OK,
|
||||
SourceLocation l, SourceLocation sl, QualType st)
|
||||
|
@ -716,19 +716,19 @@ public:
|
|||
setMethodRefFlag(MethodRef_Setter, val);
|
||||
}
|
||||
|
||||
const Expr *getBase() const {
|
||||
return cast<Expr>(Receiver.get<Stmt*>());
|
||||
const Expr *getBase() const {
|
||||
return cast<Expr>(Receiver.get<Stmt*>());
|
||||
}
|
||||
Expr *getBase() {
|
||||
return cast<Expr>(Receiver.get<Stmt*>());
|
||||
Expr *getBase() {
|
||||
return cast<Expr>(Receiver.get<Stmt*>());
|
||||
}
|
||||
|
||||
SourceLocation getLocation() const { return IdLoc; }
|
||||
|
||||
|
||||
SourceLocation getReceiverLocation() const { return ReceiverLoc; }
|
||||
|
||||
QualType getSuperReceiverType() const {
|
||||
return QualType(Receiver.get<const Type*>(), 0);
|
||||
QualType getSuperReceiverType() const {
|
||||
return QualType(Receiver.get<const Type*>(), 0);
|
||||
}
|
||||
|
||||
ObjCInterfaceDecl *getClassReceiver() const {
|
||||
|
@ -796,7 +796,7 @@ private:
|
|||
SetterAndMethodRefFlags.setInt(f);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/// ObjCSubscriptRefExpr - used for array and dictionary subscripting.
|
||||
/// array[4] = array[3]; dictionary[key] = dictionary[alt_key];
|
||||
class ObjCSubscriptRefExpr : public Expr {
|
||||
|
@ -808,20 +808,20 @@ class ObjCSubscriptRefExpr : public Expr {
|
|||
// an objective-c object pointer expression.
|
||||
enum { BASE, KEY, END_EXPR };
|
||||
Stmt* SubExprs[END_EXPR];
|
||||
|
||||
|
||||
ObjCMethodDecl *GetAtIndexMethodDecl;
|
||||
|
||||
|
||||
// For immutable objects this is null. When ObjCSubscriptRefExpr is to read
|
||||
// an indexed object this is null too.
|
||||
ObjCMethodDecl *SetAtIndexMethodDecl;
|
||||
|
||||
|
||||
public:
|
||||
ObjCSubscriptRefExpr(Expr *base, Expr *key, QualType T,
|
||||
ExprValueKind VK, ExprObjectKind OK,
|
||||
ObjCMethodDecl *getMethod,
|
||||
ObjCMethodDecl *setMethod, SourceLocation RB)
|
||||
: Expr(ObjCSubscriptRefExprClass, T, VK, OK,
|
||||
base->isTypeDependent() || key->isTypeDependent(),
|
||||
: Expr(ObjCSubscriptRefExprClass, T, VK, OK,
|
||||
base->isTypeDependent() || key->isTypeDependent(),
|
||||
base->isValueDependent() || key->isValueDependent(),
|
||||
(base->isInstantiationDependent() ||
|
||||
key->isInstantiationDependent()),
|
||||
|
@ -834,7 +834,7 @@ public:
|
|||
|
||||
explicit ObjCSubscriptRefExpr(EmptyShell Empty)
|
||||
: Expr(ObjCSubscriptRefExprClass, Empty) {}
|
||||
|
||||
|
||||
SourceLocation getRBracket() const { return RBracket; }
|
||||
void setRBracket(SourceLocation RB) { RBracket = RB; }
|
||||
|
||||
|
@ -843,25 +843,25 @@ public:
|
|||
}
|
||||
|
||||
SourceLocation getLocEnd() const LLVM_READONLY { return RBracket; }
|
||||
|
||||
|
||||
Expr *getBaseExpr() const { return cast<Expr>(SubExprs[BASE]); }
|
||||
void setBaseExpr(Stmt *S) { SubExprs[BASE] = S; }
|
||||
|
||||
|
||||
Expr *getKeyExpr() const { return cast<Expr>(SubExprs[KEY]); }
|
||||
void setKeyExpr(Stmt *S) { SubExprs[KEY] = S; }
|
||||
|
||||
|
||||
ObjCMethodDecl *getAtIndexMethodDecl() const {
|
||||
return GetAtIndexMethodDecl;
|
||||
}
|
||||
|
||||
|
||||
ObjCMethodDecl *setAtIndexMethodDecl() const {
|
||||
return SetAtIndexMethodDecl;
|
||||
}
|
||||
|
||||
|
||||
bool isArraySubscriptRefExpr() const {
|
||||
return getKeyExpr()->getType()->isIntegralOrEnumerationType();
|
||||
}
|
||||
|
||||
|
||||
child_range children() {
|
||||
return child_range(SubExprs, SubExprs+END_EXPR);
|
||||
}
|
||||
|
@ -913,7 +913,7 @@ class ObjCMessageExpr final
|
|||
/// The number of arguments in the message send, not
|
||||
/// including the receiver.
|
||||
unsigned NumArgs : NumArgsBitWidth;
|
||||
|
||||
|
||||
/// The kind of message send this is, which is one of the
|
||||
/// ReceiverKind values.
|
||||
///
|
||||
|
@ -958,7 +958,7 @@ class ObjCMessageExpr final
|
|||
SourceLocation SuperLoc,
|
||||
bool IsInstanceSuper,
|
||||
QualType SuperType,
|
||||
Selector Sel,
|
||||
Selector Sel,
|
||||
ArrayRef<SourceLocation> SelLocs,
|
||||
SelectorLocationsKind SelLocsK,
|
||||
ObjCMethodDecl *Method,
|
||||
|
@ -968,7 +968,7 @@ class ObjCMessageExpr final
|
|||
ObjCMessageExpr(QualType T, ExprValueKind VK,
|
||||
SourceLocation LBracLoc,
|
||||
TypeSourceInfo *Receiver,
|
||||
Selector Sel,
|
||||
Selector Sel,
|
||||
ArrayRef<SourceLocation> SelLocs,
|
||||
SelectorLocationsKind SelLocsK,
|
||||
ObjCMethodDecl *Method,
|
||||
|
@ -978,7 +978,7 @@ class ObjCMessageExpr final
|
|||
ObjCMessageExpr(QualType T, ExprValueKind VK,
|
||||
SourceLocation LBracLoc,
|
||||
Expr *Receiver,
|
||||
Selector Sel,
|
||||
Selector Sel,
|
||||
ArrayRef<SourceLocation> SelLocs,
|
||||
SelectorLocationsKind SelLocsK,
|
||||
ObjCMethodDecl *Method,
|
||||
|
@ -1091,7 +1091,7 @@ public:
|
|||
SourceLocation SuperLoc,
|
||||
bool IsInstanceSuper,
|
||||
QualType SuperType,
|
||||
Selector Sel,
|
||||
Selector Sel,
|
||||
ArrayRef<SourceLocation> SelLocs,
|
||||
ObjCMethodDecl *Method,
|
||||
ArrayRef<Expr *> Args,
|
||||
|
@ -1125,7 +1125,7 @@ public:
|
|||
ExprValueKind VK,
|
||||
SourceLocation LBracLoc,
|
||||
TypeSourceInfo *Receiver,
|
||||
Selector Sel,
|
||||
Selector Sel,
|
||||
ArrayRef<SourceLocation> SelLocs,
|
||||
ObjCMethodDecl *Method,
|
||||
ArrayRef<Expr *> Args,
|
||||
|
@ -1159,7 +1159,7 @@ public:
|
|||
ExprValueKind VK,
|
||||
SourceLocation LBracLoc,
|
||||
Expr *Receiver,
|
||||
Selector Sel,
|
||||
Selector Sel,
|
||||
ArrayRef<SourceLocation> SeLocs,
|
||||
ObjCMethodDecl *Method,
|
||||
ArrayRef<Expr *> Args,
|
||||
|
@ -1215,14 +1215,14 @@ public:
|
|||
|
||||
/// Turn this message send into an instance message that
|
||||
/// computes the receiver object with the given expression.
|
||||
void setInstanceReceiver(Expr *rec) {
|
||||
void setInstanceReceiver(Expr *rec) {
|
||||
Kind = Instance;
|
||||
setReceiverPointer(rec);
|
||||
}
|
||||
|
||||
|
||||
/// Returns the type of a class message send, or NULL if the
|
||||
/// message is not a class message.
|
||||
QualType getClassReceiver() const {
|
||||
QualType getClassReceiver() const {
|
||||
if (TypeSourceInfo *TSInfo = getClassReceiverTypeInfo())
|
||||
return TSInfo->getType();
|
||||
|
||||
|
@ -1244,7 +1244,7 @@ public:
|
|||
|
||||
/// Retrieve the location of the 'super' keyword for a class
|
||||
/// or instance message to 'super', otherwise an invalid source location.
|
||||
SourceLocation getSuperLoc() const {
|
||||
SourceLocation getSuperLoc() const {
|
||||
if (getReceiverKind() == SuperInstance || getReceiverKind() == SuperClass)
|
||||
return SuperLoc;
|
||||
|
||||
|
@ -1274,7 +1274,7 @@ public:
|
|||
/// \returns The Objective-C interface if known, otherwise nullptr.
|
||||
ObjCInterfaceDecl *getReceiverInterface() const;
|
||||
|
||||
/// Retrieve the type referred to by 'super'.
|
||||
/// Retrieve the type referred to by 'super'.
|
||||
///
|
||||
/// The returned type will either be an ObjCInterfaceType (for an
|
||||
/// class message to super) or an ObjCObjectPointerType that refers
|
||||
|
@ -1294,26 +1294,26 @@ public:
|
|||
|
||||
Selector getSelector() const;
|
||||
|
||||
void setSelector(Selector S) {
|
||||
void setSelector(Selector S) {
|
||||
HasMethod = false;
|
||||
SelectorOrMethod = reinterpret_cast<uintptr_t>(S.getAsOpaquePtr());
|
||||
}
|
||||
|
||||
const ObjCMethodDecl *getMethodDecl() const {
|
||||
const ObjCMethodDecl *getMethodDecl() const {
|
||||
if (HasMethod)
|
||||
return reinterpret_cast<const ObjCMethodDecl *>(SelectorOrMethod);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ObjCMethodDecl *getMethodDecl() {
|
||||
ObjCMethodDecl *getMethodDecl() {
|
||||
if (HasMethod)
|
||||
return reinterpret_cast<ObjCMethodDecl *>(SelectorOrMethod);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void setMethodDecl(ObjCMethodDecl *MD) {
|
||||
void setMethodDecl(ObjCMethodDecl *MD) {
|
||||
HasMethod = true;
|
||||
SelectorOrMethod = reinterpret_cast<uintptr_t>(MD);
|
||||
}
|
||||
|
@ -1414,16 +1414,16 @@ public:
|
|||
|
||||
arg_iterator arg_begin() { return reinterpret_cast<Stmt **>(getArgs()); }
|
||||
|
||||
arg_iterator arg_end() {
|
||||
return reinterpret_cast<Stmt **>(getArgs() + NumArgs);
|
||||
arg_iterator arg_end() {
|
||||
return reinterpret_cast<Stmt **>(getArgs() + NumArgs);
|
||||
}
|
||||
|
||||
const_arg_iterator arg_begin() const {
|
||||
return reinterpret_cast<Stmt const * const*>(getArgs());
|
||||
const_arg_iterator arg_begin() const {
|
||||
return reinterpret_cast<Stmt const * const*>(getArgs());
|
||||
}
|
||||
|
||||
const_arg_iterator arg_end() const {
|
||||
return reinterpret_cast<Stmt const * const*>(getArgs() + NumArgs);
|
||||
const_arg_iterator arg_end() const {
|
||||
return reinterpret_cast<Stmt const * const*>(getArgs() + NumArgs);
|
||||
}
|
||||
|
||||
static bool classof(const Stmt *T) {
|
||||
|
@ -1439,7 +1439,7 @@ class ObjCIsaExpr : public Expr {
|
|||
|
||||
/// IsaMemberLoc - This is the location of the 'isa'.
|
||||
SourceLocation IsaMemberLoc;
|
||||
|
||||
|
||||
/// OpLoc - This is the location of '.' or '->'
|
||||
SourceLocation OpLoc;
|
||||
|
||||
|
@ -1468,18 +1468,18 @@ public:
|
|||
/// location of 'F'.
|
||||
SourceLocation getIsaMemberLoc() const { return IsaMemberLoc; }
|
||||
void setIsaMemberLoc(SourceLocation L) { IsaMemberLoc = L; }
|
||||
|
||||
|
||||
SourceLocation getOpLoc() const { return OpLoc; }
|
||||
void setOpLoc(SourceLocation L) { OpLoc = L; }
|
||||
|
||||
SourceLocation getLocStart() const LLVM_READONLY {
|
||||
return getBase()->getLocStart();
|
||||
}
|
||||
|
||||
|
||||
SourceLocation getBaseLocEnd() const LLVM_READONLY {
|
||||
return getBase()->getLocEnd();
|
||||
}
|
||||
|
||||
|
||||
SourceLocation getLocEnd() const LLVM_READONLY { return IsaMemberLoc; }
|
||||
|
||||
SourceLocation getExprLoc() const LLVM_READONLY { return IsaMemberLoc; }
|
||||
|
@ -1546,7 +1546,7 @@ public:
|
|||
/// copy-restore. If false, the temporary will be zero-initialized.
|
||||
bool shouldCopy() const { return ObjCIndirectCopyRestoreExprBits.ShouldCopy; }
|
||||
|
||||
child_range children() { return child_range(&Operand, &Operand+1); }
|
||||
child_range children() { return child_range(&Operand, &Operand+1); }
|
||||
|
||||
// Source locations are determined by the subexpression.
|
||||
SourceLocation getLocStart() const LLVM_READONLY {
|
||||
|
@ -1588,7 +1588,7 @@ public:
|
|||
: ExplicitCastExpr(ObjCBridgedCastExprClass, TSInfo->getType(), VK_RValue,
|
||||
CK, Operand, 0, TSInfo),
|
||||
LParenLoc(LParenLoc), BridgeKeywordLoc(BridgeKeywordLoc), Kind(Kind) {}
|
||||
|
||||
|
||||
/// Construct an empty Objective-C bridged cast.
|
||||
explicit ObjCBridgedCastExpr(EmptyShell Shell)
|
||||
: ExplicitCastExpr(ObjCBridgedCastExprClass, Shell, 0) {}
|
||||
|
@ -1596,22 +1596,22 @@ public:
|
|||
SourceLocation getLParenLoc() const { return LParenLoc; }
|
||||
|
||||
/// Determine which kind of bridge is being performed via this cast.
|
||||
ObjCBridgeCastKind getBridgeKind() const {
|
||||
return static_cast<ObjCBridgeCastKind>(Kind);
|
||||
ObjCBridgeCastKind getBridgeKind() const {
|
||||
return static_cast<ObjCBridgeCastKind>(Kind);
|
||||
}
|
||||
|
||||
|
||||
/// Retrieve the kind of bridge being performed as a string.
|
||||
StringRef getBridgeKindName() const;
|
||||
|
||||
|
||||
/// The location of the bridge keyword.
|
||||
SourceLocation getBridgeKeywordLoc() const { return BridgeKeywordLoc; }
|
||||
|
||||
|
||||
SourceLocation getLocStart() const LLVM_READONLY { return LParenLoc; }
|
||||
|
||||
SourceLocation getLocEnd() const LLVM_READONLY {
|
||||
return getSubExpr()->getLocEnd();
|
||||
}
|
||||
|
||||
|
||||
static bool classof(const Stmt *T) {
|
||||
return T->getStmtClass() == ObjCBridgedCastExprClass;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace clang {
|
|||
/// lookup. In this case, Origins contains an entry overriding lookup and
|
||||
/// specifying the correct pair of DeclContext/ASTContext.
|
||||
///
|
||||
/// - The DeclContext of origin was determined by another ExterenalASTMerger.
|
||||
/// - The DeclContext of origin was determined by another ExterenalASTMerger.
|
||||
/// (This is possible when the source ASTContext for one of the Importers has
|
||||
/// its own ExternalASTMerger). The origin must be properly forwarded in this
|
||||
/// case.
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
typedef std::map<const DeclContext *, DCOrigin> OriginMap;
|
||||
typedef std::vector<std::unique_ptr<ASTImporter>> ImporterVector;
|
||||
private:
|
||||
/// One importer exists for each source.
|
||||
/// One importer exists for each source.
|
||||
ImporterVector Importers;
|
||||
/// Overrides in case name lookup would return nothing or would return
|
||||
/// the wrong thing.
|
||||
|
@ -106,7 +106,7 @@ public:
|
|||
/// Remove a set of ASTContexts as possible origins.
|
||||
///
|
||||
/// Sometimes an origin goes away (for example, if a source file gets
|
||||
/// superseded by a newer version).
|
||||
/// superseded by a newer version).
|
||||
///
|
||||
/// The caller is responsible for ensuring that this doesn't leave
|
||||
/// DeclContexts that can't be completed.
|
||||
|
@ -163,7 +163,7 @@ private:
|
|||
template <typename CallbackType>
|
||||
void ForEachMatchingDC(const DeclContext *DC, CallbackType Callback);
|
||||
|
||||
public:
|
||||
public:
|
||||
/// Log something if there is a logging callback installed.
|
||||
llvm::raw_ostream &logs() { return *LogStream; }
|
||||
|
||||
|
|
|
@ -270,10 +270,10 @@ public:
|
|||
///
|
||||
/// The default implementation of this method is a no-op.
|
||||
virtual void PrintStats();
|
||||
|
||||
|
||||
/// Perform layout on the given record.
|
||||
///
|
||||
/// This routine allows the external AST source to provide an specific
|
||||
/// This routine allows the external AST source to provide an specific
|
||||
/// layout for a record, overriding the layout that would normally be
|
||||
/// constructed. It is intended for clients who receive specific layout
|
||||
/// details rather than source code (such as LLDB). The client is expected
|
||||
|
@ -290,13 +290,13 @@ public:
|
|||
/// expressed in bits. All of the fields must be provided with offsets.
|
||||
///
|
||||
/// \param BaseOffsets The offset of each of the direct, non-virtual base
|
||||
/// classes. If any bases are not given offsets, the bases will be laid
|
||||
/// classes. If any bases are not given offsets, the bases will be laid
|
||||
/// out according to the ABI.
|
||||
///
|
||||
/// \param VirtualBaseOffsets The offset of each of the virtual base classes
|
||||
/// (either direct or not). If any bases are not given offsets, the bases will be laid
|
||||
/// (either direct or not). If any bases are not given offsets, the bases will be laid
|
||||
/// out according to the ABI.
|
||||
///
|
||||
///
|
||||
/// \returns true if the record layout was provided, false otherwise.
|
||||
virtual bool layoutRecordType(
|
||||
const RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
|
||||
|
@ -307,15 +307,15 @@ public:
|
|||
//===--------------------------------------------------------------------===//
|
||||
// Queries for performance analysis.
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
||||
|
||||
struct MemoryBufferSizes {
|
||||
size_t malloc_bytes;
|
||||
size_t mmap_bytes;
|
||||
|
||||
|
||||
MemoryBufferSizes(size_t malloc_bytes, size_t mmap_bytes)
|
||||
: malloc_bytes(malloc_bytes), mmap_bytes(mmap_bytes) {}
|
||||
};
|
||||
|
||||
|
||||
/// Return the amount of memory used by memory buffers, breaking down
|
||||
/// by heap-backed versus mmap'ed memory.
|
||||
MemoryBufferSizes getMemoryBufferSizes() const {
|
||||
|
@ -512,10 +512,10 @@ namespace clang {
|
|||
/// Represents a lazily-loaded vector of data.
|
||||
///
|
||||
/// The lazily-loaded vector of data contains data that is partially loaded
|
||||
/// from an external source and partially added by local translation. The
|
||||
/// from an external source and partially added by local translation. The
|
||||
/// items loaded from the external source are loaded lazily, when needed for
|
||||
/// iteration over the complete vector.
|
||||
template<typename T, typename Source,
|
||||
template<typename T, typename Source,
|
||||
void (Source::*Loader)(SmallVectorImpl<T>&),
|
||||
unsigned LoadedStorage = 2, unsigned LocalStorage = 4>
|
||||
class LazyVector {
|
||||
|
@ -564,20 +564,20 @@ public:
|
|||
iterator begin(Source *source, bool LocalOnly = false) {
|
||||
if (LocalOnly)
|
||||
return iterator(this, 0);
|
||||
|
||||
|
||||
if (source)
|
||||
(source->*Loader)(Loaded);
|
||||
return iterator(this, -(int)Loaded.size());
|
||||
}
|
||||
|
||||
|
||||
iterator end() {
|
||||
return iterator(this, Local.size());
|
||||
}
|
||||
|
||||
|
||||
void push_back(const T& LocalValue) {
|
||||
Local.push_back(LocalValue);
|
||||
}
|
||||
|
||||
|
||||
void erase(iterator From, iterator To) {
|
||||
if (From.isLoaded() && To.isLoaded()) {
|
||||
Loaded.erase(&*From, &*To);
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
GlobalDecl CanonGD;
|
||||
CanonGD.Value.setPointer(Value.getPointer()->getCanonicalDecl());
|
||||
CanonGD.Value.setInt(Value.getInt());
|
||||
|
||||
|
||||
return CanonGD;
|
||||
}
|
||||
|
||||
|
@ -72,11 +72,11 @@ public:
|
|||
assert(isa<CXXDestructorDecl>(getDecl()) && "Decl is not a dtor!");
|
||||
return static_cast<CXXDtorType>(Value.getInt());
|
||||
}
|
||||
|
||||
|
||||
friend bool operator==(const GlobalDecl &LHS, const GlobalDecl &RHS) {
|
||||
return LHS.Value == RHS.Value;
|
||||
}
|
||||
|
||||
|
||||
void *getAsOpaquePtr() const { return Value.getOpaqueValue(); }
|
||||
|
||||
static GlobalDecl getFromOpaquePtr(void *P) {
|
||||
|
@ -84,7 +84,7 @@ public:
|
|||
GD.Value.setFromOpaqueValue(P);
|
||||
return GD;
|
||||
}
|
||||
|
||||
|
||||
GlobalDecl getWithDecl(const Decl *D) {
|
||||
GlobalDecl Result(*this);
|
||||
Result.Value.setPointer(D);
|
||||
|
@ -100,7 +100,7 @@ namespace llvm {
|
|||
static inline clang::GlobalDecl getEmptyKey() {
|
||||
return clang::GlobalDecl();
|
||||
}
|
||||
|
||||
|
||||
static inline clang::GlobalDecl getTombstoneKey() {
|
||||
return clang::GlobalDecl::
|
||||
getFromOpaquePtr(reinterpret_cast<void*>(-1));
|
||||
|
@ -109,13 +109,13 @@ namespace llvm {
|
|||
static unsigned getHashValue(clang::GlobalDecl GD) {
|
||||
return DenseMapInfo<void*>::getHashValue(GD.getAsOpaquePtr());
|
||||
}
|
||||
|
||||
static bool isEqual(clang::GlobalDecl LHS,
|
||||
|
||||
static bool isEqual(clang::GlobalDecl LHS,
|
||||
clang::GlobalDecl RHS) {
|
||||
return LHS == RHS;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// GlobalDecl isn't *technically* a POD type. However, its copy constructor,
|
||||
// copy assignment operator, and destructor are all trivial.
|
||||
template <>
|
||||
|
|
|
@ -41,7 +41,7 @@ class LambdaCapture {
|
|||
};
|
||||
|
||||
// Decl could represent:
|
||||
// - a VarDecl* that represents the variable that was captured or the
|
||||
// - a VarDecl* that represents the variable that was captured or the
|
||||
// init-capture.
|
||||
// - or, is a nullptr and Capture_This is set in Bits if this represents a
|
||||
// capture of '*this' by value or reference.
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
DiagnosticsEngine &getDiags() const { return Diags; }
|
||||
|
||||
virtual void startNewFunction() { LocalBlockIds.clear(); }
|
||||
|
||||
|
||||
unsigned getBlockId(const BlockDecl *BD, bool Local) {
|
||||
llvm::DenseMap<const BlockDecl *, unsigned> &BlockIds
|
||||
= Local? LocalBlockIds : GlobalBlockIds;
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
NSMutableDict_setValueForKey
|
||||
};
|
||||
static const unsigned NumNSDictionaryMethods = 13;
|
||||
|
||||
|
||||
/// The Objective-C NSDictionary selectors.
|
||||
Selector getNSDictionarySelector(NSDictionaryMethodKind MK) const;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class TypeLoc;
|
|||
/// specifier. Nested name specifiers are made up of a sequence of
|
||||
/// specifiers, each of which can be a namespace, type, identifier
|
||||
/// (for dependent names), decltype specifier, or the global specifier ('::').
|
||||
/// The last two specifiers can only appear at the start of a
|
||||
/// The last two specifiers can only appear at the start of a
|
||||
/// nested-namespace-specifier.
|
||||
class NestedNameSpecifier : public llvm::FoldingSetNode {
|
||||
/// Enumeration describing
|
||||
|
@ -438,7 +438,7 @@ public:
|
|||
/// Turn this (empty) nested-name-specifier into the global
|
||||
/// nested-name-specifier '::'.
|
||||
void MakeGlobal(ASTContext &Context, SourceLocation ColonColonLoc);
|
||||
|
||||
|
||||
/// Turns this (empty) nested-name-specifier into '__super'
|
||||
/// nested-name-specifier.
|
||||
///
|
||||
|
@ -452,7 +452,7 @@ public:
|
|||
/// name.
|
||||
///
|
||||
/// \param ColonColonLoc The location of the trailing '::'.
|
||||
void MakeSuper(ASTContext &Context, CXXRecordDecl *RD,
|
||||
void MakeSuper(ASTContext &Context, CXXRecordDecl *RD,
|
||||
SourceLocation SuperLoc, SourceLocation ColonColonLoc);
|
||||
|
||||
/// Make a new nested-name-specifier from incomplete source-location
|
||||
|
|
|
@ -307,7 +307,7 @@ CAST_OPERATION(AtomicToNonAtomic)
|
|||
/// Converts from T to _Atomic(T).
|
||||
CAST_OPERATION(NonAtomicToAtomic)
|
||||
|
||||
/// Causes a block literal to by copied to the heap and then
|
||||
/// Causes a block literal to by copied to the heap and then
|
||||
/// autoreleased.
|
||||
///
|
||||
/// This particular cast kind is used for the conversion from a C++11
|
||||
|
@ -391,13 +391,13 @@ BINARY_OPERATION(Comma, ",")
|
|||
// [C99 6.5.2.4] Postfix increment and decrement
|
||||
UNARY_OPERATION(PostInc, "++")
|
||||
UNARY_OPERATION(PostDec, "--")
|
||||
// [C99 6.5.3.1] Prefix increment and decrement
|
||||
// [C99 6.5.3.1] Prefix increment and decrement
|
||||
UNARY_OPERATION(PreInc, "++")
|
||||
UNARY_OPERATION(PreDec, "--")
|
||||
// [C99 6.5.3.2] Address and indirection
|
||||
UNARY_OPERATION(AddrOf, "&")
|
||||
UNARY_OPERATION(Deref, "*")
|
||||
// [C99 6.5.3.3] Unary arithmetic
|
||||
// [C99 6.5.3.3] Unary arithmetic
|
||||
UNARY_OPERATION(Plus, "+")
|
||||
UNARY_OPERATION(Minus, "-")
|
||||
UNARY_OPERATION(Not, "~")
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#define LLVM_CLANG_AST_OPERATIONKINDS_H
|
||||
|
||||
namespace clang {
|
||||
|
||||
|
||||
/// CastKind - The kind of operation required for a conversion.
|
||||
enum CastKind {
|
||||
#define CAST_OPERATION(Name) CK_##Name,
|
||||
|
|
|
@ -109,7 +109,7 @@ struct PrintingPolicy {
|
|||
/// Suppress printing parts of scope specifiers that don't need
|
||||
/// to be written, e.g., for inline or anonymous namespaces.
|
||||
bool SuppressUnwrittenScope : 1;
|
||||
|
||||
|
||||
/// Suppress printing of variable initializers.
|
||||
///
|
||||
/// This flag is used when printing the loop variable in a for-range
|
||||
|
@ -140,15 +140,15 @@ struct PrintingPolicy {
|
|||
/// char a[9] = "A string";
|
||||
/// \endcode
|
||||
bool ConstantArraySizeAsWritten : 1;
|
||||
|
||||
|
||||
/// When printing an anonymous tag name, also print the location of that
|
||||
/// entity (e.g., "enum <anonymous at t.h:10:5>"). Otherwise, just prints
|
||||
/// "(anonymous)" for the name.
|
||||
bool AnonymousTagLocations : 1;
|
||||
|
||||
|
||||
/// When true, suppress printing of the __strong lifetime qualifier in ARC.
|
||||
unsigned SuppressStrongLifetime : 1;
|
||||
|
||||
|
||||
/// When true, suppress printing of lifetime qualifier in ARC.
|
||||
unsigned SuppressLifetimeQualifiers : 1;
|
||||
|
||||
|
@ -179,7 +179,7 @@ struct PrintingPolicy {
|
|||
/// declarations inside namespaces etc. Effectively, this should print
|
||||
/// only the requested declaration.
|
||||
unsigned TerseOutput : 1;
|
||||
|
||||
|
||||
/// When true, do certain refinement needed for producing proper declaration
|
||||
/// tag; such as, do not print attributes attached to the declaration.
|
||||
///
|
||||
|
|
|
@ -124,10 +124,10 @@ private:
|
|||
|
||||
/// BaseSharingVBPtr - The base we share vbptr with.
|
||||
const CXXRecordDecl *BaseSharingVBPtr;
|
||||
|
||||
|
||||
/// FIXME: This should really use a SmallPtrMap, once we have one in LLVM :)
|
||||
using BaseOffsetsMapTy = llvm::DenseMap<const CXXRecordDecl *, CharUnits>;
|
||||
|
||||
|
||||
/// BaseOffsets - Contains a map from base classes to their offset.
|
||||
BaseOffsetsMapTy BaseOffsets;
|
||||
|
||||
|
@ -168,7 +168,7 @@ private:
|
|||
~ASTRecordLayout() = default;
|
||||
|
||||
void Destroy(ASTContext &Ctx);
|
||||
|
||||
|
||||
public:
|
||||
ASTRecordLayout(const ASTRecordLayout &) = delete;
|
||||
ASTRecordLayout &operator=(const ASTRecordLayout &) = delete;
|
||||
|
@ -269,7 +269,7 @@ public:
|
|||
assert(CXXInfo && "Record layout does not have C++ specific info!");
|
||||
return CXXInfo->HasExtendableVFPtr;
|
||||
}
|
||||
|
||||
|
||||
/// hasOwnVBPtr - Does this class provide its own virtual-base
|
||||
/// table pointer, rather than inheriting one from a primary base
|
||||
/// class?
|
||||
|
|
|
@ -271,12 +271,12 @@ protected:
|
|||
friend class ASTStmtReader;
|
||||
friend class ASTStmtWriter;
|
||||
friend class TypeTraitExpr;
|
||||
|
||||
|
||||
unsigned : NumExprBits;
|
||||
|
||||
|
||||
/// The kind of type trait, which is a value of a TypeTrait enumerator.
|
||||
unsigned Kind : 8;
|
||||
|
||||
|
||||
/// If this expression is not value-dependent, this indicates whether
|
||||
/// the trait evaluated true or false.
|
||||
unsigned Value : 1;
|
||||
|
@ -1556,7 +1556,7 @@ public:
|
|||
/// getInputConstraint - Return the specified input constraint. Unlike output
|
||||
/// constraints, these can be empty.
|
||||
StringRef getInputConstraint(unsigned i) const;
|
||||
|
||||
|
||||
const Expr *getInputExpr(unsigned i) const;
|
||||
|
||||
//===--- Other ---===//
|
||||
|
@ -2133,7 +2133,7 @@ private:
|
|||
/// The number of variable captured, including 'this'.
|
||||
unsigned NumCaptures;
|
||||
|
||||
/// The pointer part is the implicit the outlined function and the
|
||||
/// The pointer part is the implicit the outlined function and the
|
||||
/// int part is the captured region kind, 'CR_Default' etc.
|
||||
llvm::PointerIntPair<CapturedDecl *, 2, CapturedRegionKind> CapDeclAndKind;
|
||||
|
||||
|
|
|
@ -33,14 +33,14 @@ protected:
|
|||
DeclGroupMode = 0x2,
|
||||
Flags = 0x3
|
||||
};
|
||||
|
||||
|
||||
union {
|
||||
Stmt **stmt;
|
||||
Decl **DGI;
|
||||
};
|
||||
uintptr_t RawVAPtr = 0;
|
||||
Decl **DGE;
|
||||
|
||||
|
||||
StmtIteratorBase(Stmt **s) : stmt(s) {}
|
||||
StmtIteratorBase(const VariableArrayType *t);
|
||||
StmtIteratorBase(Decl **dgi, Decl **dge);
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
ObjCAtCatchStmt(SourceLocation atCatchLoc, SourceLocation rparenloc,
|
||||
VarDecl *catchVarDecl,
|
||||
Stmt *atCatchStmt)
|
||||
: Stmt(ObjCAtCatchStmtClass), ExceptionDecl(catchVarDecl),
|
||||
: Stmt(ObjCAtCatchStmtClass), ExceptionDecl(catchVarDecl),
|
||||
Body(atCatchStmt), AtCatchLoc(atCatchLoc), RParenLoc(rparenloc) { }
|
||||
|
||||
explicit ObjCAtCatchStmt(EmptyShell Empty) :
|
||||
|
@ -155,27 +155,27 @@ class ObjCAtTryStmt : public Stmt {
|
|||
private:
|
||||
// The location of the @ in the \@try.
|
||||
SourceLocation AtTryLoc;
|
||||
|
||||
|
||||
// The number of catch blocks in this statement.
|
||||
unsigned NumCatchStmts : 16;
|
||||
|
||||
|
||||
// Whether this statement has a \@finally statement.
|
||||
bool HasFinally : 1;
|
||||
|
||||
|
||||
/// Retrieve the statements that are stored after this \@try statement.
|
||||
///
|
||||
/// The order of the statements in memory follows the order in the source,
|
||||
/// with the \@try body first, followed by the \@catch statements (if any)
|
||||
/// and, finally, the \@finally (if it exists).
|
||||
Stmt **getStmts() { return reinterpret_cast<Stmt **> (this + 1); }
|
||||
const Stmt* const *getStmts() const {
|
||||
return reinterpret_cast<const Stmt * const*> (this + 1);
|
||||
const Stmt* const *getStmts() const {
|
||||
return reinterpret_cast<const Stmt * const*> (this + 1);
|
||||
}
|
||||
|
||||
|
||||
ObjCAtTryStmt(SourceLocation atTryLoc, Stmt *atTryStmt,
|
||||
Stmt **CatchStmts, unsigned NumCatchStmts,
|
||||
Stmt *atFinallyStmt);
|
||||
|
||||
|
||||
explicit ObjCAtTryStmt(EmptyShell Empty, unsigned NumCatchStmts,
|
||||
bool HasFinally)
|
||||
: Stmt(ObjCAtTryStmtClass, Empty), NumCatchStmts(NumCatchStmts),
|
||||
|
@ -188,7 +188,7 @@ public:
|
|||
Stmt *atFinallyStmt);
|
||||
static ObjCAtTryStmt *CreateEmpty(const ASTContext &Context,
|
||||
unsigned NumCatchStmts, bool HasFinally);
|
||||
|
||||
|
||||
/// Retrieve the location of the @ in the \@try.
|
||||
SourceLocation getAtTryLoc() const { return AtTryLoc; }
|
||||
void setAtTryLoc(SourceLocation Loc) { AtTryLoc = Loc; }
|
||||
|
@ -201,41 +201,41 @@ public:
|
|||
/// Retrieve the number of \@catch statements in this try-catch-finally
|
||||
/// block.
|
||||
unsigned getNumCatchStmts() const { return NumCatchStmts; }
|
||||
|
||||
|
||||
/// Retrieve a \@catch statement.
|
||||
const ObjCAtCatchStmt *getCatchStmt(unsigned I) const {
|
||||
assert(I < NumCatchStmts && "Out-of-bounds @catch index");
|
||||
return cast_or_null<ObjCAtCatchStmt>(getStmts()[I + 1]);
|
||||
}
|
||||
|
||||
|
||||
/// Retrieve a \@catch statement.
|
||||
ObjCAtCatchStmt *getCatchStmt(unsigned I) {
|
||||
assert(I < NumCatchStmts && "Out-of-bounds @catch index");
|
||||
return cast_or_null<ObjCAtCatchStmt>(getStmts()[I + 1]);
|
||||
}
|
||||
|
||||
|
||||
/// Set a particular catch statement.
|
||||
void setCatchStmt(unsigned I, ObjCAtCatchStmt *S) {
|
||||
assert(I < NumCatchStmts && "Out-of-bounds @catch index");
|
||||
getStmts()[I + 1] = S;
|
||||
}
|
||||
|
||||
|
||||
/// Retrieve the \@finally statement, if any.
|
||||
const ObjCAtFinallyStmt *getFinallyStmt() const {
|
||||
if (!HasFinally)
|
||||
return nullptr;
|
||||
|
||||
|
||||
return cast_or_null<ObjCAtFinallyStmt>(getStmts()[1 + NumCatchStmts]);
|
||||
}
|
||||
ObjCAtFinallyStmt *getFinallyStmt() {
|
||||
if (!HasFinally)
|
||||
return nullptr;
|
||||
|
||||
|
||||
return cast_or_null<ObjCAtFinallyStmt>(getStmts()[1 + NumCatchStmts]);
|
||||
}
|
||||
void setFinallyStmt(Stmt *S) {
|
||||
void setFinallyStmt(Stmt *S) {
|
||||
assert(HasFinally && "@try does not have a @finally slot!");
|
||||
getStmts()[1 + NumCatchStmts] = S;
|
||||
getStmts()[1 + NumCatchStmts] = S;
|
||||
}
|
||||
|
||||
SourceLocation getLocStart() const LLVM_READONLY { return AtTryLoc; }
|
||||
|
|
|
@ -2319,7 +2319,7 @@ class OMPTargetDataDirective : public OMPExecutableDirective {
|
|||
///
|
||||
OMPTargetDataDirective(SourceLocation StartLoc, SourceLocation EndLoc,
|
||||
unsigned NumClauses)
|
||||
: OMPExecutableDirective(this, OMPTargetDataDirectiveClass,
|
||||
: OMPExecutableDirective(this, OMPTargetDataDirectiveClass,
|
||||
OMPD_target_data, StartLoc, EndLoc, NumClauses,
|
||||
1) {}
|
||||
|
||||
|
@ -2328,7 +2328,7 @@ class OMPTargetDataDirective : public OMPExecutableDirective {
|
|||
/// \param NumClauses Number of clauses.
|
||||
///
|
||||
explicit OMPTargetDataDirective(unsigned NumClauses)
|
||||
: OMPExecutableDirective(this, OMPTargetDataDirectiveClass,
|
||||
: OMPExecutableDirective(this, OMPTargetDataDirectiveClass,
|
||||
OMPD_target_data, SourceLocation(),
|
||||
SourceLocation(), NumClauses, 1) {}
|
||||
|
||||
|
@ -3157,7 +3157,7 @@ class OMPDistributeParallelForSimdDirective final : public OMPLoopDirective {
|
|||
unsigned CollapsedNum,
|
||||
unsigned NumClauses)
|
||||
: OMPLoopDirective(this, OMPDistributeParallelForSimdDirectiveClass,
|
||||
OMPD_distribute_parallel_for_simd, StartLoc,
|
||||
OMPD_distribute_parallel_for_simd, StartLoc,
|
||||
EndLoc, CollapsedNum, NumClauses) {}
|
||||
|
||||
/// Build an empty directive.
|
||||
|
@ -3168,7 +3168,7 @@ class OMPDistributeParallelForSimdDirective final : public OMPLoopDirective {
|
|||
explicit OMPDistributeParallelForSimdDirective(unsigned CollapsedNum,
|
||||
unsigned NumClauses)
|
||||
: OMPLoopDirective(this, OMPDistributeParallelForSimdDirectiveClass,
|
||||
OMPD_distribute_parallel_for_simd,
|
||||
OMPD_distribute_parallel_for_simd,
|
||||
SourceLocation(), SourceLocation(), CollapsedNum,
|
||||
NumClauses) {}
|
||||
|
||||
|
@ -3232,7 +3232,7 @@ class OMPDistributeSimdDirective final : public OMPLoopDirective {
|
|||
/// \param CollapsedNum Number of collapsed nested loops.
|
||||
/// \param NumClauses Number of clauses.
|
||||
///
|
||||
explicit OMPDistributeSimdDirective(unsigned CollapsedNum,
|
||||
explicit OMPDistributeSimdDirective(unsigned CollapsedNum,
|
||||
unsigned NumClauses)
|
||||
: OMPLoopDirective(this, OMPDistributeSimdDirectiveClass,
|
||||
OMPD_distribute_simd, SourceLocation(),
|
||||
|
@ -3369,7 +3369,7 @@ class OMPTargetSimdDirective final : public OMPLoopDirective {
|
|||
/// \param NumClauses Number of clauses.
|
||||
///
|
||||
explicit OMPTargetSimdDirective(unsigned CollapsedNum, unsigned NumClauses)
|
||||
: OMPLoopDirective(this, OMPTargetSimdDirectiveClass, OMPD_target_simd,
|
||||
: OMPLoopDirective(this, OMPTargetSimdDirectiveClass, OMPD_target_simd,
|
||||
SourceLocation(),SourceLocation(), CollapsedNum,
|
||||
NumClauses) {}
|
||||
|
||||
|
@ -3425,8 +3425,8 @@ class OMPTeamsDistributeDirective final : public OMPLoopDirective {
|
|||
///
|
||||
OMPTeamsDistributeDirective(SourceLocation StartLoc, SourceLocation EndLoc,
|
||||
unsigned CollapsedNum, unsigned NumClauses)
|
||||
: OMPLoopDirective(this, OMPTeamsDistributeDirectiveClass,
|
||||
OMPD_teams_distribute, StartLoc, EndLoc,
|
||||
: OMPLoopDirective(this, OMPTeamsDistributeDirectiveClass,
|
||||
OMPD_teams_distribute, StartLoc, EndLoc,
|
||||
CollapsedNum, NumClauses) {}
|
||||
|
||||
/// Build an empty directive.
|
||||
|
@ -3567,7 +3567,7 @@ class OMPTeamsDistributeParallelForSimdDirective final
|
|||
unsigned CollapsedNum,
|
||||
unsigned NumClauses)
|
||||
: OMPLoopDirective(this, OMPTeamsDistributeParallelForSimdDirectiveClass,
|
||||
OMPD_teams_distribute_parallel_for_simd, StartLoc,
|
||||
OMPD_teams_distribute_parallel_for_simd, StartLoc,
|
||||
EndLoc, CollapsedNum, NumClauses) {}
|
||||
|
||||
/// Build an empty directive.
|
||||
|
@ -3578,7 +3578,7 @@ class OMPTeamsDistributeParallelForSimdDirective final
|
|||
explicit OMPTeamsDistributeParallelForSimdDirective(unsigned CollapsedNum,
|
||||
unsigned NumClauses)
|
||||
: OMPLoopDirective(this, OMPTeamsDistributeParallelForSimdDirectiveClass,
|
||||
OMPD_teams_distribute_parallel_for_simd,
|
||||
OMPD_teams_distribute_parallel_for_simd,
|
||||
SourceLocation(), SourceLocation(), CollapsedNum,
|
||||
NumClauses) {}
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ public:
|
|||
|
||||
/// Determine whether this template argument is a pack expansion.
|
||||
bool isPackExpansion() const;
|
||||
|
||||
|
||||
/// Retrieve the type for a type template argument.
|
||||
QualType getAsType() const {
|
||||
assert(getKind() == Type && "Unexpected kind");
|
||||
|
@ -288,14 +288,14 @@ public:
|
|||
TemplateName getAsTemplateOrTemplatePattern() const {
|
||||
assert((getKind() == Template || getKind() == TemplateExpansion) &&
|
||||
"Unexpected kind");
|
||||
|
||||
|
||||
return TemplateName::getFromVoidPointer(TemplateArg.Name);
|
||||
}
|
||||
|
||||
/// Retrieve the number of expansions that a template template argument
|
||||
/// expansion will produce, if known.
|
||||
Optional<unsigned> getNumTemplateExpansions() const;
|
||||
|
||||
|
||||
/// Retrieve the template argument as an integral value.
|
||||
// FIXME: Provide a way to read the integral data without copying the value.
|
||||
llvm::APSInt getAsIntegral() const {
|
||||
|
@ -378,13 +378,13 @@ public:
|
|||
|
||||
/// Print this template argument to the given output stream.
|
||||
void print(const PrintingPolicy &Policy, raw_ostream &Out) const;
|
||||
|
||||
|
||||
/// Debugging aid that dumps the template argument.
|
||||
void dump(raw_ostream &Out) const;
|
||||
|
||||
/// Debugging aid that dumps the template argument to standard error.
|
||||
void dump() const;
|
||||
|
||||
|
||||
/// Used to insert TemplateArguments into FoldingSets.
|
||||
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) const;
|
||||
};
|
||||
|
@ -411,9 +411,9 @@ public:
|
|||
constexpr TemplateArgumentLocInfo() : Template({nullptr, nullptr, 0, 0}) {}
|
||||
|
||||
TemplateArgumentLocInfo(TypeSourceInfo *TInfo) : Declarator(TInfo) {}
|
||||
|
||||
|
||||
TemplateArgumentLocInfo(Expr *E) : Expression(E) {}
|
||||
|
||||
|
||||
TemplateArgumentLocInfo(NestedNameSpecifierLoc QualifierLoc,
|
||||
SourceLocation TemplateNameLoc,
|
||||
SourceLocation EllipsisLoc) {
|
||||
|
@ -432,14 +432,14 @@ public:
|
|||
}
|
||||
|
||||
NestedNameSpecifierLoc getTemplateQualifierLoc() const {
|
||||
return NestedNameSpecifierLoc(Template.Qualifier,
|
||||
return NestedNameSpecifierLoc(Template.Qualifier,
|
||||
Template.QualifierLocData);
|
||||
}
|
||||
|
||||
|
||||
SourceLocation getTemplateNameLoc() const {
|
||||
return SourceLocation::getFromRawEncoding(Template.TemplateNameLoc);
|
||||
}
|
||||
|
||||
|
||||
SourceLocation getTemplateEllipsisLoc() const {
|
||||
return SourceLocation::getFromRawEncoding(Template.EllipsisLoc);
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ public:
|
|||
assert(Argument.getKind() == TemplateArgument::Expression);
|
||||
}
|
||||
|
||||
TemplateArgumentLoc(const TemplateArgument &Argument,
|
||||
TemplateArgumentLoc(const TemplateArgument &Argument,
|
||||
NestedNameSpecifierLoc QualifierLoc,
|
||||
SourceLocation TemplateNameLoc,
|
||||
SourceLocation EllipsisLoc = SourceLocation())
|
||||
|
@ -477,13 +477,13 @@ public:
|
|||
assert(Argument.getKind() == TemplateArgument::Template ||
|
||||
Argument.getKind() == TemplateArgument::TemplateExpansion);
|
||||
}
|
||||
|
||||
|
||||
/// - Fetches the primary location of the argument.
|
||||
SourceLocation getLocation() const {
|
||||
if (Argument.getKind() == TemplateArgument::Template ||
|
||||
Argument.getKind() == TemplateArgument::TemplateExpansion)
|
||||
return getTemplateNameLoc();
|
||||
|
||||
|
||||
return getSourceRange().getBegin();
|
||||
}
|
||||
|
||||
|
@ -528,13 +528,13 @@ public:
|
|||
Argument.getKind() == TemplateArgument::TemplateExpansion);
|
||||
return LocInfo.getTemplateQualifierLoc();
|
||||
}
|
||||
|
||||
|
||||
SourceLocation getTemplateNameLoc() const {
|
||||
assert(Argument.getKind() == TemplateArgument::Template ||
|
||||
Argument.getKind() == TemplateArgument::TemplateExpansion);
|
||||
return LocInfo.getTemplateNameLoc();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SourceLocation getTemplateEllipsisLoc() const {
|
||||
assert(Argument.getKind() == TemplateArgument::TemplateExpansion);
|
||||
return LocInfo.getTemplateEllipsisLoc();
|
||||
|
@ -689,7 +689,7 @@ inline const TemplateArgument &
|
|||
assert(Idx < getNumArgs() && "Template argument out of range");
|
||||
return getArgs()[Idx];
|
||||
}
|
||||
|
||||
|
||||
} // namespace clang
|
||||
|
||||
#endif // LLVM_CLANG_AST_TEMPLATEBASE_H
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <cassert>
|
||||
|
||||
namespace clang {
|
||||
|
||||
|
||||
class ASTContext;
|
||||
class DependentTemplateName;
|
||||
class DiagnosticBuilder;
|
||||
|
@ -38,7 +38,7 @@ class SubstTemplateTemplateParmStorage;
|
|||
class TemplateArgument;
|
||||
class TemplateDecl;
|
||||
class TemplateTemplateParmDecl;
|
||||
|
||||
|
||||
/// Implementation class used to describe either a set of overloaded
|
||||
/// template names or an already-substituted template template parameter pack.
|
||||
class UncommonTemplateNameStorage {
|
||||
|
@ -52,7 +52,7 @@ protected:
|
|||
struct BitsTag {
|
||||
/// A Kind.
|
||||
unsigned Kind : 2;
|
||||
|
||||
|
||||
/// The number of stored templates or template arguments,
|
||||
/// depending on which subclass we have.
|
||||
unsigned Size : 30;
|
||||
|
@ -62,21 +62,21 @@ protected:
|
|||
struct BitsTag Bits;
|
||||
void *PointerAlignment;
|
||||
};
|
||||
|
||||
|
||||
UncommonTemplateNameStorage(Kind kind, unsigned size) {
|
||||
Bits.Kind = kind;
|
||||
Bits.Size = size;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
unsigned size() const { return Bits.Size; }
|
||||
|
||||
|
||||
OverloadedTemplateStorage *getAsOverloadedStorage() {
|
||||
return Bits.Kind == Overloaded
|
||||
? reinterpret_cast<OverloadedTemplateStorage *>(this)
|
||||
? reinterpret_cast<OverloadedTemplateStorage *>(this)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
|
||||
SubstTemplateTemplateParmStorage *getAsSubstTemplateTemplateParm() {
|
||||
return Bits.Kind == SubstTemplateTemplateParm
|
||||
? reinterpret_cast<SubstTemplateTemplateParmStorage *>(this)
|
||||
|
@ -89,13 +89,13 @@ public:
|
|||
: nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/// A structure for storing the information associated with an
|
||||
/// overloaded template name.
|
||||
class OverloadedTemplateStorage : public UncommonTemplateNameStorage {
|
||||
friend class ASTContext;
|
||||
|
||||
OverloadedTemplateStorage(unsigned size)
|
||||
OverloadedTemplateStorage(unsigned size)
|
||||
: UncommonTemplateNameStorage(Overloaded, size) {}
|
||||
|
||||
NamedDecl **getStorage() {
|
||||
|
@ -115,7 +115,7 @@ public:
|
|||
/// A structure for storing an already-substituted template template
|
||||
/// parameter pack.
|
||||
///
|
||||
/// This kind of template names occurs when the parameter pack has been
|
||||
/// This kind of template names occurs when the parameter pack has been
|
||||
/// provided with a template template argument pack in a context where its
|
||||
/// enclosing pack expansion could not be fully expanded.
|
||||
class SubstTemplateTemplateParmPackStorage
|
||||
|
@ -123,25 +123,25 @@ class SubstTemplateTemplateParmPackStorage
|
|||
{
|
||||
TemplateTemplateParmDecl *Parameter;
|
||||
const TemplateArgument *Arguments;
|
||||
|
||||
|
||||
public:
|
||||
SubstTemplateTemplateParmPackStorage(TemplateTemplateParmDecl *Parameter,
|
||||
unsigned Size,
|
||||
unsigned Size,
|
||||
const TemplateArgument *Arguments)
|
||||
: UncommonTemplateNameStorage(SubstTemplateTemplateParmPack, Size),
|
||||
Parameter(Parameter), Arguments(Arguments) {}
|
||||
|
||||
|
||||
/// Retrieve the template template parameter pack being substituted.
|
||||
TemplateTemplateParmDecl *getParameterPack() const {
|
||||
return Parameter;
|
||||
}
|
||||
|
||||
|
||||
/// Retrieve the template template argument pack with which this
|
||||
/// parameter was substituted.
|
||||
TemplateArgument getArgumentPack() const;
|
||||
|
||||
|
||||
void Profile(llvm::FoldingSetNodeID &ID, ASTContext &Context);
|
||||
|
||||
|
||||
static void Profile(llvm::FoldingSetNodeID &ID,
|
||||
ASTContext &Context,
|
||||
TemplateTemplateParmDecl *Parameter,
|
||||
|
@ -193,11 +193,11 @@ public:
|
|||
/// A set of overloaded template declarations.
|
||||
OverloadedTemplate,
|
||||
|
||||
/// A qualified template name, where the qualification is kept
|
||||
/// A qualified template name, where the qualification is kept
|
||||
/// to describe the source code as written.
|
||||
QualifiedTemplate,
|
||||
|
||||
/// A dependent template name that has not been resolved to a
|
||||
/// A dependent template name that has not been resolved to a
|
||||
/// template (or set of templates).
|
||||
DependentTemplate,
|
||||
|
||||
|
@ -205,7 +205,7 @@ public:
|
|||
/// for some other template name.
|
||||
SubstTemplateTemplateParm,
|
||||
|
||||
/// A template template parameter pack that has been substituted for
|
||||
/// A template template parameter pack that has been substituted for
|
||||
/// a template template argument pack, but has not yet been expanded into
|
||||
/// individual arguments.
|
||||
SubstTemplateTemplateParmPack
|
||||
|
@ -221,7 +221,7 @@ public:
|
|||
|
||||
/// Determine whether this template name is NULL.
|
||||
bool isNull() const;
|
||||
|
||||
|
||||
// Get the kind of name that is actually stored.
|
||||
NameKind getKind() const;
|
||||
|
||||
|
@ -243,14 +243,14 @@ public:
|
|||
/// refers to a single template, returns NULL.
|
||||
OverloadedTemplateStorage *getAsOverloadedTemplate() const;
|
||||
|
||||
/// Retrieve the substituted template template parameter, if
|
||||
/// Retrieve the substituted template template parameter, if
|
||||
/// known.
|
||||
///
|
||||
/// \returns The storage for the substituted template template parameter,
|
||||
/// if known. Otherwise, returns NULL.
|
||||
SubstTemplateTemplateParmStorage *getAsSubstTemplateTemplateParm() const;
|
||||
|
||||
/// Retrieve the substituted template template parameter pack, if
|
||||
/// Retrieve the substituted template template parameter pack, if
|
||||
/// known.
|
||||
///
|
||||
/// \returns The storage for the substituted template template parameter pack,
|
||||
|
@ -339,7 +339,7 @@ public:
|
|||
TemplateName getReplacement() const { return Replacement; }
|
||||
|
||||
void Profile(llvm::FoldingSetNodeID &ID);
|
||||
|
||||
|
||||
static void Profile(llvm::FoldingSetNodeID &ID,
|
||||
TemplateTemplateParmDecl *parameter,
|
||||
TemplateName replacement);
|
||||
|
@ -436,7 +436,7 @@ class DependentTemplateName : public llvm::FoldingSetNode {
|
|||
///
|
||||
/// Only valid when the bit on \c Qualifier is clear.
|
||||
const IdentifierInfo *Identifier;
|
||||
|
||||
|
||||
/// The overloaded operator name.
|
||||
///
|
||||
/// Only valid when the bit on \c Qualifier is set.
|
||||
|
@ -453,26 +453,26 @@ class DependentTemplateName : public llvm::FoldingSetNode {
|
|||
|
||||
DependentTemplateName(NestedNameSpecifier *Qualifier,
|
||||
const IdentifierInfo *Identifier)
|
||||
: Qualifier(Qualifier, false), Identifier(Identifier),
|
||||
: Qualifier(Qualifier, false), Identifier(Identifier),
|
||||
CanonicalTemplateName(this) {}
|
||||
|
||||
DependentTemplateName(NestedNameSpecifier *Qualifier,
|
||||
const IdentifierInfo *Identifier,
|
||||
TemplateName Canon)
|
||||
: Qualifier(Qualifier, false), Identifier(Identifier),
|
||||
: Qualifier(Qualifier, false), Identifier(Identifier),
|
||||
CanonicalTemplateName(Canon) {}
|
||||
|
||||
DependentTemplateName(NestedNameSpecifier *Qualifier,
|
||||
OverloadedOperatorKind Operator)
|
||||
: Qualifier(Qualifier, true), Operator(Operator),
|
||||
: Qualifier(Qualifier, true), Operator(Operator),
|
||||
CanonicalTemplateName(this) {}
|
||||
|
||||
|
||||
DependentTemplateName(NestedNameSpecifier *Qualifier,
|
||||
OverloadedOperatorKind Operator,
|
||||
TemplateName Canon)
|
||||
: Qualifier(Qualifier, true), Operator(Operator),
|
||||
: Qualifier(Qualifier, true), Operator(Operator),
|
||||
CanonicalTemplateName(Canon) {}
|
||||
|
||||
|
||||
public:
|
||||
/// Return the nested name specifier that qualifies this name.
|
||||
NestedNameSpecifier *getQualifier() const { return Qualifier.getPointer(); }
|
||||
|
@ -481,22 +481,22 @@ public:
|
|||
bool isIdentifier() const { return !Qualifier.getInt(); }
|
||||
|
||||
/// Returns the identifier to which this template name refers.
|
||||
const IdentifierInfo *getIdentifier() const {
|
||||
const IdentifierInfo *getIdentifier() const {
|
||||
assert(isIdentifier() && "Template name isn't an identifier?");
|
||||
return Identifier;
|
||||
}
|
||||
|
||||
|
||||
/// Determine whether this template name refers to an overloaded
|
||||
/// operator.
|
||||
bool isOverloadedOperator() const { return Qualifier.getInt(); }
|
||||
|
||||
|
||||
/// Return the overloaded operator to which this template name refers.
|
||||
OverloadedOperatorKind getOperator() const {
|
||||
OverloadedOperatorKind getOperator() const {
|
||||
assert(isOverloadedOperator() &&
|
||||
"Template name isn't an overloaded operator?");
|
||||
return Operator;
|
||||
return Operator;
|
||||
}
|
||||
|
||||
|
||||
void Profile(llvm::FoldingSetNodeID &ID) {
|
||||
if (isIdentifier())
|
||||
Profile(ID, getQualifier(), getIdentifier());
|
||||
|
|
|
@ -992,7 +992,7 @@ public:
|
|||
static std::string getAsString(const Type *ty, Qualifiers qs,
|
||||
const PrintingPolicy &Policy);
|
||||
|
||||
std::string getAsString() const;
|
||||
std::string getAsString() const;
|
||||
std::string getAsString(const PrintingPolicy &Policy) const;
|
||||
|
||||
void print(raw_ostream &OS, const PrintingPolicy &Policy,
|
||||
|
@ -2929,7 +2929,7 @@ public:
|
|||
};
|
||||
|
||||
/// Represents an extended address space qualifier where the input address space
|
||||
/// value is dependent. Non-dependent address spaces are not represented with a
|
||||
/// value is dependent. Non-dependent address spaces are not represented with a
|
||||
/// special Type subclass; they are stored on an ExtQuals node as part of a QualType.
|
||||
///
|
||||
/// For example:
|
||||
|
@ -2948,7 +2948,7 @@ class DependentAddressSpaceType : public Type, public llvm::FoldingSetNode {
|
|||
SourceLocation loc;
|
||||
|
||||
DependentAddressSpaceType(const ASTContext &Context, QualType PointeeType,
|
||||
QualType can, Expr *AddrSpaceExpr,
|
||||
QualType can, Expr *AddrSpaceExpr,
|
||||
SourceLocation loc);
|
||||
|
||||
public:
|
||||
|
@ -3267,7 +3267,7 @@ public:
|
|||
Bits = ((unsigned)cc) | (noReturn ? NoReturnMask : 0) |
|
||||
(producesResult ? ProducesResultMask : 0) |
|
||||
(noCallerSavedRegs ? NoCallerSavedRegsMask : 0) |
|
||||
(hasRegParm ? ((regParm + 1) << RegParmOffset) : 0) |
|
||||
(hasRegParm ? ((regParm + 1) << RegParmOffset) : 0) |
|
||||
(NoCfCheck ? NoCfCheckMask : 0);
|
||||
}
|
||||
|
||||
|
@ -5339,7 +5339,7 @@ public:
|
|||
/// with base C and no protocols.
|
||||
///
|
||||
/// 'C<P>' is an unspecialized ObjCObjectType with base C and protocol list [P].
|
||||
/// 'C<C*>' is a specialized ObjCObjectType with type arguments 'C*' and no
|
||||
/// 'C<C*>' is a specialized ObjCObjectType with type arguments 'C*' and no
|
||||
/// protocol list.
|
||||
/// 'C<C*><P>' is a specialized ObjCObjectType with base C, type arguments 'C*',
|
||||
/// and protocol list [P].
|
||||
|
@ -5971,7 +5971,7 @@ inline QualType QualType::getUnqualifiedType() const {
|
|||
|
||||
return QualType(getSplitUnqualifiedTypeImpl(*this).Ty, 0);
|
||||
}
|
||||
|
||||
|
||||
inline SplitQualType QualType::getSplitUnqualifiedType() const {
|
||||
if (!getTypePtr()->getCanonicalTypeInternal().hasLocalQualifiers())
|
||||
return split();
|
||||
|
@ -6446,7 +6446,7 @@ inline bool Type::isIntegralOrEnumerationType() const {
|
|||
if (const auto *ET = dyn_cast<EnumType>(CanonicalType))
|
||||
return IsEnumDeclComplete(ET->getDecl());
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool Type::isBooleanType() const {
|
||||
|
|
|
@ -992,7 +992,7 @@ class ObjCObjectTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
|
|||
return (TypeSourceInfo**)this->getExtraLocalData();
|
||||
}
|
||||
|
||||
// SourceLocations are stored after the type argument information, one for
|
||||
// SourceLocations are stored after the type argument information, one for
|
||||
// each Protocol.
|
||||
SourceLocation *getProtocolLocArray() const {
|
||||
return (SourceLocation*)(getTypeArgLocArray() + getNumTypeArgs());
|
||||
|
@ -1131,11 +1131,11 @@ public:
|
|||
void setNameLoc(SourceLocation Loc) {
|
||||
getLocalData()->NameLoc = Loc;
|
||||
}
|
||||
|
||||
|
||||
SourceRange getLocalSourceRange() const {
|
||||
return SourceRange(getNameLoc(), getNameEndLoc());
|
||||
}
|
||||
|
||||
|
||||
SourceLocation getNameEndLoc() const {
|
||||
return getLocalData()->NameEndLoc;
|
||||
}
|
||||
|
@ -1766,10 +1766,10 @@ public:
|
|||
return range;
|
||||
}
|
||||
|
||||
/// Returns the type before the address space attribute application
|
||||
/// area.
|
||||
/// Returns the type before the address space attribute application
|
||||
/// area.
|
||||
/// int * __attribute__((address_space(11))) *
|
||||
/// ^ ^
|
||||
/// ^ ^
|
||||
QualType getInnerType() const {
|
||||
return this->getTypePtr()->getPointeeType();
|
||||
}
|
||||
|
|
|
@ -56,20 +56,20 @@ namespace llvm {
|
|||
};
|
||||
|
||||
template<> struct DenseMapInfo<clang::CanQualType> {
|
||||
static inline clang::CanQualType getEmptyKey() {
|
||||
return clang::CanQualType();
|
||||
static inline clang::CanQualType getEmptyKey() {
|
||||
return clang::CanQualType();
|
||||
}
|
||||
|
||||
|
||||
static inline clang::CanQualType getTombstoneKey() {
|
||||
using clang::CanQualType;
|
||||
return CanQualType::getFromOpaquePtr(reinterpret_cast<clang::Type *>(-1));
|
||||
}
|
||||
|
||||
|
||||
static unsigned getHashValue(clang::CanQualType Val) {
|
||||
return (unsigned)((uintptr_t)Val.getAsOpaquePtr()) ^
|
||||
((unsigned)((uintptr_t)Val.getAsOpaquePtr() >> 9));
|
||||
}
|
||||
|
||||
|
||||
static bool isEqual(clang::CanQualType LHS, clang::CanQualType RHS) {
|
||||
return LHS == RHS;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ template <unsigned InlineCapacity> class UnresolvedSet :
|
|||
SmallVector<DeclAccessPair, InlineCapacity> Decls;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace clang
|
||||
|
||||
#endif // LLVM_CLANG_AST_UNRESOLVEDSET_H
|
||||
|
|
|
@ -76,15 +76,15 @@ class VTTBuilder {
|
|||
const CXXRecordDecl *MostDerivedClass;
|
||||
|
||||
using VTTVTablesVectorTy = SmallVector<VTTVTable, 64>;
|
||||
|
||||
|
||||
/// The VTT vtables.
|
||||
VTTVTablesVectorTy VTTVTables;
|
||||
|
||||
|
||||
using VTTComponentsVectorTy = SmallVector<VTTComponent, 64>;
|
||||
|
||||
|
||||
/// The VTT components.
|
||||
VTTComponentsVectorTy VTTComponents;
|
||||
|
||||
|
||||
/// The AST record layout of the most derived class.
|
||||
const ASTRecordLayout &MostDerivedClassLayout;
|
||||
|
||||
|
@ -105,35 +105,35 @@ class VTTBuilder {
|
|||
/// Add a vtable pointer to the VTT currently being built.
|
||||
void AddVTablePointer(BaseSubobject Base, uint64_t VTableIndex,
|
||||
const CXXRecordDecl *VTableClass);
|
||||
|
||||
|
||||
/// Lay out the secondary VTTs of the given base subobject.
|
||||
void LayoutSecondaryVTTs(BaseSubobject Base);
|
||||
|
||||
|
||||
/// Lay out the secondary virtual pointers for the given base
|
||||
/// subobject.
|
||||
///
|
||||
/// \param BaseIsMorallyVirtual whether the base subobject is a virtual base
|
||||
/// or a direct or indirect base of a virtual base.
|
||||
void LayoutSecondaryVirtualPointers(BaseSubobject Base,
|
||||
void LayoutSecondaryVirtualPointers(BaseSubobject Base,
|
||||
bool BaseIsMorallyVirtual,
|
||||
uint64_t VTableIndex,
|
||||
const CXXRecordDecl *VTableClass,
|
||||
VisitedVirtualBasesSetTy &VBases);
|
||||
|
||||
|
||||
/// Lay out the secondary virtual pointers for the given base
|
||||
/// subobject.
|
||||
void LayoutSecondaryVirtualPointers(BaseSubobject Base,
|
||||
void LayoutSecondaryVirtualPointers(BaseSubobject Base,
|
||||
uint64_t VTableIndex);
|
||||
|
||||
/// Lay out the VTTs for the virtual base classes of the given
|
||||
/// record declaration.
|
||||
void LayoutVirtualVTTs(const CXXRecordDecl *RD,
|
||||
VisitedVirtualBasesSetTy &VBases);
|
||||
|
||||
|
||||
/// Lay out the VTT for the given subobject, including any
|
||||
/// secondary VTTs, secondary virtual pointers and virtual VTTs.
|
||||
void LayoutVTT(BaseSubobject Base, bool BaseIsVirtual);
|
||||
|
||||
|
||||
public:
|
||||
VTTBuilder(ASTContext &Ctx, const CXXRecordDecl *MostDerivedClass,
|
||||
bool GenerateDefinition);
|
||||
|
@ -142,17 +142,17 @@ public:
|
|||
const VTTComponentsVectorTy &getVTTComponents() const {
|
||||
return VTTComponents;
|
||||
}
|
||||
|
||||
|
||||
// Returns a reference to the VTT vtables.
|
||||
const VTTVTablesVectorTy &getVTTVTables() const {
|
||||
return VTTVTables;
|
||||
}
|
||||
|
||||
|
||||
/// Returns a reference to the sub-VTT indices.
|
||||
const llvm::DenseMap<BaseSubobject, uint64_t> &getSubVTTIndicies() const {
|
||||
return SubVTTIndicies;
|
||||
}
|
||||
|
||||
|
||||
/// Returns a reference to the secondary virtual pointer indices.
|
||||
const llvm::DenseMap<BaseSubobject, uint64_t> &
|
||||
getSecondaryVirtualPointerIndices() const {
|
||||
|
|
|
@ -394,7 +394,7 @@ public:
|
|||
|
||||
/// Return the offset in chars (relative to the vtable address point) where
|
||||
/// the offset of the virtual base that contains the given base is stored,
|
||||
/// otherwise, if no virtual base contains the given class, return 0.
|
||||
/// otherwise, if no virtual base contains the given class, return 0.
|
||||
///
|
||||
/// Base must be a virtual base class or an unambiguous base.
|
||||
CharUnits getVirtualBaseOffsetOffset(const CXXRecordDecl *RD,
|
||||
|
|
|
@ -1247,7 +1247,7 @@ extern const internal::VariadicDynCastAllOfMatcher<Decl, ObjCMethodDecl>
|
|||
objcMethodDecl;
|
||||
|
||||
/// Matches block declarations.
|
||||
///
|
||||
///
|
||||
/// Example matches the declaration of the nameless block printing an input
|
||||
/// integer.
|
||||
///
|
||||
|
@ -2885,7 +2885,7 @@ AST_MATCHER(ObjCMessageExpr, hasKeywordSelector) {
|
|||
AST_MATCHER_P(ObjCMessageExpr, numSelectorArgs, unsigned, N) {
|
||||
return Node.getSelector().getNumArgs() == N;
|
||||
}
|
||||
|
||||
|
||||
/// Matches if the call expression's callee expression matches.
|
||||
///
|
||||
/// Given
|
||||
|
@ -3678,7 +3678,7 @@ AST_POLYMORPHIC_MATCHER_P2(forEachArgumentWithParam,
|
|||
/// \code
|
||||
/// b = ^(int y) { printf("%d", y) };
|
||||
/// \endcode
|
||||
///
|
||||
///
|
||||
/// the matcher blockDecl(hasAnyParameter(hasName("y")))
|
||||
/// matches the declaration of the block b with hasParameter
|
||||
/// matching y.
|
||||
|
@ -5140,7 +5140,7 @@ extern const AstTypeMatcher<AutoType> autoType;
|
|||
/// int j = 42;
|
||||
/// decltype(i + j) result = i + j;
|
||||
/// \endcode
|
||||
/// decltypeType()
|
||||
/// decltypeType()
|
||||
/// matches "decltype(i + j)"
|
||||
extern const AstTypeMatcher<DecltypeType> decltypeType;
|
||||
|
||||
|
@ -6047,8 +6047,8 @@ AST_MATCHER(NamedDecl, hasExternalFormalLinkage) {
|
|||
/// void x(int val) {}
|
||||
/// void y(int val = 0) {}
|
||||
/// \endcode
|
||||
AST_MATCHER(ParmVarDecl, hasDefaultArgument) {
|
||||
return Node.hasDefaultArg();
|
||||
AST_MATCHER(ParmVarDecl, hasDefaultArgument) {
|
||||
return Node.hasDefaultArg();
|
||||
}
|
||||
|
||||
/// Matches array new expressions.
|
||||
|
|
|
@ -38,18 +38,18 @@ class Stmt;
|
|||
class VarDecl;
|
||||
|
||||
namespace consumed {
|
||||
|
||||
|
||||
class ConsumedStmtVisitor;
|
||||
|
||||
enum ConsumedState {
|
||||
// No state information for the given variable.
|
||||
CS_None,
|
||||
|
||||
|
||||
CS_Unknown,
|
||||
CS_Unconsumed,
|
||||
CS_Consumed
|
||||
};
|
||||
|
||||
|
||||
using OptionalNotes = SmallVector<PartialDiagnosticAt, 1>;
|
||||
using DelayedDiag = std::pair<PartialDiagnosticAt, OptionalNotes>;
|
||||
using DiagList = std::list<DelayedDiag>;
|
||||
|
@ -60,7 +60,7 @@ namespace consumed {
|
|||
|
||||
/// Emit the warnings and notes left by the analysis.
|
||||
virtual void emitDiagnostics() {}
|
||||
|
||||
|
||||
/// Warn that a variable's state doesn't match at the entry and exit
|
||||
/// of a loop.
|
||||
///
|
||||
|
@ -70,7 +70,7 @@ namespace consumed {
|
|||
/// state.
|
||||
virtual void warnLoopStateMismatch(SourceLocation Loc,
|
||||
StringRef VariableName) {}
|
||||
|
||||
|
||||
/// Warn about parameter typestate mismatches upon return.
|
||||
///
|
||||
/// \param Loc -- The SourceLocation of the return statement.
|
||||
|
@ -84,22 +84,22 @@ namespace consumed {
|
|||
StringRef VariableName,
|
||||
StringRef ExpectedState,
|
||||
StringRef ObservedState) {}
|
||||
|
||||
|
||||
// FIXME: Add documentation.
|
||||
virtual void warnParamTypestateMismatch(SourceLocation LOC,
|
||||
StringRef ExpectedState,
|
||||
StringRef ObservedState) {}
|
||||
|
||||
|
||||
// FIXME: This can be removed when the attr propagation fix for templated
|
||||
// classes lands.
|
||||
/// Warn about return typestates set for unconsumable types.
|
||||
///
|
||||
///
|
||||
/// \param Loc -- The location of the attributes.
|
||||
///
|
||||
/// \param TypeName -- The name of the unconsumable type.
|
||||
virtual void warnReturnTypestateForUnconsumableType(SourceLocation Loc,
|
||||
StringRef TypeName) {}
|
||||
|
||||
|
||||
/// Warn about return typestate mismatches.
|
||||
///
|
||||
/// \param Loc -- The SourceLocation of the return statement.
|
||||
|
@ -144,71 +144,71 @@ namespace consumed {
|
|||
using VarMapType = llvm::DenseMap<const VarDecl *, ConsumedState>;
|
||||
using TmpMapType =
|
||||
llvm::DenseMap<const CXXBindTemporaryExpr *, ConsumedState>;
|
||||
|
||||
|
||||
protected:
|
||||
bool Reachable = true;
|
||||
const Stmt *From = nullptr;
|
||||
VarMapType VarMap;
|
||||
TmpMapType TmpMap;
|
||||
|
||||
|
||||
public:
|
||||
ConsumedStateMap() = default;
|
||||
ConsumedStateMap(const ConsumedStateMap &Other)
|
||||
: Reachable(Other.Reachable), From(Other.From), VarMap(Other.VarMap),
|
||||
TmpMap() {}
|
||||
|
||||
|
||||
/// Warn if any of the parameters being tracked are not in the state
|
||||
/// they were declared to be in upon return from a function.
|
||||
void checkParamsForReturnTypestate(SourceLocation BlameLoc,
|
||||
ConsumedWarningsHandlerBase &WarningsHandler) const;
|
||||
|
||||
|
||||
/// Clear the TmpMap.
|
||||
void clearTemporaries();
|
||||
|
||||
|
||||
/// Get the consumed state of a given variable.
|
||||
ConsumedState getState(const VarDecl *Var) const;
|
||||
|
||||
|
||||
/// Get the consumed state of a given temporary value.
|
||||
ConsumedState getState(const CXXBindTemporaryExpr *Tmp) const;
|
||||
|
||||
|
||||
/// Merge this state map with another map.
|
||||
void intersect(const ConsumedStateMap &Other);
|
||||
|
||||
void intersectAtLoopHead(const CFGBlock *LoopHead, const CFGBlock *LoopBack,
|
||||
const ConsumedStateMap *LoopBackStates,
|
||||
ConsumedWarningsHandlerBase &WarningsHandler);
|
||||
|
||||
|
||||
/// Return true if this block is reachable.
|
||||
bool isReachable() const { return Reachable; }
|
||||
|
||||
|
||||
/// Mark the block as unreachable.
|
||||
void markUnreachable();
|
||||
|
||||
|
||||
/// Set the source for a decision about the branching of states.
|
||||
/// \param Source -- The statement that was the origin of a branching
|
||||
/// decision.
|
||||
void setSource(const Stmt *Source) { this->From = Source; }
|
||||
|
||||
|
||||
/// Set the consumed state of a given variable.
|
||||
void setState(const VarDecl *Var, ConsumedState State);
|
||||
|
||||
|
||||
/// Set the consumed state of a given temporary value.
|
||||
void setState(const CXXBindTemporaryExpr *Tmp, ConsumedState State);
|
||||
|
||||
|
||||
/// Remove the temporary value from our state map.
|
||||
void remove(const CXXBindTemporaryExpr *Tmp);
|
||||
|
||||
|
||||
/// Tests to see if there is a mismatch in the states stored in two
|
||||
/// maps.
|
||||
///
|
||||
/// \param Other -- The second map to compare against.
|
||||
bool operator!=(const ConsumedStateMap *Other) const;
|
||||
};
|
||||
|
||||
|
||||
class ConsumedBlockInfo {
|
||||
std::vector<std::unique_ptr<ConsumedStateMap>> StateMapsArray;
|
||||
std::vector<unsigned int> VisitOrder;
|
||||
|
||||
|
||||
public:
|
||||
ConsumedBlockInfo() = default;
|
||||
|
||||
|
@ -218,7 +218,7 @@ namespace consumed {
|
|||
for (const auto BI : *SortedGraph)
|
||||
VisitOrder[BI->getBlockID()] = VisitOrderCounter++;
|
||||
}
|
||||
|
||||
|
||||
bool allBackEdgesVisited(const CFGBlock *CurrBlock,
|
||||
const CFGBlock *TargetBlock);
|
||||
|
||||
|
@ -228,7 +228,7 @@ namespace consumed {
|
|||
std::unique_ptr<ConsumedStateMap> StateMap);
|
||||
|
||||
ConsumedStateMap* borrowInfo(const CFGBlock *Block);
|
||||
|
||||
|
||||
void discardInfo(const CFGBlock *Block);
|
||||
|
||||
std::unique_ptr<ConsumedStateMap> getInfo(const CFGBlock *Block);
|
||||
|
@ -243,12 +243,12 @@ namespace consumed {
|
|||
std::unique_ptr<ConsumedStateMap> CurrStates;
|
||||
|
||||
ConsumedState ExpectedReturnState;
|
||||
|
||||
|
||||
void determineExpectedReturnState(AnalysisDeclContext &AC,
|
||||
const FunctionDecl *D);
|
||||
bool splitState(const CFGBlock *CurrBlock,
|
||||
const ConsumedStmtVisitor &Visitor);
|
||||
|
||||
|
||||
public:
|
||||
ConsumedWarningsHandlerBase &WarningsHandler;
|
||||
|
||||
|
@ -256,7 +256,7 @@ namespace consumed {
|
|||
: WarningsHandler(WarningsHandler) {}
|
||||
|
||||
ConsumedState getExpectedReturnState() const { return ExpectedReturnState; }
|
||||
|
||||
|
||||
/// Check a function's CFG for consumed violations.
|
||||
///
|
||||
/// We traverse the blocks in the CFG, keeping track of the state of each
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "llvm/ADT/GraphTraits.h"
|
||||
#include "llvm/ADT/iterator.h"
|
||||
#include "llvm/Support/GenericDomTree.h"
|
||||
#include "llvm/Support/GenericDomTreeConstruction.h"
|
||||
#include "llvm/Support/GenericDomTreeConstruction.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
// FIXME: There is no good reason for the domtree to require a print method
|
||||
|
|
|
@ -236,7 +236,7 @@ public:
|
|||
const char *toString() const;
|
||||
|
||||
bool isPrintfKind() const { return IsPrintf; }
|
||||
|
||||
|
||||
Optional<ConversionSpecifier> getStandardSpecifier() const;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -25,7 +25,7 @@ class CFGBlock;
|
|||
class Stmt;
|
||||
class DeclRefExpr;
|
||||
class SourceManager;
|
||||
|
||||
|
||||
class LiveVariables : public ManagedAnalysis {
|
||||
public:
|
||||
class LivenessValues {
|
||||
|
@ -34,7 +34,7 @@ public:
|
|||
llvm::ImmutableSet<const Stmt *> liveStmts;
|
||||
llvm::ImmutableSet<const VarDecl *> liveDecls;
|
||||
llvm::ImmutableSet<const BindingDecl *> liveBindings;
|
||||
|
||||
|
||||
bool equals(const LivenessValues &V) const;
|
||||
|
||||
LivenessValues()
|
||||
|
@ -48,21 +48,21 @@ public:
|
|||
|
||||
bool isLive(const Stmt *S) const;
|
||||
bool isLive(const VarDecl *D) const;
|
||||
|
||||
friend class LiveVariables;
|
||||
|
||||
friend class LiveVariables;
|
||||
};
|
||||
|
||||
|
||||
class Observer {
|
||||
virtual void anchor();
|
||||
public:
|
||||
virtual ~Observer() {}
|
||||
|
||||
|
||||
/// A callback invoked right before invoking the
|
||||
/// liveness transfer function on the given statement.
|
||||
virtual void observeStmt(const Stmt *S,
|
||||
const CFGBlock *currentBlock,
|
||||
const LivenessValues& V) {}
|
||||
|
||||
|
||||
/// Called when the live variables analysis registers
|
||||
/// that a variable is killed.
|
||||
virtual void observerKill(const DeclRefExpr *DR) {}
|
||||
|
@ -73,47 +73,47 @@ public:
|
|||
/// Compute the liveness information for a given CFG.
|
||||
static LiveVariables *computeLiveness(AnalysisDeclContext &analysisContext,
|
||||
bool killAtAssign);
|
||||
|
||||
|
||||
/// Return true if a variable is live at the end of a
|
||||
/// specified block.
|
||||
bool isLive(const CFGBlock *B, const VarDecl *D);
|
||||
|
||||
|
||||
/// Returns true if a variable is live at the beginning of the
|
||||
/// the statement. This query only works if liveness information
|
||||
/// has been recorded at the statement level (see runOnAllBlocks), and
|
||||
/// only returns liveness information for block-level expressions.
|
||||
bool isLive(const Stmt *S, const VarDecl *D);
|
||||
|
||||
|
||||
/// Returns true the block-level expression "value" is live
|
||||
/// before the given block-level expression (see runOnAllBlocks).
|
||||
bool isLive(const Stmt *Loc, const Stmt *StmtVal);
|
||||
|
||||
|
||||
/// Print to stderr the liveness information associated with
|
||||
/// each basic block.
|
||||
void dumpBlockLiveness(const SourceManager& M);
|
||||
|
||||
void runOnAllBlocks(Observer &obs);
|
||||
|
||||
|
||||
static LiveVariables *create(AnalysisDeclContext &analysisContext) {
|
||||
return computeLiveness(analysisContext, true);
|
||||
}
|
||||
|
||||
|
||||
static const void *getTag();
|
||||
|
||||
|
||||
private:
|
||||
LiveVariables(void *impl);
|
||||
void *impl;
|
||||
};
|
||||
|
||||
|
||||
class RelaxedLiveVariables : public LiveVariables {
|
||||
public:
|
||||
static LiveVariables *create(AnalysisDeclContext &analysisContext) {
|
||||
return computeLiveness(analysisContext, false);
|
||||
}
|
||||
|
||||
|
||||
static const void *getTag();
|
||||
};
|
||||
|
||||
|
||||
} // end namespace clang
|
||||
|
||||
#endif
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
};
|
||||
|
||||
/// ScanReachableFromBlock - Mark all blocks reachable from Start.
|
||||
/// Returns the total number of blocks that were marked reachable.
|
||||
/// Returns the total number of blocks that were marked reachable.
|
||||
unsigned ScanReachableFromBlock(const CFGBlock *Start,
|
||||
llvm::BitVector &Reachable);
|
||||
|
||||
|
|
|
@ -500,7 +500,7 @@ private:
|
|||
std::vector<til::BasicBlock *> BlockMap;
|
||||
|
||||
// Extra information per BB. Indexed by clang BlockID.
|
||||
std::vector<BlockInfo> BBInfo;
|
||||
std::vector<BlockInfo> BBInfo;
|
||||
|
||||
LVarDefinitionMap CurrentLVarMap;
|
||||
std::vector<til::Phi *> CurrentArguments;
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
AnalysisDeclContextManager *getManager() const {
|
||||
return Manager;
|
||||
}
|
||||
|
||||
|
||||
/// Return the build options used to construct the CFG.
|
||||
CFG::BuildOptions &getCFGBuildOptions() {
|
||||
return cfgBuildOptions;
|
||||
|
@ -190,7 +190,7 @@ public:
|
|||
const Stmt *S,
|
||||
const CFGBlock *Blk,
|
||||
unsigned Idx);
|
||||
|
||||
|
||||
const BlockInvocationContext *
|
||||
getBlockInvocationContext(const LocationContext *parent,
|
||||
const BlockDecl *BD,
|
||||
|
@ -359,7 +359,7 @@ class BlockInvocationContext : public LocationContext {
|
|||
friend class LocationContextManager;
|
||||
|
||||
const BlockDecl *BD;
|
||||
|
||||
|
||||
// FIXME: Come up with a more type-safe way to model context-sensitivity.
|
||||
const void *ContextData;
|
||||
|
||||
|
@ -372,7 +372,7 @@ public:
|
|||
~BlockInvocationContext() override = default;
|
||||
|
||||
const BlockDecl *getBlockDecl() const { return BD; }
|
||||
|
||||
|
||||
const void *getContextData() const { return ContextData; }
|
||||
|
||||
void Profile(llvm::FoldingSetNodeID &ID) override;
|
||||
|
@ -403,7 +403,7 @@ public:
|
|||
const ScopeContext *getScope(AnalysisDeclContext *ctx,
|
||||
const LocationContext *parent,
|
||||
const Stmt *s);
|
||||
|
||||
|
||||
const BlockInvocationContext *
|
||||
getBlockInvocationContext(AnalysisDeclContext *ctx,
|
||||
const LocationContext *parent,
|
||||
|
@ -463,7 +463,7 @@ public:
|
|||
CFG::BuildOptions &getCFGBuildOptions() {
|
||||
return cfgBuildOptions;
|
||||
}
|
||||
|
||||
|
||||
/// Return true if faux bodies should be synthesized for well-known
|
||||
/// functions.
|
||||
bool synthesizeBodies() const { return SynthesizeBodies; }
|
||||
|
|
|
@ -332,7 +332,7 @@ struct FilenamePatternConstraint {
|
|||
StringRef IgnoredFilesPattern;
|
||||
std::shared_ptr<llvm::Regex> IgnoredFilesRegex;
|
||||
|
||||
FilenamePatternConstraint(StringRef IgnoredFilesPattern)
|
||||
FilenamePatternConstraint(StringRef IgnoredFilesPattern)
|
||||
: IgnoredFilesPattern(IgnoredFilesPattern) {
|
||||
IgnoredFilesRegex = std::make_shared<llvm::Regex>("^(" +
|
||||
IgnoredFilesPattern.str() + "$)");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements cocoa naming convention analysis.
|
||||
// This file implements cocoa naming convention analysis.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
|
@ -20,20 +20,20 @@
|
|||
namespace clang {
|
||||
class FunctionDecl;
|
||||
class QualType;
|
||||
|
||||
|
||||
namespace ento {
|
||||
namespace cocoa {
|
||||
|
||||
|
||||
bool isRefType(QualType RetTy, StringRef Prefix,
|
||||
StringRef Name = StringRef());
|
||||
|
||||
|
||||
bool isCocoaObjectRef(QualType T);
|
||||
|
||||
}
|
||||
|
||||
namespace coreFoundation {
|
||||
bool isCFObjectRef(QualType T);
|
||||
|
||||
|
||||
bool followsCreateRule(const FunctionDecl *FD);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace clang {
|
|||
|
||||
class ASTContext;
|
||||
class ObjCMessageExpr;
|
||||
|
||||
|
||||
class ObjCNoReturn {
|
||||
/// Cached "raise" selector.
|
||||
Selector RaiseSel;
|
||||
|
@ -36,7 +36,7 @@ class ObjCNoReturn {
|
|||
|
||||
public:
|
||||
ObjCNoReturn(ASTContext &C);
|
||||
|
||||
|
||||
/// Return true if the given message expression is known to never
|
||||
/// return.
|
||||
bool isImplicitNoReturn(const ObjCMessageExpr *ME);
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace clang {
|
|||
class AnalysisDeclContext;
|
||||
class FunctionDecl;
|
||||
class LocationContext;
|
||||
|
||||
|
||||
/// ProgramPoints can be "tagged" as representing points specific to a given
|
||||
/// analysis entity. Tags are abstract annotations, with an associated
|
||||
/// description and potentially other information.
|
||||
|
@ -41,12 +41,12 @@ class ProgramPointTag {
|
|||
public:
|
||||
ProgramPointTag(void *tagKind = nullptr) : TagKind(tagKind) {}
|
||||
virtual ~ProgramPointTag();
|
||||
virtual StringRef getTagDescription() const = 0;
|
||||
virtual StringRef getTagDescription() const = 0;
|
||||
|
||||
protected:
|
||||
/// Used to implement 'isKind' in subclasses.
|
||||
const void *getTagKind() { return TagKind; }
|
||||
|
||||
|
||||
private:
|
||||
const void *TagKind;
|
||||
};
|
||||
|
@ -111,7 +111,7 @@ protected:
|
|||
assert(getLocationContext() == l);
|
||||
assert(getData1() == P);
|
||||
}
|
||||
|
||||
|
||||
ProgramPoint(const void *P1,
|
||||
const void *P2,
|
||||
Kind k,
|
||||
|
@ -223,7 +223,7 @@ class BlockEntrance : public ProgramPoint {
|
|||
public:
|
||||
BlockEntrance(const CFGBlock *B, const LocationContext *L,
|
||||
const ProgramPointTag *tag = nullptr)
|
||||
: ProgramPoint(B, BlockEntranceKind, L, tag) {
|
||||
: ProgramPoint(B, BlockEntranceKind, L, tag) {
|
||||
assert(B && "BlockEntrance requires non-null block");
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ public:
|
|||
const CFGBlock *B = getBlock();
|
||||
return B->empty() ? Optional<CFGElement>() : B->front();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
friend class ProgramPoint;
|
||||
BlockEntrance() = default;
|
||||
|
@ -350,7 +350,7 @@ protected:
|
|||
LocationCheck(const Stmt *S, const LocationContext *L,
|
||||
ProgramPoint::Kind K, const ProgramPointTag *tag)
|
||||
: StmtPoint(S, nullptr, K, L, tag) {}
|
||||
|
||||
|
||||
private:
|
||||
friend class ProgramPoint;
|
||||
static bool isKind(const ProgramPoint &location) {
|
||||
|
@ -358,13 +358,13 @@ private:
|
|||
return k == PreLoadKind || k == PreStoreKind;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class PreLoad : public LocationCheck {
|
||||
public:
|
||||
PreLoad(const Stmt *S, const LocationContext *L,
|
||||
const ProgramPointTag *tag = nullptr)
|
||||
: LocationCheck(S, L, PreLoadKind, tag) {}
|
||||
|
||||
|
||||
private:
|
||||
friend class ProgramPoint;
|
||||
PreLoad() = default;
|
||||
|
@ -378,7 +378,7 @@ public:
|
|||
PreStore(const Stmt *S, const LocationContext *L,
|
||||
const ProgramPointTag *tag = nullptr)
|
||||
: LocationCheck(S, L, PreStoreKind, tag) {}
|
||||
|
||||
|
||||
private:
|
||||
friend class ProgramPoint;
|
||||
PreStore() = default;
|
||||
|
@ -405,7 +405,7 @@ private:
|
|||
class PostStore : public PostStmt {
|
||||
public:
|
||||
/// Construct the post store point.
|
||||
/// \param Loc can be used to store the information about the location
|
||||
/// \param Loc can be used to store the information about the location
|
||||
/// used in the form it was uttered in the code.
|
||||
PostStore(const Stmt *S, const LocationContext *L, const void *Loc,
|
||||
const ProgramPointTag *tag = nullptr)
|
||||
|
@ -479,7 +479,7 @@ public:
|
|||
BlockEdge(const CFGBlock *B1, const CFGBlock *B2, const LocationContext *L)
|
||||
: ProgramPoint(B1, B2, BlockEdgeKind, L) {
|
||||
assert(B1 && "BlockEdge: source block must be non-null");
|
||||
assert(B2 && "BlockEdge: destination block must be non-null");
|
||||
assert(B2 && "BlockEdge: destination block must be non-null");
|
||||
}
|
||||
|
||||
const CFGBlock *getSrc() const {
|
||||
|
@ -603,7 +603,7 @@ private:
|
|||
/// CallEnter uses the caller's location context.
|
||||
class CallEnter : public ProgramPoint {
|
||||
public:
|
||||
CallEnter(const Stmt *stmt, const StackFrameContext *calleeCtx,
|
||||
CallEnter(const Stmt *stmt, const StackFrameContext *calleeCtx,
|
||||
const LocationContext *callerCtx)
|
||||
: ProgramPoint(stmt, calleeCtx, CallEnterKind, callerCtx, nullptr) {}
|
||||
|
||||
|
@ -749,7 +749,7 @@ static bool isEqual(const clang::ProgramPoint &L,
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
template <>
|
||||
struct isPodLike<clang::ProgramPoint> { static const bool value = true; };
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <type_traits>
|
||||
|
||||
namespace clang {
|
||||
|
||||
|
||||
class BumpVectorContext {
|
||||
llvm::PointerIntPair<llvm::BumpPtrAllocator*, 1> Alloc;
|
||||
|
||||
|
@ -47,15 +47,15 @@ public:
|
|||
/// BumpPtrAllocator. This BumpPtrAllocator is not destroyed when the
|
||||
/// BumpVectorContext object is destroyed.
|
||||
BumpVectorContext(llvm::BumpPtrAllocator &A) : Alloc(&A, 0) {}
|
||||
|
||||
|
||||
~BumpVectorContext() {
|
||||
if (Alloc.getInt())
|
||||
delete Alloc.getPointer();
|
||||
}
|
||||
|
||||
|
||||
llvm::BumpPtrAllocator &getAllocator() { return *Alloc.getPointer(); }
|
||||
};
|
||||
|
||||
|
||||
template<typename T>
|
||||
class BumpVector {
|
||||
T *Begin = nullptr;
|
||||
|
@ -67,34 +67,34 @@ public:
|
|||
explicit BumpVector(BumpVectorContext &C, unsigned N) {
|
||||
reserve(C, N);
|
||||
}
|
||||
|
||||
|
||||
~BumpVector() {
|
||||
if (std::is_class<T>::value) {
|
||||
// Destroy the constructed elements in the vector.
|
||||
destroy_range(Begin, End);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using size_type = size_t;
|
||||
using difference_type = ptrdiff_t;
|
||||
using value_type = T;
|
||||
using iterator = T *;
|
||||
using const_iterator = const T *;
|
||||
|
||||
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
|
||||
|
||||
using reference = T &;
|
||||
using const_reference = const T &;
|
||||
using pointer = T *;
|
||||
using const_pointer = const T *;
|
||||
|
||||
|
||||
// forward iterator creation methods.
|
||||
iterator begin() { return Begin; }
|
||||
const_iterator begin() const { return Begin; }
|
||||
iterator end() { return End; }
|
||||
const_iterator end() const { return End; }
|
||||
|
||||
|
||||
// reverse iterator creation methods.
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); }
|
||||
|
@ -102,7 +102,7 @@ public:
|
|||
const_reverse_iterator rend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
|
||||
bool empty() const { return Begin == End; }
|
||||
size_type size() const { return End-Begin; }
|
||||
|
||||
|
@ -114,49 +114,49 @@ public:
|
|||
assert(Begin + idx < End);
|
||||
return Begin[idx];
|
||||
}
|
||||
|
||||
|
||||
reference front() {
|
||||
return begin()[0];
|
||||
}
|
||||
const_reference front() const {
|
||||
return begin()[0];
|
||||
}
|
||||
|
||||
|
||||
reference back() {
|
||||
return end()[-1];
|
||||
}
|
||||
const_reference back() const {
|
||||
return end()[-1];
|
||||
}
|
||||
|
||||
|
||||
void pop_back() {
|
||||
--End;
|
||||
End->~T();
|
||||
}
|
||||
|
||||
|
||||
T pop_back_val() {
|
||||
T Result = back();
|
||||
pop_back();
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
void clear() {
|
||||
if (std::is_class<T>::value) {
|
||||
destroy_range(Begin, End);
|
||||
}
|
||||
End = Begin;
|
||||
}
|
||||
|
||||
|
||||
/// data - Return a pointer to the vector's buffer, even if empty().
|
||||
pointer data() {
|
||||
return pointer(Begin);
|
||||
}
|
||||
|
||||
|
||||
/// data - Return a pointer to the vector's buffer, even if empty().
|
||||
const_pointer data() const {
|
||||
return const_pointer(Begin);
|
||||
}
|
||||
|
||||
|
||||
void push_back(const_reference Elt, BumpVectorContext &C) {
|
||||
if (End < Capacity) {
|
||||
Retry:
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
return;
|
||||
}
|
||||
grow(C);
|
||||
goto Retry;
|
||||
goto Retry;
|
||||
}
|
||||
|
||||
/// insert - Insert some number of copies of element into a position. Return
|
||||
|
@ -193,18 +193,18 @@ public:
|
|||
|
||||
/// capacity - Return the total number of elements in the currently allocated
|
||||
/// buffer.
|
||||
size_t capacity() const { return Capacity - Begin; }
|
||||
|
||||
size_t capacity() const { return Capacity - Begin; }
|
||||
|
||||
private:
|
||||
/// grow - double the size of the allocated memory, guaranteeing space for at
|
||||
/// least one more element or MinSize if specified.
|
||||
void grow(BumpVectorContext &C, size_type MinSize = 1);
|
||||
|
||||
|
||||
void construct_range(T *S, T *E, const T &Elt) {
|
||||
for (; S != E; ++S)
|
||||
new (S) T(Elt);
|
||||
}
|
||||
|
||||
|
||||
void destroy_range(T *S, T *E) {
|
||||
while (S != E) {
|
||||
--E;
|
||||
|
@ -220,7 +220,7 @@ private:
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Define this out-of-line to dissuade the C++ compiler from inlining it.
|
||||
template <typename T>
|
||||
void BumpVector<T>::grow(BumpVectorContext &C, size_t MinSize) {
|
||||
|
@ -232,7 +232,7 @@ void BumpVector<T>::grow(BumpVectorContext &C, size_t MinSize) {
|
|||
|
||||
// Allocate the memory from the BumpPtrAllocator.
|
||||
T *NewElts = C.getAllocator().template Allocate<T>(NewCapacity);
|
||||
|
||||
|
||||
// Copy the elements over.
|
||||
if (Begin != End) {
|
||||
if (std::is_class<T>::value) {
|
||||
|
|
|
@ -81,12 +81,12 @@ struct ReturnAdjustment {
|
|||
return memcmp(this, &RHS, sizeof(RHS)) < 0;
|
||||
}
|
||||
} Virtual;
|
||||
|
||||
|
||||
ReturnAdjustment() : NonVirtual(0) {}
|
||||
|
||||
|
||||
bool isEmpty() const { return !NonVirtual && Virtual.isEmpty(); }
|
||||
|
||||
friend bool operator==(const ReturnAdjustment &LHS,
|
||||
friend bool operator==(const ReturnAdjustment &LHS,
|
||||
const ReturnAdjustment &RHS) {
|
||||
return LHS.NonVirtual == RHS.NonVirtual && LHS.Virtual.Equals(RHS.Virtual);
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ struct ReturnAdjustment {
|
|||
return LHS.NonVirtual == RHS.NonVirtual && LHS.Virtual.Less(RHS.Virtual);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/// A \c this pointer adjustment.
|
||||
struct ThisAdjustment {
|
||||
/// The non-virtual adjustment from the derived object to its
|
||||
|
@ -149,12 +149,12 @@ struct ThisAdjustment {
|
|||
return memcmp(this, &RHS, sizeof(RHS)) < 0;
|
||||
}
|
||||
} Virtual;
|
||||
|
||||
|
||||
ThisAdjustment() : NonVirtual(0) { }
|
||||
|
||||
bool isEmpty() const { return !NonVirtual && Virtual.isEmpty(); }
|
||||
|
||||
friend bool operator==(const ThisAdjustment &LHS,
|
||||
friend bool operator==(const ThisAdjustment &LHS,
|
||||
const ThisAdjustment &RHS) {
|
||||
return LHS.NonVirtual == RHS.NonVirtual && LHS.Virtual.Equals(RHS.Virtual);
|
||||
}
|
||||
|
@ -162,12 +162,12 @@ struct ThisAdjustment {
|
|||
friend bool operator!=(const ThisAdjustment &LHS, const ThisAdjustment &RHS) {
|
||||
return !(LHS == RHS);
|
||||
}
|
||||
|
||||
|
||||
friend bool operator<(const ThisAdjustment &LHS,
|
||||
const ThisAdjustment &RHS) {
|
||||
if (LHS.NonVirtual < RHS.NonVirtual)
|
||||
return true;
|
||||
|
||||
|
||||
return LHS.NonVirtual == RHS.NonVirtual && LHS.Virtual.Less(RHS.Virtual);
|
||||
}
|
||||
};
|
||||
|
@ -179,7 +179,7 @@ class CXXMethodDecl;
|
|||
struct ThunkInfo {
|
||||
/// The \c this pointer adjustment.
|
||||
ThisAdjustment This;
|
||||
|
||||
|
||||
/// The return adjustment.
|
||||
ReturnAdjustment Return;
|
||||
|
||||
|
@ -204,7 +204,7 @@ struct ThunkInfo {
|
|||
bool isEmpty() const {
|
||||
return This.isEmpty() && Return.isEmpty() && Method == nullptr;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
} // end namespace clang
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@ class StringSizerHelper {
|
|||
public:
|
||||
enum { Size = SizeOfStr };
|
||||
};
|
||||
} // end namespace clang
|
||||
} // end namespace clang
|
||||
|
||||
#define STR_SIZE(str, fieldTy) clang::StringSizerHelper<sizeof(str)-1, \
|
||||
fieldTy>::Size
|
||||
fieldTy>::Size
|
||||
|
||||
#endif
|
||||
|
|
|
@ -456,7 +456,7 @@ class Attr {
|
|||
// Set to true if all of the attribute's arguments should be parsed in an
|
||||
// unevaluated context.
|
||||
bit ParseArgumentsAsUnevaluated = 0;
|
||||
// Set to true if this attribute meaningful when applied to or inherited
|
||||
// Set to true if this attribute meaningful when applied to or inherited
|
||||
// in a class template definition.
|
||||
bit MeaningfulToClassTemplateDefinition = 0;
|
||||
// Set to true if this attribute can be used with '#pragma clang attribute'.
|
||||
|
@ -583,7 +583,7 @@ def AlignValue : Attr {
|
|||
// the future (and a corresponding C++ attribute), but this can be done
|
||||
// later once we decide if we also want them to have slightly-different
|
||||
// semantics than Intel's align_value.
|
||||
//
|
||||
//
|
||||
// Does not get a [[]] spelling because the attribute is not exposed as such
|
||||
// by Intel.
|
||||
GNU<"align_value">
|
||||
|
@ -1703,7 +1703,7 @@ def Overloadable : Attr {
|
|||
let Documentation = [OverloadableDocs];
|
||||
}
|
||||
|
||||
def Override : InheritableAttr {
|
||||
def Override : InheritableAttr {
|
||||
let Spellings = [Keyword<"override">];
|
||||
let SemaHandler = 0;
|
||||
let Documentation = [Undocumented];
|
||||
|
@ -1782,7 +1782,7 @@ def RequireConstantInit : InheritableAttr {
|
|||
def WorkGroupSizeHint : InheritableAttr {
|
||||
// Does not have a [[]] spelling because it is an OpenCL-related attribute.
|
||||
let Spellings = [GNU<"work_group_size_hint">];
|
||||
let Args = [UnsignedArgument<"XDim">,
|
||||
let Args = [UnsignedArgument<"XDim">,
|
||||
UnsignedArgument<"YDim">,
|
||||
UnsignedArgument<"ZDim">];
|
||||
let Subjects = SubjectList<[Function], ErrorDiag>;
|
||||
|
|
|
@ -956,7 +956,7 @@ LIBBUILTIN(strlcpy, "zc*cC*z", "f", "string.h", ALL_GNU_LANGUAGES)
|
|||
LIBBUILTIN(strlcat, "zc*cC*z", "f", "string.h", ALL_GNU_LANGUAGES)
|
||||
// id objc_msgSend(id, SEL, ...)
|
||||
LIBBUILTIN(objc_msgSend, "GGH.", "f", "objc/message.h", OBJC_LANG)
|
||||
// long double objc_msgSend_fpret(id self, SEL op, ...)
|
||||
// long double objc_msgSend_fpret(id self, SEL op, ...)
|
||||
LIBBUILTIN(objc_msgSend_fpret, "LdGH.", "f", "objc/message.h", OBJC_LANG)
|
||||
// _Complex long double objc_msgSend_fp2ret(id self, SEL op, ...)
|
||||
LIBBUILTIN(objc_msgSend_fp2ret, "XLdGH.", "f", "objc/message.h", OBJC_LANG)
|
||||
|
|
|
@ -58,7 +58,7 @@ BUILTIN(__builtin_altivec_vctuxs, "V4UiV4fIi", "")
|
|||
|
||||
BUILTIN(__builtin_altivec_dss, "vUi", "")
|
||||
BUILTIN(__builtin_altivec_dssall, "v", "")
|
||||
BUILTIN(__builtin_altivec_dst, "vvC*iUi", "")
|
||||
BUILTIN(__builtin_altivec_dst, "vvC*iUi", "")
|
||||
BUILTIN(__builtin_altivec_dstt, "vvC*iUi", "")
|
||||
BUILTIN(__builtin_altivec_dstst, "vvC*iUi", "")
|
||||
BUILTIN(__builtin_altivec_dststt, "vvC*iUi", "")
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/iterator_range.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
bool isNull() const {
|
||||
return !RemoveRange.isValid();
|
||||
}
|
||||
|
||||
|
||||
/// Create a code modification hint that inserts the given
|
||||
/// code string at a specific location.
|
||||
static FixItHint CreateInsertion(SourceLocation InsertionLoc,
|
||||
|
@ -99,7 +99,7 @@ public:
|
|||
Hint.BeforePreviousInsertions = BeforePreviousInsertions;
|
||||
return Hint;
|
||||
}
|
||||
|
||||
|
||||
/// Create a code modification hint that inserts the given
|
||||
/// code from \p FromRange at a specific location.
|
||||
static FixItHint CreateInsertionFromRange(SourceLocation InsertionLoc,
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
static FixItHint CreateRemoval(SourceRange RemoveRange) {
|
||||
return CreateRemoval(CharSourceRange::getTokenRange(RemoveRange));
|
||||
}
|
||||
|
||||
|
||||
/// Create a code modification hint that replaces the given
|
||||
/// source range with the given code string.
|
||||
static FixItHint CreateReplacement(CharSourceRange RemoveRange,
|
||||
|
@ -133,7 +133,7 @@ public:
|
|||
Hint.CodeToInsert = Code;
|
||||
return Hint;
|
||||
}
|
||||
|
||||
|
||||
static FixItHint CreateReplacement(SourceRange RemoveRange,
|
||||
StringRef Code) {
|
||||
return CreateReplacement(CharSourceRange::getTokenRange(RemoveRange), Code);
|
||||
|
@ -348,7 +348,7 @@ private:
|
|||
unsigned Offset;
|
||||
|
||||
DiagStatePoint(DiagState *State, unsigned Offset)
|
||||
: State(State), Offset(Offset) {}
|
||||
: State(State), Offset(Offset) {}
|
||||
};
|
||||
|
||||
/// Description of the diagnostic states and state transitions for a
|
||||
|
@ -420,7 +420,7 @@ private:
|
|||
|
||||
/// Indicates that an unrecoverable error has occurred.
|
||||
bool UnrecoverableErrorOccurred;
|
||||
|
||||
|
||||
/// Counts for DiagnosticErrorTrap to check whether an error occurred
|
||||
/// during a parsing section, e.g. during parsing a function.
|
||||
unsigned TrapNumErrorsOccurred;
|
||||
|
@ -556,7 +556,7 @@ public:
|
|||
///
|
||||
/// Zero disables the limit.
|
||||
void setErrorLimit(unsigned Limit) { ErrorLimit = Limit; }
|
||||
|
||||
|
||||
/// Specify the maximum number of template instantiation
|
||||
/// notes to emit along with a given diagnostic.
|
||||
void setTemplateBacktraceLimit(unsigned Limit) {
|
||||
|
@ -626,11 +626,11 @@ public:
|
|||
return GetCurDiagState()->SuppressSystemWarnings;
|
||||
}
|
||||
|
||||
/// Suppress all diagnostics, to silence the front end when we
|
||||
/// Suppress all diagnostics, to silence the front end when we
|
||||
/// know that we don't want any more diagnostics to be passed along to the
|
||||
/// client
|
||||
void setSuppressAllDiagnostics(bool Val = true) {
|
||||
SuppressAllDiagnostics = Val;
|
||||
void setSuppressAllDiagnostics(bool Val = true) {
|
||||
SuppressAllDiagnostics = Val;
|
||||
}
|
||||
bool getSuppressAllDiagnostics() const { return SuppressAllDiagnostics; }
|
||||
|
||||
|
@ -638,12 +638,12 @@ public:
|
|||
/// template types.
|
||||
void setElideType(bool Val = true) { ElideType = Val; }
|
||||
bool getElideType() { return ElideType; }
|
||||
|
||||
|
||||
/// Set tree printing, to outputting the template difference in a
|
||||
/// tree format.
|
||||
void setPrintTemplateTree(bool Val = false) { PrintTemplateTree = Val; }
|
||||
bool getPrintTemplateTree() { return PrintTemplateTree; }
|
||||
|
||||
|
||||
/// Set color printing, so the type diffing will inject color markers
|
||||
/// into the output.
|
||||
void setShowColors(bool Val = false) { ShowColors = Val; }
|
||||
|
@ -657,7 +657,7 @@ public:
|
|||
ShowOverloads = Val;
|
||||
}
|
||||
OverloadsShown getShowOverloads() const { return ShowOverloads; }
|
||||
|
||||
|
||||
/// Pretend that the last diagnostic issued was ignored, so any
|
||||
/// subsequent notes will be suppressed, or restore a prior ignoring
|
||||
/// state after ignoring some diagnostics and their notes, possibly in
|
||||
|
@ -751,12 +751,12 @@ public:
|
|||
return UncompilableErrorOccurred;
|
||||
}
|
||||
bool hasFatalErrorOccurred() const { return FatalErrorOccurred; }
|
||||
|
||||
|
||||
/// Determine whether any kind of unrecoverable error has occurred.
|
||||
bool hasUnrecoverableErrorOccurred() const {
|
||||
return FatalErrorOccurred || UnrecoverableErrorOccurred;
|
||||
}
|
||||
|
||||
|
||||
unsigned getNumWarnings() const { return NumWarnings; }
|
||||
|
||||
void setNumWarnings(unsigned NumWarnings) {
|
||||
|
@ -799,10 +799,10 @@ public:
|
|||
LastDiagLevel = Other.LastDiagLevel;
|
||||
}
|
||||
|
||||
/// Reset the state of the diagnostic object to its initial
|
||||
/// Reset the state of the diagnostic object to its initial
|
||||
/// configuration.
|
||||
void Reset();
|
||||
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// DiagnosticsEngine classification and reporting interfaces.
|
||||
//
|
||||
|
@ -875,7 +875,7 @@ public:
|
|||
/// DiagnosticsEngine object itself.
|
||||
void SetDelayedDiagnostic(unsigned DiagID, StringRef Arg1 = "",
|
||||
StringRef Arg2 = "");
|
||||
|
||||
|
||||
/// Clear out the current diagnostic.
|
||||
void Clear() { CurDiagID = std::numeric_limits<unsigned>::max(); }
|
||||
|
||||
|
@ -894,7 +894,7 @@ private:
|
|||
friend class DiagnosticErrorTrap;
|
||||
friend class DiagnosticIDs;
|
||||
friend class PartialDiagnostic;
|
||||
|
||||
|
||||
/// Report the delayed diagnostic.
|
||||
void ReportDelayed();
|
||||
|
||||
|
@ -1042,7 +1042,7 @@ public:
|
|||
class DiagnosticBuilder {
|
||||
friend class DiagnosticsEngine;
|
||||
friend class PartialDiagnostic;
|
||||
|
||||
|
||||
mutable DiagnosticsEngine *DiagObj = nullptr;
|
||||
mutable unsigned NumArgs = 0;
|
||||
|
||||
|
@ -1105,7 +1105,7 @@ protected:
|
|||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
/// Copy constructor. When copied, this "takes" the diagnostic info from the
|
||||
/// input and neuters it.
|
||||
|
@ -1430,8 +1430,8 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* Represents a diagnostic in a form that can be retained until its
|
||||
* corresponding source manager is destroyed.
|
||||
* Represents a diagnostic in a form that can be retained until its
|
||||
* corresponding source manager is destroyed.
|
||||
*/
|
||||
class StoredDiagnostic {
|
||||
unsigned ID;
|
||||
|
@ -1444,9 +1444,9 @@ class StoredDiagnostic {
|
|||
public:
|
||||
StoredDiagnostic() = default;
|
||||
StoredDiagnostic(DiagnosticsEngine::Level Level, const Diagnostic &Info);
|
||||
StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
|
||||
StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
|
||||
StringRef Message);
|
||||
StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
|
||||
StoredDiagnostic(DiagnosticsEngine::Level Level, unsigned ID,
|
||||
StringRef Message, FullSourceLoc Loc,
|
||||
ArrayRef<CharSourceRange> Ranges,
|
||||
ArrayRef<FixItHint> Fixits);
|
||||
|
@ -1466,7 +1466,7 @@ public:
|
|||
range_iterator range_begin() const { return Ranges.begin(); }
|
||||
range_iterator range_end() const { return Ranges.end(); }
|
||||
unsigned range_size() const { return Ranges.size(); }
|
||||
|
||||
|
||||
ArrayRef<CharSourceRange> getRanges() const {
|
||||
return llvm::makeArrayRef(Ranges);
|
||||
}
|
||||
|
@ -1476,7 +1476,7 @@ public:
|
|||
fixit_iterator fixit_begin() const { return FixIts.begin(); }
|
||||
fixit_iterator fixit_end() const { return FixIts.end(); }
|
||||
unsigned fixit_size() const { return FixIts.size(); }
|
||||
|
||||
|
||||
ArrayRef<FixItHint> getFixIts() const {
|
||||
return llvm::makeArrayRef(FixIts);
|
||||
}
|
||||
|
@ -1488,7 +1488,7 @@ class DiagnosticConsumer {
|
|||
protected:
|
||||
unsigned NumWarnings = 0; ///< Number of warnings reported
|
||||
unsigned NumErrors = 0; ///< Number of errors reported
|
||||
|
||||
|
||||
public:
|
||||
DiagnosticConsumer() = default;
|
||||
virtual ~DiagnosticConsumer();
|
||||
|
@ -1506,7 +1506,7 @@ public:
|
|||
/// in between BeginSourceFile() and EndSourceFile().
|
||||
///
|
||||
/// \param LangOpts The language options for the source file being processed.
|
||||
/// \param PP The preprocessor object being used for the source; this is
|
||||
/// \param PP The preprocessor object being used for the source; this is
|
||||
/// optional, e.g., it may not be present when processing AST source files.
|
||||
virtual void BeginSourceFile(const LangOptions &LangOpts,
|
||||
const Preprocessor *PP = nullptr) {}
|
||||
|
|
|
@ -168,7 +168,7 @@ def warn_integer_constant_overflow : Warning<
|
|||
"overflow in expression; result is %0 with type %1">,
|
||||
InGroup<DiagGroup<"integer-overflow">>;
|
||||
|
||||
// This is a temporary diagnostic, and shall be removed once our
|
||||
// This is a temporary diagnostic, and shall be removed once our
|
||||
// implementation is complete, and like the preceding constexpr notes belongs
|
||||
// in Sema.
|
||||
def note_unimplemented_constexpr_lambda_feature_ast : Note<
|
||||
|
|
|
@ -83,19 +83,19 @@ def warn_doc_function_method_decl_mismatch : Warning<
|
|||
"%select{a function|a function|an Objective-C method|an Objective-C method|"
|
||||
"a pointer to function}2 declaration">,
|
||||
InGroup<Documentation>, DefaultIgnore;
|
||||
|
||||
|
||||
def warn_doc_api_container_decl_mismatch : Warning<
|
||||
"'%select{\\|@}0%select{class|interface|protocol|struct|union}1' "
|
||||
"command should not be used in a comment attached to a "
|
||||
"non-%select{class|interface|protocol|struct|union}2 declaration">,
|
||||
InGroup<Documentation>, DefaultIgnore;
|
||||
|
||||
|
||||
def warn_doc_container_decl_mismatch : Warning<
|
||||
"'%select{\\|@}0%select{classdesign|coclass|dependency|helper"
|
||||
"|helperclass|helps|instancesize|ownership|performance|security|superclass}1' "
|
||||
"command should not be used in a comment attached to a non-container declaration">,
|
||||
InGroup<Documentation>, DefaultIgnore;
|
||||
|
||||
|
||||
def warn_doc_param_duplicate : Warning<
|
||||
"parameter '%0' is already documented">,
|
||||
InGroup<Documentation>, DefaultIgnore;
|
||||
|
|
|
@ -16,7 +16,7 @@ let Component = "Common" in {
|
|||
// Basic.
|
||||
|
||||
def fatal_too_many_errors
|
||||
: Error<"too many errors emitted, stopping now">, DefaultFatal;
|
||||
: Error<"too many errors emitted, stopping now">, DefaultFatal;
|
||||
|
||||
def note_declared_at : Note<"declared here">;
|
||||
def note_previous_definition : Note<"previous definition is here">;
|
||||
|
@ -97,11 +97,11 @@ def remark_module_lock_timeout : Remark<
|
|||
def err_module_shadowed : Error<"import of shadowed module '%0'">, DefaultFatal;
|
||||
def err_module_build_shadowed_submodule : Error<
|
||||
"build a shadowed submodule '%0'">, DefaultFatal;
|
||||
def err_module_cycle : Error<"cyclic dependency in module '%0': %1">,
|
||||
def err_module_cycle : Error<"cyclic dependency in module '%0': %1">,
|
||||
DefaultFatal;
|
||||
def err_module_prebuilt : Error<
|
||||
"error in loading module '%0' from prebuilt module path">, DefaultFatal;
|
||||
def note_pragma_entered_here : Note<"#pragma entered here">;
|
||||
def note_pragma_entered_here : Note<"#pragma entered here">;
|
||||
def note_decl_hiding_tag_type : Note<
|
||||
"%1 %0 is hidden by a non-type declaration of %0 here">;
|
||||
def err_attribute_not_type_attr : Error<
|
||||
|
@ -115,7 +115,7 @@ let CategoryName = "Nullability Issue" in {
|
|||
def warn_nullability_duplicate : Warning<
|
||||
"duplicate nullability specifier %0">,
|
||||
InGroup<Nullability>;
|
||||
|
||||
|
||||
def warn_conflicting_nullability_attr_overriding_ret_types : Warning<
|
||||
"conflicting nullability specifier on return types, %0 "
|
||||
"conflicts with existing specifier %1">,
|
||||
|
@ -223,7 +223,7 @@ def err_unable_to_rename_temp : Error<
|
|||
"unable to rename temporary '%0' to output file '%1': '%2'">;
|
||||
def err_unable_to_make_temp : Error<
|
||||
"unable to make temporary file: %0">;
|
||||
|
||||
|
||||
// Modules
|
||||
def err_module_format_unhandled : Error<
|
||||
"no handler registered for module format '%0'">, DefaultFatal;
|
||||
|
|
|
@ -208,7 +208,7 @@ def err_drv_omp_host_target_not_supported : Error<
|
|||
def err_drv_expecting_fopenmp_with_fopenmp_targets : Error<
|
||||
"The option -fopenmp-targets must be used in conjunction with a -fopenmp option compatible with offloading, please use -fopenmp=libomp or -fopenmp=libiomp5.">;
|
||||
def warn_drv_omp_offload_target_duplicate : Warning<
|
||||
"The OpenMP offloading target '%0' is similar to target '%1' already specified - will be ignored.">,
|
||||
"The OpenMP offloading target '%0' is similar to target '%1' already specified - will be ignored.">,
|
||||
InGroup<OpenMPTarget>;
|
||||
def warn_drv_omp_offload_target_missingbcruntime : Warning<
|
||||
"No library '%0' found in the default clang lib directory or in LIBRARY_PATH. Expect degraded performance due to no inlining of runtime functions on target devices.">,
|
||||
|
|
|
@ -36,7 +36,7 @@ def remark_fe_backend_plugin: Remark<"%0">, BackendInfo, InGroup<RemarkBackendPl
|
|||
def note_fe_backend_plugin: Note<"%0">, BackendInfo;
|
||||
|
||||
def warn_fe_override_module : Warning<
|
||||
"overriding the module target triple with %0">,
|
||||
"overriding the module target triple with %0">,
|
||||
InGroup<DiagGroup<"override-module">>;
|
||||
|
||||
def remark_fe_backend_optimization_remark : Remark<"%0">, BackendInfo,
|
||||
|
@ -190,10 +190,10 @@ def err_module_interface_requires_modules_ts : Error<
|
|||
def warn_module_config_mismatch : Warning<
|
||||
"module file %0 cannot be loaded due to a configuration mismatch with the current "
|
||||
"compilation">, InGroup<DiagGroup<"module-file-config-mismatch">>, DefaultError;
|
||||
def err_module_map_not_found : Error<"module map file '%0' not found">,
|
||||
def err_module_map_not_found : Error<"module map file '%0' not found">,
|
||||
DefaultFatal;
|
||||
def err_missing_module_name : Error<
|
||||
"no module name provided; specify one with -fmodule-name=">,
|
||||
"no module name provided; specify one with -fmodule-name=">,
|
||||
DefaultFatal;
|
||||
def err_missing_module : Error<
|
||||
"no module named '%0' declared in module map file '%1'">, DefaultFatal;
|
||||
|
|
|
@ -288,7 +288,7 @@ def IgnoredQualifiers : DiagGroup<"ignored-qualifiers">;
|
|||
def : DiagGroup<"import">;
|
||||
def GNUIncludeNext : DiagGroup<"gnu-include-next">;
|
||||
def IncompatibleMSStruct : DiagGroup<"incompatible-ms-struct">;
|
||||
def IncompatiblePointerTypesDiscardsQualifiers
|
||||
def IncompatiblePointerTypesDiscardsQualifiers
|
||||
: DiagGroup<"incompatible-pointer-types-discards-qualifiers">;
|
||||
def IncompatibleFunctionPointerTypes
|
||||
: DiagGroup<"incompatible-function-pointer-types">;
|
||||
|
@ -800,14 +800,14 @@ def Most : DiagGroup<"most", [
|
|||
UserDefinedWarnings
|
||||
]>;
|
||||
|
||||
// Thread Safety warnings
|
||||
// Thread Safety warnings
|
||||
def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">;
|
||||
def ThreadSafetyAnalysis : DiagGroup<"thread-safety-analysis">;
|
||||
def ThreadSafetyPrecise : DiagGroup<"thread-safety-precise">;
|
||||
def ThreadSafetyReference : DiagGroup<"thread-safety-reference">;
|
||||
def ThreadSafetyNegative : DiagGroup<"thread-safety-negative">;
|
||||
def ThreadSafety : DiagGroup<"thread-safety",
|
||||
[ThreadSafetyAttributes,
|
||||
[ThreadSafetyAttributes,
|
||||
ThreadSafetyAnalysis,
|
||||
ThreadSafetyPrecise,
|
||||
ThreadSafetyReference]>;
|
||||
|
|
|
@ -214,7 +214,7 @@ public:
|
|||
bool ignored;
|
||||
return isBuiltinExtensionDiag(DiagID, ignored);
|
||||
}
|
||||
|
||||
|
||||
/// Determine whether the given built-in diagnostic ID is for an
|
||||
/// extension of some sort, and whether it is enabled by default.
|
||||
///
|
||||
|
@ -223,14 +223,14 @@ public:
|
|||
/// treated as a warning/error by default.
|
||||
///
|
||||
static bool isBuiltinExtensionDiag(unsigned DiagID, bool &EnabledByDefault);
|
||||
|
||||
|
||||
|
||||
/// Return the lowest-level warning option that enables the specified
|
||||
/// diagnostic.
|
||||
///
|
||||
/// If there is no -Wfoo flag that controls the diagnostic, this returns null.
|
||||
static StringRef getWarningOptionForDiag(unsigned DiagID);
|
||||
|
||||
|
||||
/// Return the category number that a specified \p DiagID belongs to,
|
||||
/// or 0 if no category.
|
||||
static unsigned getCategoryNumberForDiag(unsigned DiagID);
|
||||
|
@ -240,7 +240,7 @@ public:
|
|||
|
||||
/// Given a category ID, return the name of the category.
|
||||
static StringRef getCategoryNameFromID(unsigned CategoryID);
|
||||
|
||||
|
||||
/// Return true if a given diagnostic falls into an ARC diagnostic
|
||||
/// category.
|
||||
static bool isARCDiagnostic(unsigned DiagID);
|
||||
|
@ -251,26 +251,26 @@ public:
|
|||
/// The diagnostic should not be reported, but it should cause
|
||||
/// template argument deduction to fail.
|
||||
///
|
||||
/// The vast majority of errors that occur during template argument
|
||||
/// The vast majority of errors that occur during template argument
|
||||
/// deduction fall into this category.
|
||||
SFINAE_SubstitutionFailure,
|
||||
|
||||
|
||||
/// The diagnostic should be suppressed entirely.
|
||||
///
|
||||
/// Warnings generally fall into this category.
|
||||
SFINAE_Suppress,
|
||||
|
||||
|
||||
/// The diagnostic should be reported.
|
||||
///
|
||||
/// The diagnostic should be reported. Various fatal errors (e.g.,
|
||||
/// The diagnostic should be reported. Various fatal errors (e.g.,
|
||||
/// template instantiation depth exceeded) fall into this category.
|
||||
SFINAE_Report,
|
||||
|
||||
|
||||
/// The diagnostic is an access-control diagnostic, which will be
|
||||
/// substitution failures in some contexts and reported in others.
|
||||
SFINAE_AccessControl
|
||||
};
|
||||
|
||||
|
||||
/// Determines whether the given built-in diagnostic ID is
|
||||
/// for an error that is suppressed if it occurs during C++ template
|
||||
/// argument deduction.
|
||||
|
@ -306,7 +306,7 @@ public:
|
|||
private:
|
||||
/// Classify the specified diagnostic ID into a Level, consumable by
|
||||
/// the DiagnosticClient.
|
||||
///
|
||||
///
|
||||
/// The classification is based on the way the client configured the
|
||||
/// DiagnosticsEngine object.
|
||||
///
|
||||
|
|
|
@ -53,7 +53,7 @@ def ext_multi_line_line_comment : Extension<"multi-line // comment">,
|
|||
def ext_line_comment : Extension<
|
||||
"// comments are not allowed in this language">,
|
||||
InGroup<Comment>;
|
||||
def ext_no_newline_eof : Extension<"no newline at end of file">,
|
||||
def ext_no_newline_eof : Extension<"no newline at end of file">,
|
||||
InGroup<NewlineEOF>;
|
||||
def warn_no_newline_eof : Warning<"no newline at end of file">,
|
||||
InGroup<NewlineEOF>, DefaultIgnore;
|
||||
|
@ -294,7 +294,7 @@ def pp_nonportable_path : NonportablePath,
|
|||
InGroup<DiagGroup<"nonportable-include-path">>;
|
||||
def pp_nonportable_system_path : NonportablePath, DefaultIgnore,
|
||||
InGroup<DiagGroup<"nonportable-system-include-path">>;
|
||||
|
||||
|
||||
def pp_pragma_once_in_main_file : Warning<"#pragma once in main file">,
|
||||
InGroup<DiagGroup<"pragma-once-outside-header">>;
|
||||
def pp_pragma_sysheader_in_main_file : Warning<
|
||||
|
@ -353,7 +353,7 @@ def ext_pp_warning_directive : Extension<"#warning is a language extension">;
|
|||
|
||||
def ext_pp_extra_tokens_at_eol : ExtWarn<
|
||||
"extra tokens at end of #%0 directive">, InGroup<ExtraTokens>;
|
||||
|
||||
|
||||
def ext_pp_comma_expr : Extension<"comma operator in operand of #if">;
|
||||
def ext_pp_bad_vaargs_use : Extension<
|
||||
"__VA_ARGS__ can only appear in the expansion of a C99 variadic macro">;
|
||||
|
@ -594,7 +594,7 @@ def err_pp_illegal_floating_literal : Error<
|
|||
def err_pp_line_requires_integer : Error<
|
||||
"#line directive requires a positive integer argument">;
|
||||
def ext_pp_line_zero : Extension<
|
||||
"#line directive with zero argument is a GNU extension">,
|
||||
"#line directive with zero argument is a GNU extension">,
|
||||
InGroup<GNUZeroLineDirective>;
|
||||
def err_pp_line_invalid_filename : Error<
|
||||
"invalid filename for #line directive">;
|
||||
|
@ -736,7 +736,7 @@ def warn_auto_module_import : Warning<
|
|||
def note_implicit_top_level_module_import_here : Note<
|
||||
"submodule of top-level module '%0' implicitly imported here">;
|
||||
def warn_uncovered_module_header : Warning<
|
||||
"umbrella header for module '%0' does not include header '%1'">,
|
||||
"umbrella header for module '%0' does not include header '%1'">,
|
||||
InGroup<IncompleteUmbrella>;
|
||||
def warn_mmap_umbrella_dir_not_found : Warning<
|
||||
"umbrella directory '%0' not found">,
|
||||
|
@ -755,7 +755,7 @@ def warn_non_modular_include_in_module : Warning<
|
|||
"include of non-modular header inside module '%0': '%1'">,
|
||||
InGroup<NonModularIncludeInModule>, DefaultIgnore;
|
||||
def warn_module_conflict : Warning<
|
||||
"module '%0' conflicts with already-imported module '%1': %2">,
|
||||
"module '%0' conflicts with already-imported module '%1': %2">,
|
||||
InGroup<ModuleConflict>;
|
||||
|
||||
def warn_header_guard : Warning<
|
||||
|
|
|
@ -61,9 +61,9 @@ DIAGOPT(ShowOptionNames, 1, 0) /// Show the option name for mappable
|
|||
DIAGOPT(ShowNoteIncludeStack, 1, 0) /// Show include stacks for notes.
|
||||
VALUE_DIAGOPT(ShowCategories, 2, 0) /// Show categories: 0 -> none, 1 -> Number,
|
||||
/// 2 -> Full Name.
|
||||
|
||||
ENUM_DIAGOPT(Format, TextDiagnosticFormat, 2, Clang) /// Format for diagnostics:
|
||||
|
||||
|
||||
ENUM_DIAGOPT(Format, TextDiagnosticFormat, 2, Clang) /// Format for diagnostics:
|
||||
|
||||
DIAGOPT(ShowColors, 1, 0) /// Show diagnostics with ANSI color sequences.
|
||||
ENUM_DIAGOPT(ShowOverloads, OverloadsShown, 1,
|
||||
Ovl_All) /// Overload candidates to show.
|
||||
|
|
|
@ -91,7 +91,7 @@ protected:
|
|||
public:
|
||||
/// The file to log diagnostic output to.
|
||||
std::string DiagnosticLogFile;
|
||||
|
||||
|
||||
/// The file to serialize diagnostics to (non-appending).
|
||||
std::string DiagnosticSerializationFile;
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ def err_enumerator_list_missing_comma : Error<
|
|||
def err_enumerator_unnamed_no_def : Error<
|
||||
"unnamed enumeration must be a definition">;
|
||||
def ext_cxx11_enum_fixed_underlying_type : Extension<
|
||||
"enumeration types with a fixed underlying type are a C++11 extension">,
|
||||
"enumeration types with a fixed underlying type are a C++11 extension">,
|
||||
InGroup<CXX11>;
|
||||
def ext_c_enum_fixed_underlying_type : Extension<
|
||||
"enumeration types with a fixed underlying type are a Microsoft extension">,
|
||||
|
@ -101,7 +101,7 @@ def ext_alignof_expr : ExtWarn<
|
|||
"%0 applied to an expression is a GNU extension">, InGroup<GNUAlignofExpression>;
|
||||
|
||||
def warn_microsoft_dependent_exists : Warning<
|
||||
"dependent %select{__if_not_exists|__if_exists}0 declarations are ignored">,
|
||||
"dependent %select{__if_not_exists|__if_exists}0 declarations are ignored">,
|
||||
InGroup<DiagGroup<"microsoft-exists">>;
|
||||
def warn_microsoft_qualifiers_ignored : Warning<
|
||||
"qualifiers after comma in declarator list are ignored">,
|
||||
|
@ -134,14 +134,14 @@ def ext_gnu_conditional_expr : Extension<
|
|||
"use of GNU ?: conditional expression extension, omitting middle operand">, InGroup<GNUConditionalOmittedOperand>;
|
||||
def ext_gnu_empty_initializer : Extension<
|
||||
"use of GNU empty initializer extension">, InGroup<GNUEmptyInitializer>;
|
||||
def ext_gnu_array_range : Extension<"use of GNU array range extension">,
|
||||
def ext_gnu_array_range : Extension<"use of GNU array range extension">,
|
||||
InGroup<GNUDesignator>;
|
||||
def ext_gnu_missing_equal_designator : ExtWarn<
|
||||
"use of GNU 'missing =' extension in designator">,
|
||||
"use of GNU 'missing =' extension in designator">,
|
||||
InGroup<GNUDesignator>;
|
||||
def err_expected_equal_designator : Error<"expected '=' or another designator">;
|
||||
def ext_gnu_old_style_field_designator : ExtWarn<
|
||||
"use of GNU old-style field designator extension">,
|
||||
"use of GNU old-style field designator extension">,
|
||||
InGroup<GNUDesignator>;
|
||||
def ext_gnu_case_range : Extension<"use of GNU case range extension">,
|
||||
InGroup<GNUCaseRange>;
|
||||
|
@ -168,16 +168,16 @@ def err_unexpected_semi : Error<"unexpected ';' before %0">;
|
|||
def err_expected_fn_body : Error<
|
||||
"expected function body after function declarator">;
|
||||
def warn_attribute_on_function_definition : Warning<
|
||||
"GCC does not allow %0 attribute in this position on a function definition">,
|
||||
"GCC does not allow %0 attribute in this position on a function definition">,
|
||||
InGroup<GccCompat>;
|
||||
def warn_gcc_attribute_location : Warning<
|
||||
"GCC does not allow an attribute in this position on a function declaration">,
|
||||
"GCC does not allow an attribute in this position on a function declaration">,
|
||||
InGroup<GccCompat>;
|
||||
def warn_gcc_variable_decl_in_for_loop : Warning<
|
||||
"GCC does not allow variable declarations in for loop initializers before "
|
||||
"C99">, InGroup<GccCompat>;
|
||||
def warn_attribute_no_decl : Warning<
|
||||
"attribute %0 ignored, because it is not attached to a declaration">,
|
||||
"attribute %0 ignored, because it is not attached to a declaration">,
|
||||
InGroup<IgnoredAttributes>;
|
||||
def err_ms_attributes_not_enabled : Error<
|
||||
"'__declspec' attributes are not enabled; use '-fdeclspec' or "
|
||||
|
@ -319,7 +319,7 @@ def warn_cxx98_compat_decltype : Warning<
|
|||
def err_unexpected_scope_on_base_decltype : Error<
|
||||
"unexpected namespace scope prior to decltype">;
|
||||
def err_expected_class_name : Error<"expected class name">;
|
||||
def err_expected_class_name_not_template :
|
||||
def err_expected_class_name_not_template :
|
||||
Error<"'typename' is redundant; base classes are implicitly types">;
|
||||
def err_unspecified_vla_size_with_static : Error<
|
||||
"'static' may not be used with an unspecified variable length array size">;
|
||||
|
@ -395,7 +395,7 @@ def warn_arc_bridge_cast_nonarc : Warning<
|
|||
"'%0' casts have no effect when not using ARC">,
|
||||
InGroup<DiagGroup<"arc-bridge-casts-disallowed-in-nonarc">>;
|
||||
}
|
||||
|
||||
|
||||
def err_objc_illegal_visibility_spec : Error<
|
||||
"illegal visibility specification">;
|
||||
def err_objc_illegal_interface_qual : Error<"illegal interface qualifier">;
|
||||
|
@ -687,7 +687,7 @@ def warn_cxx98_compat_extern_template : Warning<
|
|||
def warn_static_inline_explicit_inst_ignored : Warning<
|
||||
"ignoring '%select{static|inline}0' keyword on explicit template "
|
||||
"instantiation">, InGroup<DiagGroup<"static-inline-explicit-instantiation">>;
|
||||
|
||||
|
||||
// Constructor template diagnostics.
|
||||
def err_out_of_line_constructor_template_id : Error<
|
||||
"out-of-line constructor for %0 cannot have template arguments">;
|
||||
|
@ -703,7 +703,7 @@ def err_expected_type_name_after_typename : Error<
|
|||
"expected an identifier or template-id after '::'">;
|
||||
def err_explicit_spec_non_template : Error<
|
||||
"explicit %select{specialization|instantiation}0 of non-template %1 %2">;
|
||||
|
||||
|
||||
def err_default_template_template_parameter_not_template : Error<
|
||||
"default template argument for a template template parameter must be a class "
|
||||
"template">;
|
||||
|
@ -850,7 +850,7 @@ def err_zero_version : Error<
|
|||
"version number must have non-zero major, minor, or sub-minor version">;
|
||||
def err_availability_expected_platform : Error<
|
||||
"expected a platform name, e.g., 'macos'">;
|
||||
|
||||
|
||||
// objc_bridge_related attribute
|
||||
def err_objcbridge_related_expected_related_class : Error<
|
||||
"expected a related ObjectiveC class name, e.g., 'NSColor'">;
|
||||
|
@ -994,7 +994,7 @@ def warn_pragma_init_seg_unsupported_target : Warning<
|
|||
// - #pragma fp_contract
|
||||
def err_pragma_fp_contract_scope : Error<
|
||||
"'#pragma fp_contract' can only appear at file scope or at the start of a "
|
||||
"compound statement">;
|
||||
"compound statement">;
|
||||
// - #pragma stdc unknown
|
||||
def ext_stdc_pragma_ignored : ExtWarn<"unknown pragma in STDC namespace">,
|
||||
InGroup<UnknownPragmas>;
|
||||
|
|
|
@ -243,7 +243,7 @@ def err_invalid_vector_double_decl_spec : Error <
|
|||
"(available on POWER7 or later)">;
|
||||
def err_invalid_vector_long_long_decl_spec : Error <
|
||||
"use of 'long long' with '__vector bool' requires VSX support (available on "
|
||||
"POWER7 or later) or extended Altivec support (available on POWER8 or later) "
|
||||
"POWER7 or later) or extended Altivec support (available on POWER8 or later) "
|
||||
"to be enabled">;
|
||||
def err_invalid_vector_long_double_decl_spec : Error<
|
||||
"cannot use 'long double' with '__vector'">;
|
||||
|
@ -388,7 +388,7 @@ def err_inline_non_function : Error<
|
|||
"'inline' can only appear on functions%select{| and non-local variables}0">;
|
||||
def err_noreturn_non_function : Error<
|
||||
"'_Noreturn' can only appear on functions">;
|
||||
def warn_qual_return_type : Warning<
|
||||
def warn_qual_return_type : Warning<
|
||||
"'%0' type qualifier%s1 on return type %plural{1:has|:have}1 no effect">,
|
||||
InGroup<IgnoredQualifiers>, DefaultIgnore;
|
||||
def warn_deprecated_redundant_constexpr_static_def : Warning<
|
||||
|
@ -640,8 +640,8 @@ def warn_dyn_class_memaccess : Warning<
|
|||
def note_bad_memaccess_silence : Note<
|
||||
"explicitly cast the pointer to silence this warning">;
|
||||
def warn_sizeof_pointer_expr_memaccess : Warning<
|
||||
"'%0' call operates on objects of type %1 while the size is based on a "
|
||||
"different type %2">,
|
||||
"'%0' call operates on objects of type %1 while the size is based on a "
|
||||
"different type %2">,
|
||||
InGroup<SizeofPointerMemaccess>;
|
||||
def warn_sizeof_pointer_expr_memaccess_note : Note<
|
||||
"did you mean to %select{dereference the argument to 'sizeof' (and multiply "
|
||||
|
@ -679,14 +679,14 @@ def note_suspicious_bzero_size_silence : Note<
|
|||
"parenthesize the second argument to silence">;
|
||||
|
||||
def warn_strncat_large_size : Warning<
|
||||
"the value of the size argument in 'strncat' is too large, might lead to a "
|
||||
"the value of the size argument in 'strncat' is too large, might lead to a "
|
||||
"buffer overflow">, InGroup<StrncatSize>;
|
||||
def warn_strncat_src_size : Warning<"size argument in 'strncat' call appears "
|
||||
def warn_strncat_src_size : Warning<"size argument in 'strncat' call appears "
|
||||
"to be size of the source">, InGroup<StrncatSize>;
|
||||
def warn_strncat_wrong_size : Warning<
|
||||
"the value of the size argument to 'strncat' is wrong">, InGroup<StrncatSize>;
|
||||
def note_strncat_wrong_size : Note<
|
||||
"change the argument to be the free space in the destination buffer minus "
|
||||
"change the argument to be the free space in the destination buffer minus "
|
||||
"the terminating null byte">;
|
||||
|
||||
def warn_assume_side_effects : Warning<
|
||||
|
@ -1030,15 +1030,15 @@ def note_property_attribute : Note<"property %0 is declared "
|
|||
"%select{deprecated|unavailable|partial}1 here">;
|
||||
def err_setter_type_void : Error<"type of setter must be void">;
|
||||
def err_duplicate_method_decl : Error<"duplicate declaration of method %0">;
|
||||
def warn_duplicate_method_decl :
|
||||
Warning<"multiple declarations of method %0 found and ignored">,
|
||||
def warn_duplicate_method_decl :
|
||||
Warning<"multiple declarations of method %0 found and ignored">,
|
||||
InGroup<MethodDuplicate>, DefaultIgnore;
|
||||
def warn_objc_cdirective_format_string :
|
||||
Warning<"using %0 directive in %select{NSString|CFString}1 "
|
||||
"which is being passed as a formatting argument to the formatting "
|
||||
"%select{method|CFfunction}2">,
|
||||
InGroup<ObjCCStringFormat>, DefaultIgnore;
|
||||
def err_objc_var_decl_inclass :
|
||||
def err_objc_var_decl_inclass :
|
||||
Error<"cannot declare variable inside @interface or @protocol">;
|
||||
def err_missing_method_context : Error<
|
||||
"missing context for method declaration">;
|
||||
|
@ -1250,7 +1250,7 @@ def warn_auto_implicit_atomic_property : Warning<
|
|||
"property is assumed atomic when auto-synthesizing the property">,
|
||||
InGroup<ImplicitAtomic>, DefaultIgnore;
|
||||
def warn_unimplemented_selector: Warning<
|
||||
"no method with selector %0 is implemented in this translation unit">,
|
||||
"no method with selector %0 is implemented in this translation unit">,
|
||||
InGroup<Selector>, DefaultIgnore;
|
||||
def warn_unimplemented_protocol_method : Warning<
|
||||
"method %0 in protocol %1 not implemented">, InGroup<Protocol>;
|
||||
|
@ -1379,7 +1379,7 @@ def err_capture_default_non_local : Error<
|
|||
"non-local lambda expression cannot have a capture-default">;
|
||||
|
||||
def err_multiple_final_overriders : Error<
|
||||
"virtual function %q0 has more than one final overrider in %1">;
|
||||
"virtual function %q0 has more than one final overrider in %1">;
|
||||
def note_final_overrider : Note<"final overrider of %q0 in %1">;
|
||||
|
||||
def err_type_defined_in_type_specifier : Error<
|
||||
|
@ -1421,7 +1421,7 @@ def warn_weak_template_vtable : Warning<
|
|||
|
||||
def ext_using_undefined_std : ExtWarn<
|
||||
"using directive refers to implicitly-defined namespace 'std'">;
|
||||
|
||||
|
||||
// C++ exception specifications
|
||||
def err_exception_spec_in_typedef : Error<
|
||||
"exception specifications are not allowed in %select{typedefs|type aliases}0">;
|
||||
|
@ -1475,7 +1475,7 @@ def ext_ms_using_declaration_inaccessible : ExtWarn<
|
|||
"to accessible member '%1') is a Microsoft compatibility extension">,
|
||||
AccessControl, InGroup<MicrosoftUsingDecl>;
|
||||
def err_access_ctor : Error<
|
||||
"calling a %select{private|protected}0 constructor of class %2">,
|
||||
"calling a %select{private|protected}0 constructor of class %2">,
|
||||
AccessControl;
|
||||
def ext_rvalue_to_reference_access_ctor : Extension<
|
||||
"C++98 requires an accessible copy constructor for class %2 when binding "
|
||||
|
@ -1498,7 +1498,7 @@ def err_access_friend_function : Error<
|
|||
AccessControl;
|
||||
|
||||
def err_access_dtor : Error<
|
||||
"calling a %select{private|protected}1 destructor of class %0">,
|
||||
"calling a %select{private|protected}1 destructor of class %0">,
|
||||
AccessControl;
|
||||
def err_access_dtor_base :
|
||||
Error<"base class %0 has %select{private|protected}1 destructor">,
|
||||
|
@ -1540,7 +1540,7 @@ def note_access_protected_restricted_object : Note<
|
|||
def warn_cxx98_compat_sfinae_access_control : Warning<
|
||||
"substitution failure due to access control is incompatible with C++98">,
|
||||
InGroup<CXX98Compat>, DefaultIgnore, NoSFINAE;
|
||||
|
||||
|
||||
// C++ name lookup
|
||||
def err_incomplete_nested_name_spec : Error<
|
||||
"incomplete type %0 named in nested name specifier">;
|
||||
|
@ -1981,7 +1981,7 @@ def note_explicit_ctor_deduction_guide_here : Note<
|
|||
// C++11 decltype
|
||||
def err_decltype_in_declarator : Error<
|
||||
"'decltype' cannot be used to name a declaration">;
|
||||
|
||||
|
||||
// C++11 auto
|
||||
def warn_cxx98_compat_auto_type_specifier : Warning<
|
||||
"'auto' type specifier is incompatible with C++98">,
|
||||
|
@ -2634,7 +2634,7 @@ def warn_objc_literal_comparison : Warning<
|
|||
def err_missing_atsign_prefix : Error<
|
||||
"string literal must be prefixed by '@' ">;
|
||||
def warn_objc_string_literal_comparison : Warning<
|
||||
"direct comparison of a string literal has undefined behavior">,
|
||||
"direct comparison of a string literal has undefined behavior">,
|
||||
InGroup<ObjCStringComparison>;
|
||||
def warn_concatenated_nsarray_literal : Warning<
|
||||
"concatenated NSString literal for an NSArray expression - "
|
||||
|
@ -2748,7 +2748,7 @@ def warn_cxx11_gnu_attribute_on_type : Warning<
|
|||
"attribute %0 ignored, because it cannot be applied to a type">,
|
||||
InGroup<IgnoredAttributes>;
|
||||
def warn_unhandled_ms_attribute_ignored : Warning<
|
||||
"__declspec attribute %0 is not supported">,
|
||||
"__declspec attribute %0 is not supported">,
|
||||
InGroup<IgnoredAttributes>;
|
||||
def err_decl_attribute_invalid_on_stmt : Error<
|
||||
"%0 attribute cannot be applied to a statement">;
|
||||
|
@ -3003,7 +3003,7 @@ def err_attribute_argument_out_of_range : Error<
|
|||
"1:can only be 1, since there is one parameter|"
|
||||
":must be between 1 and %2}2">;
|
||||
|
||||
// Thread Safety Analysis
|
||||
// Thread Safety Analysis
|
||||
def warn_unlock_but_no_lock : Warning<"releasing %0 '%1' that was not held">,
|
||||
InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
|
||||
def warn_unlock_kind_mismatch : Warning<
|
||||
|
@ -3017,7 +3017,7 @@ def warn_no_unlock : Warning<
|
|||
InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
|
||||
def warn_expecting_locked : Warning<
|
||||
"expecting %0 '%1' to be held at the end of function">,
|
||||
InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
|
||||
InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
|
||||
// FIXME: improve the error message about locks not in scope
|
||||
def warn_lock_some_predecessors : Warning<
|
||||
"%0 '%1' is not held on every path through here">,
|
||||
|
@ -3094,13 +3094,13 @@ def warn_fun_requires_lock_precise :
|
|||
def note_found_mutex_near_match : Note<"found near match '%0'">;
|
||||
|
||||
// Verbose thread safety warnings
|
||||
def warn_thread_safety_verbose : Warning<"Thread safety verbose warning.">,
|
||||
def warn_thread_safety_verbose : Warning<"Thread safety verbose warning.">,
|
||||
InGroup<ThreadSafetyVerbose>, DefaultIgnore;
|
||||
def note_thread_warning_in_fun : Note<"Thread warning in function %0">;
|
||||
def note_guarded_by_declared_here : Note<"Guarded_by declared here.">;
|
||||
|
||||
// Dummy warning that will trigger "beta" warnings from the analysis if enabled.
|
||||
def warn_thread_safety_beta : Warning<"Thread safety beta warning.">,
|
||||
// Dummy warning that will trigger "beta" warnings from the analysis if enabled.
|
||||
def warn_thread_safety_beta : Warning<"Thread safety beta warning.">,
|
||||
InGroup<ThreadSafetyBeta>, DefaultIgnore;
|
||||
|
||||
// Consumed warnings
|
||||
|
@ -3356,7 +3356,7 @@ def err_attribute_sentinel_not_zero_or_one : Error<
|
|||
"'sentinel' parameter 2 not 0 or 1">;
|
||||
def warn_cleanup_ext : Warning<
|
||||
"GCC does not allow the 'cleanup' attribute argument to be anything other "
|
||||
"than a simple identifier">,
|
||||
"than a simple identifier">,
|
||||
InGroup<GccCompat>;
|
||||
def err_attribute_cleanup_arg_not_function : Error<
|
||||
"'cleanup' argument %select{|%1 |%1 }0is not a %select{||single }0function">;
|
||||
|
@ -3391,7 +3391,7 @@ def warn_iboutlet_object_type : Warning<
|
|||
def warn_iboutletcollection_property_assign : Warning<
|
||||
"IBOutletCollection properties should be copy/strong and not assign">,
|
||||
InGroup<ObjCInvalidIBOutletProperty>;
|
||||
|
||||
|
||||
def err_attribute_overloadable_mismatch : Error<
|
||||
"redeclaration of %0 must %select{not |}1have the 'overloadable' attribute">;
|
||||
def note_attribute_overloadable_prev_overload : Note<
|
||||
|
@ -3856,7 +3856,7 @@ def note_template_param_different_kind : Note<
|
|||
|
||||
def err_invalid_decl_specifier_in_nontype_parm : Error<
|
||||
"invalid declaration specifier in template non-type parameter">;
|
||||
|
||||
|
||||
def err_template_nontype_parm_different_type : Error<
|
||||
"template non-type parameter has a different type %0 in template "
|
||||
"%select{|template parameter }1redeclaration">;
|
||||
|
@ -4158,7 +4158,7 @@ def err_dependent_typed_non_type_arg_in_partial_spec : Error<
|
|||
def err_partial_spec_args_match_primary_template : Error<
|
||||
"%select{class|variable}0 template partial specialization does not "
|
||||
"specialize any template argument; to %select{declare|define}1 the "
|
||||
"primary template, remove the template argument list">;
|
||||
"primary template, remove the template argument list">;
|
||||
def ext_partial_spec_not_more_specialized_than_primary : ExtWarn<
|
||||
"%select{class|variable}0 template partial specialization is not "
|
||||
"more specialized than the primary template">, DefaultError,
|
||||
|
@ -4193,7 +4193,7 @@ def err_var_spec_no_template : Error<
|
|||
def err_var_spec_no_template_but_method : Error<
|
||||
"no variable template matches specialization; "
|
||||
"did you mean to use %0 as function template instead?">;
|
||||
|
||||
|
||||
// C++ Function template specializations
|
||||
def err_function_template_spec_no_match : Error<
|
||||
"no function template matches function template specialization %0">;
|
||||
|
@ -4314,12 +4314,12 @@ def err_explicit_instantiation_out_of_scope : Error<
|
|||
def err_explicit_instantiation_must_be_global : Error<
|
||||
"explicit instantiation of %0 must occur at global scope">;
|
||||
def warn_explicit_instantiation_out_of_scope_0x : Warning<
|
||||
"explicit instantiation of %0 not in a namespace enclosing %1">,
|
||||
"explicit instantiation of %0 not in a namespace enclosing %1">,
|
||||
InGroup<CXX11Compat>, DefaultIgnore;
|
||||
def warn_explicit_instantiation_must_be_global_0x : Warning<
|
||||
"explicit instantiation of %0 must occur at global scope">,
|
||||
"explicit instantiation of %0 must occur at global scope">,
|
||||
InGroup<CXX11Compat>, DefaultIgnore;
|
||||
|
||||
|
||||
def err_explicit_instantiation_requires_name : Error<
|
||||
"explicit instantiation declaration requires a name">;
|
||||
def err_explicit_instantiation_of_typedef : Error<
|
||||
|
@ -4380,7 +4380,7 @@ def err_mismatched_exception_spec_explicit_instantiation : Error<
|
|||
def ext_mismatched_exception_spec_explicit_instantiation : ExtWarn<
|
||||
err_mismatched_exception_spec_explicit_instantiation.Text>,
|
||||
InGroup<MicrosoftExceptionSpec>;
|
||||
|
||||
|
||||
// C++ typename-specifiers
|
||||
def err_typename_nested_not_found : Error<"no type named %0 in %1">;
|
||||
def err_typename_nested_not_found_enable_if : Error<
|
||||
|
@ -4458,7 +4458,7 @@ def note_template_parameter_pack_non_pack : Note<
|
|||
def note_template_parameter_pack_here : Note<
|
||||
"previous %select{template type|non-type template|template template}0 "
|
||||
"parameter%select{| pack}1 declared here">;
|
||||
|
||||
|
||||
def err_unexpanded_parameter_pack : Error<
|
||||
"%select{expression|base type|declaration type|data member type|bit-field "
|
||||
"size|static assertion|fixed underlying type|enumerator value|"
|
||||
|
@ -4562,7 +4562,7 @@ def warn_missing_prototype : Warning<
|
|||
"no previous prototype for function %0">,
|
||||
InGroup<DiagGroup<"missing-prototypes">>, DefaultIgnore;
|
||||
def note_declaration_not_a_prototype : Note<
|
||||
"this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function">;
|
||||
"this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function">;
|
||||
def warn_strict_prototypes : Warning<
|
||||
"this %select{function declaration is not|block declaration is not|"
|
||||
"old-style function definition is not preceded by}0 a prototype">,
|
||||
|
@ -4770,7 +4770,7 @@ def ext_ms_forward_ref_enum : ExtWarn<
|
|||
def ext_forward_ref_enum_def : Extension<
|
||||
"redeclaration of already-defined enum %0 is a GNU extension">,
|
||||
InGroup<GNURedeclaredEnum>;
|
||||
|
||||
|
||||
def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">;
|
||||
def err_duplicate_member : Error<"duplicate member %0">;
|
||||
def err_misplaced_ivar : Error<
|
||||
|
@ -4789,7 +4789,7 @@ def ext_enumerator_increment_too_large : ExtWarn<
|
|||
def warn_flag_enum_constant_out_of_range : Warning<
|
||||
"enumeration value %0 is out of range of flags in enumeration type %1">,
|
||||
InGroup<FlagEnum>;
|
||||
|
||||
|
||||
def warn_illegal_constant_array_size : Extension<
|
||||
"size of static array must be an integer constant expression">;
|
||||
def err_vm_decl_in_file_scope : Error<
|
||||
|
@ -4894,7 +4894,7 @@ def err_illegal_initializer : Error<
|
|||
"illegal initializer (only variables can be initialized)">;
|
||||
def err_illegal_initializer_type : Error<"illegal initializer type %0">;
|
||||
def ext_init_list_type_narrowing : ExtWarn<
|
||||
"type %0 cannot be narrowed to %1 in initializer list">,
|
||||
"type %0 cannot be narrowed to %1 in initializer list">,
|
||||
InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure;
|
||||
def ext_init_list_variable_narrowing : ExtWarn<
|
||||
"non-constant-expression cannot be narrowed from type %0 to %1 in "
|
||||
|
@ -5232,9 +5232,9 @@ def err_arc_illegal_method_def : Error<
|
|||
def warn_arc_strong_pointer_objc_pointer : Warning<
|
||||
"method parameter of type %0 with no explicit ownership">,
|
||||
InGroup<DiagGroup<"explicit-ownership-type">>, DefaultIgnore;
|
||||
|
||||
|
||||
} // end "ARC Restrictions" category
|
||||
|
||||
|
||||
def err_arc_lost_method_convention : Error<
|
||||
"method was declared as %select{an 'alloc'|a 'copy'|an 'init'|a 'new'}0 "
|
||||
"method, but its implementation doesn't match because %select{"
|
||||
|
@ -5303,7 +5303,7 @@ def warn_receiver_forward_instance : Warning<
|
|||
InGroup<ForwardClassReceiver>, DefaultIgnore;
|
||||
def err_arc_collection_forward : Error<
|
||||
"collection expression type %0 is a forward declaration">;
|
||||
def err_arc_multiple_method_decl : Error<
|
||||
def err_arc_multiple_method_decl : Error<
|
||||
"multiple methods named %0 found with mismatched result, "
|
||||
"parameter type or attributes">;
|
||||
def warn_arc_lifetime_result_type : Warning<
|
||||
|
@ -5696,7 +5696,7 @@ def warn_namespace_member_extra_qualification : Warning<
|
|||
"extra qualification on member %0">,
|
||||
InGroup<DiagGroup<"extra-qualification">>;
|
||||
def err_member_qualification : Error<
|
||||
"non-friend class member %0 cannot have a qualified name">;
|
||||
"non-friend class member %0 cannot have a qualified name">;
|
||||
def note_member_def_close_match : Note<"member declaration nearly matches">;
|
||||
def note_member_def_close_const_match : Note<
|
||||
"member declaration does not match because "
|
||||
|
@ -5802,7 +5802,7 @@ def err_typecheck_invalid_lvalue_addrof_addrof_function : Error<
|
|||
def err_typecheck_invalid_lvalue_addrof : Error<
|
||||
"cannot take the address of an rvalue of type %0">;
|
||||
def ext_typecheck_addrof_temporary : ExtWarn<
|
||||
"taking the address of a temporary object of type %0">,
|
||||
"taking the address of a temporary object of type %0">,
|
||||
InGroup<AddressOfTemporary>, DefaultError;
|
||||
def err_typecheck_addrof_temporary : Error<
|
||||
"taking the address of a temporary object of type %0">;
|
||||
|
@ -5913,7 +5913,7 @@ def warn_mixed_sign_comparison : Warning<
|
|||
"comparison of integers of different signs: %0 and %1">,
|
||||
InGroup<SignCompare>, DefaultIgnore;
|
||||
def warn_out_of_range_compare : Warning<
|
||||
"result of comparison of %select{constant %0|true|false}1 with "
|
||||
"result of comparison of %select{constant %0|true|false}1 with "
|
||||
"%select{expression of type %2|boolean expression}3 is always %4">,
|
||||
InGroup<TautologicalOutOfRangeCompare>;
|
||||
def warn_tautological_bool_compare : Warning<warn_out_of_range_compare.Text>,
|
||||
|
@ -6071,7 +6071,7 @@ def err_no_subobject_property_setting : Error<
|
|||
"expression is not assignable">;
|
||||
def err_qualified_objc_access : Error<
|
||||
"%select{property|instance variable}0 access cannot be qualified with '%1'">;
|
||||
|
||||
|
||||
def ext_freestanding_complex : Extension<
|
||||
"complex numbers are an extension in a freestanding C99 implementation">;
|
||||
|
||||
|
@ -6237,13 +6237,13 @@ def warn_cxx98_compat_cast_fn_obj : Warning<
|
|||
def err_bad_reinterpret_cast_small_int : Error<
|
||||
"cast from pointer to smaller type %2 loses information">;
|
||||
def err_bad_cxx_cast_vector_to_scalar_different_size : Error<
|
||||
"%select{||reinterpret_cast||C-style cast|}0 from vector %1 "
|
||||
"%select{||reinterpret_cast||C-style cast|}0 from vector %1 "
|
||||
"to scalar %2 of different size">;
|
||||
def err_bad_cxx_cast_scalar_to_vector_different_size : Error<
|
||||
"%select{||reinterpret_cast||C-style cast|}0 from scalar %1 "
|
||||
"%select{||reinterpret_cast||C-style cast|}0 from scalar %1 "
|
||||
"to vector %2 of different size">;
|
||||
def err_bad_cxx_cast_vector_to_vector_different_size : Error<
|
||||
"%select{||reinterpret_cast||C-style cast|}0 from vector %1 "
|
||||
"%select{||reinterpret_cast||C-style cast|}0 from vector %1 "
|
||||
"to vector %2 of different size">;
|
||||
def err_bad_lvalue_to_rvalue_cast : Error<
|
||||
"cannot cast from lvalue of type %1 to rvalue reference type %2; types are "
|
||||
|
@ -6645,7 +6645,7 @@ def err_typecheck_nonviable_condition_incomplete : Error<
|
|||
def err_typecheck_deleted_function : Error<
|
||||
"conversion function %diff{from $ to $|between types}0,1 "
|
||||
"invokes a deleted function">;
|
||||
|
||||
|
||||
def err_expected_class_or_namespace : Error<"%0 is not a class"
|
||||
"%select{ or namespace|, namespace, or enumeration}1">;
|
||||
def err_invalid_declarator_scope : Error<"cannot define or redeclare %0 here "
|
||||
|
@ -7013,11 +7013,11 @@ def err_typecheck_call_too_many_args_at_most_suggest : Error<
|
|||
"too many %select{|||execution configuration }0arguments to "
|
||||
"%select{function|block|method|kernel function}0 call, "
|
||||
"expected at most %1, have %2; did you mean %3?">;
|
||||
|
||||
|
||||
def err_arc_typecheck_convert_incompatible_pointer : Error<
|
||||
"incompatible pointer types passing retainable parameter of type %0"
|
||||
"to a CF function expecting %1 type">;
|
||||
|
||||
|
||||
def err_builtin_fn_use : Error<"builtin functions must be directly called">;
|
||||
|
||||
def warn_call_wrong_number_of_arguments : Warning<
|
||||
|
@ -7508,8 +7508,8 @@ def err_reference_to_local_in_enclosing_context : Error<
|
|||
"%select{%3|block literal|lambda expression|context}2">;
|
||||
|
||||
def err_static_data_member_not_allowed_in_local_class : Error<
|
||||
"static data member %0 not allowed in local class %1">;
|
||||
|
||||
"static data member %0 not allowed in local class %1">;
|
||||
|
||||
// C++ derived classes
|
||||
def err_base_clause_on_union : Error<"unions cannot have base classes">;
|
||||
def err_base_must_be_class : Error<"base specifier must name a class">;
|
||||
|
@ -8222,7 +8222,7 @@ def err_vector_incorrect_num_initializers : Error<
|
|||
def err_altivec_empty_initializer : Error<"expected initializer">;
|
||||
|
||||
def err_invalid_neon_type_code : Error<
|
||||
"incompatible constant for this __builtin_neon function">;
|
||||
"incompatible constant for this __builtin_neon function">;
|
||||
def err_argument_invalid_range : Error<
|
||||
"argument value %0 is outside the valid range [%1, %2]">;
|
||||
def warn_argument_invalid_range : Warning<
|
||||
|
@ -8278,7 +8278,7 @@ def err_constant_integer_arg_type : Error<
|
|||
def ext_mixed_decls_code : Extension<
|
||||
"ISO C90 forbids mixing declarations and code">,
|
||||
InGroup<DiagGroup<"declaration-after-statement">>;
|
||||
|
||||
|
||||
def err_non_local_variable_decl_in_for : Error<
|
||||
"declaration of non-local variable in 'for' loop">;
|
||||
def err_non_variable_decl_in_for : Error<
|
||||
|
@ -8346,7 +8346,7 @@ def warn_nsconsumed_attribute_mismatch : Warning<
|
|||
err_nsconsumed_attribute_mismatch.Text>, InGroup<NSConsumedMismatch>;
|
||||
def warn_nsreturns_retained_attribute_mismatch : Warning<
|
||||
err_nsreturns_retained_attribute_mismatch.Text>, InGroup<NSReturnsMismatch>;
|
||||
|
||||
|
||||
def note_getter_unavailable : Note<
|
||||
"or because setter is declared here, but no getter method %0 is found">;
|
||||
def err_invalid_protocol_qualifiers : Error<
|
||||
|
@ -8602,7 +8602,7 @@ def err_opencl_extern_block_declaration : Error<
|
|||
def err_opencl_block_ref_block : Error<
|
||||
"cannot refer to a block inside block">;
|
||||
|
||||
// OpenCL v2.0 s6.13.9 - Address space qualifier functions.
|
||||
// OpenCL v2.0 s6.13.9 - Address space qualifier functions.
|
||||
def err_opencl_builtin_to_addr_arg_num : Error<
|
||||
"invalid number of arguments to function: %0">;
|
||||
def err_opencl_builtin_to_addr_invalid_arg : Error<
|
||||
|
|
|
@ -49,7 +49,7 @@ def err_pch_diagopt_mismatch : Error<"%0 is currently enabled, but was not in "
|
|||
"the PCH file">;
|
||||
def err_pch_modulecache_mismatch : Error<"PCH was compiled with module cache "
|
||||
"path '%0', but the path is currently '%1'">;
|
||||
|
||||
|
||||
def err_pch_version_too_old : Error<
|
||||
"PCH file uses an older PCH format that is no longer supported">;
|
||||
def err_pch_version_too_new : Error<
|
||||
|
|
|
@ -62,7 +62,7 @@ protected:
|
|||
|
||||
public:
|
||||
virtual ~FileSystemStatCache() = default;
|
||||
|
||||
|
||||
enum LookupResult {
|
||||
/// We know the file exists and its cached stat data.
|
||||
CacheExists,
|
||||
|
@ -90,10 +90,10 @@ public:
|
|||
void setNextStatCache(std::unique_ptr<FileSystemStatCache> Cache) {
|
||||
NextStatCache = std::move(Cache);
|
||||
}
|
||||
|
||||
|
||||
/// Retrieve the next stat call cache in the chain.
|
||||
FileSystemStatCache *getNextStatCache() { return NextStatCache.get(); }
|
||||
|
||||
|
||||
/// Retrieve the next stat call cache in the chain, transferring
|
||||
/// ownership of this cache (and, transitively, all of the remaining caches)
|
||||
/// to the caller.
|
||||
|
|
|
@ -63,7 +63,7 @@ class IdentifierInfo {
|
|||
bool IsPoisoned : 1; // True if identifier is poisoned.
|
||||
bool IsCPPOperatorKeyword : 1; // True if ident is a C++ operator keyword.
|
||||
bool NeedsHandleIdentifier : 1; // See "RecomputeNeedsHandleIdentifier".
|
||||
bool IsFromAST : 1; // True if identifier was loaded (at least
|
||||
bool IsFromAST : 1; // True if identifier was loaded (at least
|
||||
// partially) from an AST file.
|
||||
bool ChangedAfterLoad : 1; // True if identifier has changed from the
|
||||
// definition loaded from an AST file.
|
||||
|
@ -308,7 +308,7 @@ public:
|
|||
bool hasChangedSinceDeserialization() const {
|
||||
return ChangedAfterLoad;
|
||||
}
|
||||
|
||||
|
||||
/// Note that this identifier has changed since it was loaded from
|
||||
/// an AST file.
|
||||
void setChangedSinceDeserialization() {
|
||||
|
@ -320,7 +320,7 @@ public:
|
|||
bool hasFETokenInfoChangedSinceDeserialization() const {
|
||||
return FEChangedAfterLoad;
|
||||
}
|
||||
|
||||
|
||||
/// Note that the frontend token information for this identifier has
|
||||
/// changed since it was loaded from an AST file.
|
||||
void setFETokenInfoChangedSinceDeserialization() {
|
||||
|
@ -330,7 +330,7 @@ public:
|
|||
/// Determine whether the information for this identifier is out of
|
||||
/// date with respect to the external source.
|
||||
bool isOutOfDate() const { return OutOfDate; }
|
||||
|
||||
|
||||
/// Set whether the information for this identifier is out of
|
||||
/// date with respect to the external source.
|
||||
void setOutOfDate(bool OOD) {
|
||||
|
@ -340,10 +340,10 @@ public:
|
|||
else
|
||||
RecomputeNeedsHandleIdentifier();
|
||||
}
|
||||
|
||||
|
||||
/// Determine whether this is the contextual keyword \c import.
|
||||
bool isModulesImport() const { return IsModulesImport; }
|
||||
|
||||
|
||||
/// Set whether this identifier is the contextual keyword \c import.
|
||||
void setModulesImport(bool I) {
|
||||
IsModulesImport = I;
|
||||
|
@ -419,7 +419,7 @@ public:
|
|||
class IdentifierIterator {
|
||||
protected:
|
||||
IdentifierIterator() = default;
|
||||
|
||||
|
||||
public:
|
||||
IdentifierIterator(const IdentifierIterator &) = delete;
|
||||
IdentifierIterator &operator=(const IdentifierIterator &) = delete;
|
||||
|
@ -490,7 +490,7 @@ public:
|
|||
IdentifierInfoLookup *getExternalIdentifierLookup() const {
|
||||
return ExternalLookup;
|
||||
}
|
||||
|
||||
|
||||
llvm::BumpPtrAllocator& getAllocator() {
|
||||
return HashTable.getAllocator();
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ public:
|
|||
void AddKeywords(const LangOptions &LangOpts);
|
||||
};
|
||||
|
||||
/// A family of Objective-C methods.
|
||||
/// A family of Objective-C methods.
|
||||
///
|
||||
/// These families have no inherent meaning in the language, but are
|
||||
/// nonetheless central enough in the existing implementations to
|
||||
|
@ -687,13 +687,13 @@ class Selector {
|
|||
MultiKeywordSelector *getMultiKeywordSelector() const {
|
||||
return reinterpret_cast<MultiKeywordSelector *>(InfoPtr & ~ArgFlags);
|
||||
}
|
||||
|
||||
|
||||
unsigned getIdentifierInfoFlag() const {
|
||||
return InfoPtr & ArgFlags;
|
||||
}
|
||||
|
||||
static ObjCMethodFamily getMethodFamilyImpl(Selector sel);
|
||||
|
||||
|
||||
static ObjCStringFormatFamily getStringFormatFamilyImpl(Selector sel);
|
||||
|
||||
public:
|
||||
|
@ -730,11 +730,11 @@ public:
|
|||
}
|
||||
|
||||
unsigned getNumArgs() const;
|
||||
|
||||
|
||||
/// Retrieve the identifier at a given position in the selector.
|
||||
///
|
||||
/// Note that the identifier pointer returned may be NULL. Clients that only
|
||||
/// care about the text of the identifier string, and not the specific,
|
||||
/// care about the text of the identifier string, and not the specific,
|
||||
/// uniqued identifier pointer, should use \c getNameForSlot(), which returns
|
||||
/// an empty string when the identifier pointer would be NULL.
|
||||
///
|
||||
|
@ -745,7 +745,7 @@ public:
|
|||
/// \returns the uniqued identifier for this slot, or NULL if this slot has
|
||||
/// no corresponding identifier.
|
||||
IdentifierInfo *getIdentifierInfoForSlot(unsigned argIndex) const;
|
||||
|
||||
|
||||
/// Retrieve the name at a given position in the selector.
|
||||
///
|
||||
/// \param argIndex The index for which we want to retrieve the name.
|
||||
|
@ -755,7 +755,7 @@ public:
|
|||
/// \returns the name for this slot, which may be the empty string if no
|
||||
/// name was supplied.
|
||||
StringRef getNameForSlot(unsigned argIndex) const;
|
||||
|
||||
|
||||
/// Derive the full selector name (e.g. "foo:bar:") and return
|
||||
/// it as an std::string.
|
||||
std::string getAsString() const;
|
||||
|
@ -769,11 +769,11 @@ public:
|
|||
ObjCMethodFamily getMethodFamily() const {
|
||||
return getMethodFamilyImpl(*this);
|
||||
}
|
||||
|
||||
|
||||
ObjCStringFormatFamily getStringFormatFamily() const {
|
||||
return getStringFormatFamilyImpl(*this);
|
||||
}
|
||||
|
||||
|
||||
static Selector getEmptyMarker() {
|
||||
return Selector(uintptr_t(-1));
|
||||
}
|
||||
|
@ -781,7 +781,7 @@ public:
|
|||
static Selector getTombstoneMarker() {
|
||||
return Selector(uintptr_t(-2));
|
||||
}
|
||||
|
||||
|
||||
static ObjCInstanceTypeFamily getInstTypeMethodFamily(Selector sel);
|
||||
};
|
||||
|
||||
|
@ -901,7 +901,7 @@ struct PointerLikeTypeTraits<clang::Selector> {
|
|||
return clang::Selector(reinterpret_cast<uintptr_t>(P));
|
||||
}
|
||||
|
||||
enum { NumLowBitsAvailable = 0 };
|
||||
enum { NumLowBitsAvailable = 0 };
|
||||
};
|
||||
|
||||
// Provide PointerLikeTypeTraits for IdentifierInfo pointers, which
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace clang {
|
|||
using llvm::dyn_cast;
|
||||
using llvm::dyn_cast_or_null;
|
||||
using llvm::cast_or_null;
|
||||
|
||||
|
||||
// ADT's.
|
||||
using llvm::ArrayRef;
|
||||
using llvm::MutableArrayRef;
|
||||
|
|
|
@ -50,10 +50,10 @@ protected:
|
|||
class LangOptions : public LangOptionsBase {
|
||||
public:
|
||||
using Visibility = clang::Visibility;
|
||||
|
||||
|
||||
enum GCMode { NonGC, GCOnly, HybridGC };
|
||||
enum StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq };
|
||||
|
||||
|
||||
enum SignedOverflowBehaviorTy {
|
||||
// Default C standard behavior.
|
||||
SOB_Undefined,
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
clang::ObjCRuntime ObjCRuntime;
|
||||
|
||||
std::string ObjCConstantStringClass;
|
||||
|
||||
|
||||
/// The name of the handler function to be called when -ftrapv is
|
||||
/// specified.
|
||||
///
|
||||
|
@ -209,10 +209,10 @@ public:
|
|||
LangOptions();
|
||||
|
||||
// Define accessors/mutators for language options of enumeration type.
|
||||
#define LANGOPT(Name, Bits, Default, Description)
|
||||
#define LANGOPT(Name, Bits, Default, Description)
|
||||
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
|
||||
Type get##Name() const { return static_cast<Type>(Name); } \
|
||||
void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
|
||||
void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
|
||||
#include "clang/Basic/LangOptions.def"
|
||||
|
||||
/// Are we compiling a module interface (.cppm or module map)?
|
||||
|
@ -228,7 +228,7 @@ public:
|
|||
bool isSignedOverflowDefined() const {
|
||||
return getSignedOverflowBehavior() == SOB_Defined;
|
||||
}
|
||||
|
||||
|
||||
bool isSubscriptPointerArithmetic() const {
|
||||
return ObjCRuntime.isSubscriptPointerArithmetic() &&
|
||||
!ObjCSubscriptingLegacyRuntime;
|
||||
|
@ -309,7 +309,7 @@ enum TranslationUnitKind {
|
|||
/// The translation unit is a module.
|
||||
TU_Module
|
||||
};
|
||||
|
||||
|
||||
} // namespace clang
|
||||
|
||||
#endif // LLVM_CLANG_BASIC_LANGOPTIONS_H
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
namespace clang {
|
||||
|
||||
/// Describes the different kinds of linkage
|
||||
/// Describes the different kinds of linkage
|
||||
/// (C++ [basic.link], C99 6.2.2) that an entity may have.
|
||||
enum Linkage : unsigned char {
|
||||
/// No linkage, which means that the entity is unique and
|
||||
|
@ -31,7 +31,7 @@ enum Linkage : unsigned char {
|
|||
/// translation units).
|
||||
InternalLinkage,
|
||||
|
||||
/// External linkage within a unique namespace.
|
||||
/// External linkage within a unique namespace.
|
||||
///
|
||||
/// From the language perspective, these entities have external
|
||||
/// linkage. However, since they reside in an anonymous namespace,
|
||||
|
|
|
@ -44,7 +44,7 @@ class raw_ostream;
|
|||
} // namespace llvm
|
||||
|
||||
namespace clang {
|
||||
|
||||
|
||||
class LangOptions;
|
||||
class TargetInfo;
|
||||
|
||||
|
@ -66,7 +66,7 @@ class Module {
|
|||
public:
|
||||
/// The name of this module.
|
||||
std::string Name;
|
||||
|
||||
|
||||
/// The location of the module definition.
|
||||
SourceLocation DefinitionLoc;
|
||||
|
||||
|
@ -111,12 +111,12 @@ public:
|
|||
/// The module through which entities defined in this module will
|
||||
/// eventually be exposed, for use in "private" modules.
|
||||
std::string ExportAsModule;
|
||||
|
||||
|
||||
private:
|
||||
/// The submodules of this module, indexed by name.
|
||||
std::vector<Module *> SubModules;
|
||||
|
||||
/// A mapping from the submodule name to the index into the
|
||||
|
||||
/// A mapping from the submodule name to the index into the
|
||||
/// \c SubModules vector at which that submodule resides.
|
||||
llvm::StringMap<unsigned> SubModuleIndex;
|
||||
|
||||
|
@ -214,13 +214,13 @@ public:
|
|||
|
||||
/// Whether this module was loaded from a module file.
|
||||
unsigned IsFromModuleFile : 1;
|
||||
|
||||
|
||||
/// Whether this is a framework module.
|
||||
unsigned IsFramework : 1;
|
||||
|
||||
|
||||
/// Whether this is an explicit submodule.
|
||||
unsigned IsExplicit : 1;
|
||||
|
||||
|
||||
/// Whether this is a "system" module (which assumes that all
|
||||
/// headers in it are system headers).
|
||||
unsigned IsSystem : 1;
|
||||
|
@ -233,16 +233,16 @@ public:
|
|||
/// Whether this is an inferred submodule (module * { ... }).
|
||||
unsigned IsInferred : 1;
|
||||
|
||||
/// Whether we should infer submodules for this module based on
|
||||
/// Whether we should infer submodules for this module based on
|
||||
/// the headers.
|
||||
///
|
||||
/// Submodules can only be inferred for modules with an umbrella header.
|
||||
unsigned InferSubmodules : 1;
|
||||
|
||||
|
||||
/// Whether, when inferring submodules, the inferred submodules
|
||||
/// should be explicit.
|
||||
unsigned InferExplicitSubmodules : 1;
|
||||
|
||||
|
||||
/// Whether, when inferring submodules, the inferr submodules should
|
||||
/// export all modules they import (e.g., the equivalent of "export *").
|
||||
unsigned InferExportWildcard : 1;
|
||||
|
@ -280,31 +280,31 @@ public:
|
|||
/// The set of modules imported by this module, and on which this
|
||||
/// module depends.
|
||||
llvm::SmallSetVector<Module *, 2> Imports;
|
||||
|
||||
|
||||
/// Describes an exported module.
|
||||
///
|
||||
/// The pointer is the module being re-exported, while the bit will be true
|
||||
/// to indicate that this is a wildcard export.
|
||||
using ExportDecl = llvm::PointerIntPair<Module *, 1, bool>;
|
||||
|
||||
|
||||
/// The set of export declarations.
|
||||
SmallVector<ExportDecl, 2> Exports;
|
||||
|
||||
|
||||
/// Describes an exported module that has not yet been resolved
|
||||
/// (perhaps because the module it refers to has not yet been loaded).
|
||||
struct UnresolvedExportDecl {
|
||||
/// The location of the 'export' keyword in the module map file.
|
||||
SourceLocation ExportLoc;
|
||||
|
||||
|
||||
/// The name of the module.
|
||||
ModuleId Id;
|
||||
|
||||
|
||||
/// Whether this export declaration ends in a wildcard, indicating
|
||||
/// that all of its submodules should be exported (rather than the named
|
||||
/// module itself).
|
||||
bool Wildcard;
|
||||
};
|
||||
|
||||
|
||||
/// The set of export declarations that have yet to be resolved.
|
||||
SmallVector<UnresolvedExportDecl, 2> UnresolvedExports;
|
||||
|
||||
|
@ -320,7 +320,7 @@ public:
|
|||
LinkLibrary() = default;
|
||||
LinkLibrary(const std::string &Library, bool IsFramework)
|
||||
: Library(Library), IsFramework(IsFramework) {}
|
||||
|
||||
|
||||
/// The library to link against.
|
||||
///
|
||||
/// This will typically be a library or framework name, but can also
|
||||
|
@ -371,9 +371,9 @@ public:
|
|||
/// Construct a new module or submodule.
|
||||
Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent,
|
||||
bool IsFramework, bool IsExplicit, unsigned VisibilityID);
|
||||
|
||||
|
||||
~Module();
|
||||
|
||||
|
||||
/// Determine whether this module is available for use within the
|
||||
/// current translation unit.
|
||||
bool isAvailable() const { return IsAvailable; }
|
||||
|
@ -395,7 +395,7 @@ public:
|
|||
///
|
||||
/// \param ShadowingModule If this module is unavailable because it is
|
||||
/// shadowed, this parameter will be set to the shadowing module.
|
||||
bool isAvailable(const LangOptions &LangOpts,
|
||||
bool isAvailable(const LangOptions &LangOpts,
|
||||
const TargetInfo &Target,
|
||||
Requirement &Req,
|
||||
UnresolvedHeaderDirective &MissingHeader,
|
||||
|
@ -403,19 +403,19 @@ public:
|
|||
|
||||
/// Determine whether this module is a submodule.
|
||||
bool isSubModule() const { return Parent != nullptr; }
|
||||
|
||||
|
||||
/// Determine whether this module is a submodule of the given other
|
||||
/// module.
|
||||
bool isSubModuleOf(const Module *Other) const;
|
||||
|
||||
|
||||
/// Determine whether this module is a part of a framework,
|
||||
/// either because it is a framework module or because it is a submodule
|
||||
/// of a framework module.
|
||||
bool isPartOfFramework() const {
|
||||
for (const Module *Mod = this; Mod; Mod = Mod->Parent)
|
||||
for (const Module *Mod = this; Mod; Mod = Mod->Parent)
|
||||
if (Mod->IsFramework)
|
||||
return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -456,7 +456,7 @@ public:
|
|||
/// Retrieve the top-level module for this (sub)module, which may
|
||||
/// be this module.
|
||||
const Module *getTopLevelModule() const;
|
||||
|
||||
|
||||
/// Retrieve the name of the top-level module.
|
||||
StringRef getTopLevelModuleName() const {
|
||||
return getTopLevelModule()->Name;
|
||||
|
@ -552,7 +552,7 @@ public:
|
|||
|
||||
using submodule_iterator = std::vector<Module *>::iterator;
|
||||
using submodule_const_iterator = std::vector<Module *>::const_iterator;
|
||||
|
||||
|
||||
submodule_iterator submodule_begin() { return SubModules.begin(); }
|
||||
submodule_const_iterator submodule_begin() const {return SubModules.begin();}
|
||||
submodule_iterator submodule_end() { return SubModules.end(); }
|
||||
|
@ -575,9 +575,9 @@ public:
|
|||
return "<module-includes>";
|
||||
}
|
||||
|
||||
/// Print the module map for this module to the given stream.
|
||||
/// Print the module map for this module to the given stream.
|
||||
void print(raw_ostream &OS, unsigned Indent = 0) const;
|
||||
|
||||
|
||||
/// Dump the contents of this module to the given output stream.
|
||||
void dump() const;
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ public:
|
|||
llvm_unreachable("bad kind");
|
||||
}
|
||||
|
||||
/// Does this runtime natively provide the ARC entrypoints?
|
||||
/// Does this runtime natively provide the ARC entrypoints?
|
||||
///
|
||||
/// ARC cannot be directly supported on a platform that does not provide
|
||||
/// these entrypoints, although it may be supportable via a stub
|
||||
|
|
|
@ -27,7 +27,7 @@ enum OverloadedOperatorKind : int {
|
|||
NUM_OVERLOADED_OPERATORS
|
||||
};
|
||||
|
||||
/// Retrieve the spelling of the given overloaded operator, without
|
||||
/// Retrieve the spelling of the given overloaded operator, without
|
||||
/// the preceding "operator" keyword.
|
||||
const char *getOperatorSpelling(OverloadedOperatorKind Operator);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class SourceManager;
|
|||
/// source file (MemoryBuffer) along with its \#include path and \#line data.
|
||||
///
|
||||
class FileID {
|
||||
/// A mostly-opaque identifier, where 0 is "invalid", >0 is
|
||||
/// A mostly-opaque identifier, where 0 is "invalid", >0 is
|
||||
/// this module, and <-1 is something loaded from another module.
|
||||
int ID = 0;
|
||||
|
||||
|
@ -60,7 +60,7 @@ private:
|
|||
friend class ASTWriter;
|
||||
friend class ASTReader;
|
||||
friend class SourceManager;
|
||||
|
||||
|
||||
static FileID get(int V) {
|
||||
FileID F;
|
||||
F.ID = V;
|
||||
|
@ -221,7 +221,7 @@ public:
|
|||
return B != X.B || E != X.E;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/// Represents a character-granular source range.
|
||||
///
|
||||
/// The underlying SourceRange can either specify the starting/ending character
|
||||
|
@ -229,7 +229,7 @@ public:
|
|||
/// last token of the range (a "token range"). In the token range case, the
|
||||
/// size of the last token must be measured to determine the actual end of the
|
||||
/// range.
|
||||
class CharSourceRange {
|
||||
class CharSourceRange {
|
||||
SourceRange Range;
|
||||
bool IsTokenRange = false;
|
||||
|
||||
|
@ -244,7 +244,7 @@ public:
|
|||
static CharSourceRange getCharRange(SourceRange R) {
|
||||
return CharSourceRange(R, false);
|
||||
}
|
||||
|
||||
|
||||
static CharSourceRange getTokenRange(SourceLocation B, SourceLocation E) {
|
||||
return getTokenRange(SourceRange(B, E));
|
||||
}
|
||||
|
@ -252,21 +252,21 @@ public:
|
|||
static CharSourceRange getCharRange(SourceLocation B, SourceLocation E) {
|
||||
return getCharRange(SourceRange(B, E));
|
||||
}
|
||||
|
||||
|
||||
/// Return true if the end of this range specifies the start of
|
||||
/// the last token. Return false if the end of this range specifies the last
|
||||
/// character in the range.
|
||||
bool isTokenRange() const { return IsTokenRange; }
|
||||
bool isCharRange() const { return !IsTokenRange; }
|
||||
|
||||
|
||||
SourceLocation getBegin() const { return Range.getBegin(); }
|
||||
SourceLocation getEnd() const { return Range.getEnd(); }
|
||||
SourceRange getAsRange() const { return Range; }
|
||||
|
||||
|
||||
void setBegin(SourceLocation b) { Range.setBegin(b); }
|
||||
void setEnd(SourceLocation e) { Range.setEnd(e); }
|
||||
void setTokenRange(bool TR) { IsTokenRange = TR; }
|
||||
|
||||
|
||||
bool isValid() const { return Range.isValid(); }
|
||||
bool isInvalid() const { return !isValid(); }
|
||||
};
|
||||
|
@ -453,7 +453,7 @@ namespace llvm {
|
|||
return LHS == RHS;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <>
|
||||
struct isPodLike<clang::SourceLocation> { static const bool value = true; };
|
||||
template <>
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace SrcMgr {
|
|||
ContentCache(const FileEntry *Ent, const FileEntry *contentEnt)
|
||||
: Buffer(nullptr, false), OrigEntry(Ent), ContentsEntry(contentEnt),
|
||||
BufferOverridden(false), IsSystemFile(false), IsTransient(false) {}
|
||||
|
||||
|
||||
/// The copy ctor does not allow copies where source object has either
|
||||
/// a non-NULL Buffer or SourceLineCache. Ownership of allocated memory
|
||||
/// is not transferred, so this is a logical error.
|
||||
|
@ -1072,7 +1072,7 @@ public:
|
|||
unsigned FileOffset = Entry.getOffset();
|
||||
return SourceLocation::getFileLoc(FileOffset);
|
||||
}
|
||||
|
||||
|
||||
/// Return the source location corresponding to the last byte of the
|
||||
/// specified file.
|
||||
SourceLocation getLocForEndOfFile(FileID FID) const {
|
||||
|
@ -1080,7 +1080,7 @@ public:
|
|||
const SrcMgr::SLocEntry &Entry = getSLocEntry(FID, &Invalid);
|
||||
if (Invalid || !Entry.isFile())
|
||||
return SourceLocation();
|
||||
|
||||
|
||||
unsigned FileOffset = Entry.getOffset();
|
||||
return SourceLocation::getFileLoc(FileOffset + getFileIDSize(FID));
|
||||
}
|
||||
|
@ -1403,7 +1403,7 @@ public:
|
|||
PresumedLoc getPresumedLoc(SourceLocation Loc,
|
||||
bool UseLineDirectives = true) const;
|
||||
|
||||
/// Returns whether the PresumedLoc for a given SourceLocation is
|
||||
/// Returns whether the PresumedLoc for a given SourceLocation is
|
||||
/// in the main file.
|
||||
///
|
||||
/// This computes the "presumed" location for a SourceLocation, then checks
|
||||
|
|
|
@ -79,7 +79,7 @@ inline bool operator<(unsigned Offset, const LineEntry &E) {
|
|||
|
||||
/// Used to hold and unique data used to represent \#line information.
|
||||
class LineTableInfo {
|
||||
/// Map used to assign unique IDs to filenames in \#line directives.
|
||||
/// Map used to assign unique IDs to filenames in \#line directives.
|
||||
///
|
||||
/// This allows us to unique the filenames that
|
||||
/// frequently reoccur and reference them with indices. FilenameIDs holds
|
||||
|
|
|
@ -28,14 +28,14 @@ namespace clang {
|
|||
TSW_long,
|
||||
TSW_longlong
|
||||
};
|
||||
|
||||
|
||||
/// Specifies the signedness of a type, e.g., signed or unsigned.
|
||||
enum TypeSpecifierSign {
|
||||
TSS_unspecified,
|
||||
TSS_signed,
|
||||
TSS_unsigned
|
||||
};
|
||||
|
||||
|
||||
enum TypeSpecifiersPipe {
|
||||
TSP_unspecified,
|
||||
TSP_pipe
|
||||
|
@ -134,7 +134,7 @@ namespace clang {
|
|||
/// An Objective-C property is a logical field of an Objective-C
|
||||
/// object which is read and written via Objective-C method calls.
|
||||
OK_ObjCProperty,
|
||||
|
||||
|
||||
/// An Objective-C array/dictionary subscripting which reads an
|
||||
/// object or writes at the subscripted array/dictionary element via
|
||||
/// Objective-C method calls.
|
||||
|
|
|
@ -187,7 +187,7 @@ def TypoExpr : DStmt<Expr>;
|
|||
// Microsoft Extensions.
|
||||
def MSPropertyRefExpr : DStmt<Expr>;
|
||||
def MSPropertySubscriptExpr : DStmt<Expr>;
|
||||
def CXXUuidofExpr : DStmt<Expr>;
|
||||
def CXXUuidofExpr : DStmt<Expr>;
|
||||
def SEHTryStmt : Stmt;
|
||||
def SEHExceptStmt : Stmt;
|
||||
def SEHFinallyStmt : Stmt;
|
||||
|
|
|
@ -31,7 +31,7 @@ enum TemplateNameKind {
|
|||
/// The name refers to a variable template whose specialization produces a
|
||||
/// variable.
|
||||
TNK_Var_template,
|
||||
/// The name refers to a dependent template name:
|
||||
/// The name refers to a dependent template name:
|
||||
/// \code
|
||||
/// template<typename MetaFun, typename T1, typename T2> struct apply2 {
|
||||
/// typedef typename MetaFun::template apply<T1, T2>::type type;
|
||||
|
@ -39,7 +39,7 @@ enum TemplateNameKind {
|
|||
/// \endcode
|
||||
///
|
||||
/// Here, "apply" is a dependent template name within the typename
|
||||
/// specifier in the typedef. "apply" is a nested template, and
|
||||
/// specifier in the typedef. "apply" is a nested template, and
|
||||
/// whether the template name is assumed to refer to a type template or a
|
||||
/// function template depends on the context in which the template
|
||||
/// name occurs.
|
||||
|
|
|
@ -772,9 +772,9 @@ def RSHRN_HIGH_N : IOpInst<"vrshrn_high_n", "hmdi",
|
|||
"HsHiHlHUsHUiHUl", OP_NARROW_HI>;
|
||||
def QRSHRUN_HIGH_N : SOpInst<"vqrshrun_high_n", "hmdi",
|
||||
"HsHiHl", OP_NARROW_HI>;
|
||||
def QSHRN_HIGH_N : SOpInst<"vqshrn_high_n", "hmdi",
|
||||
def QSHRN_HIGH_N : SOpInst<"vqshrn_high_n", "hmdi",
|
||||
"HsHiHlHUsHUiHUl", OP_NARROW_HI>;
|
||||
def QRSHRN_HIGH_N : SOpInst<"vqrshrn_high_n", "hmdi",
|
||||
def QRSHRN_HIGH_N : SOpInst<"vqrshrn_high_n", "hmdi",
|
||||
"HsHiHlHUsHUiHUl", OP_NARROW_HI>;
|
||||
}
|
||||
|
||||
|
@ -927,7 +927,7 @@ def VMINV : SInst<"vminv", "sd", "csifUcUsUiQcQsQiQUcQUsQUiQfQd">;
|
|||
def VADDV : SInst<"vaddv", "sd", "csifUcUsUiQcQsQiQUcQUsQUiQfQdQlQUl">;
|
||||
def FMAXNMV : SInst<"vmaxnmv", "sd", "fQfQd">;
|
||||
def FMINNMV : SInst<"vminnmv", "sd", "fQfQd">;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Newly added Vector Extract for f64
|
||||
def VEXT_A64 : WInst<"vext", "dddi", "dQdPlQPl">;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue