Class NestedUnion
A C/C++ nested union. For example, the type MyNestedUnion
in:
class MyClass {
public:
union MyNestedUnion {
int i;
float f;
};
};
Import path
import cpp
Direct supertypes
Indirect supertypes
Predicates
getAPrimaryQlClass | Gets the name of a primary CodeQL class to which this element belongs. |
isPrivate | Holds if this member is private. |
isProtected | Holds if this member is protected. |
isPublic | Holds if this member is public. |
Inherited predicates
accessOfBaseMember | Gets the access specifier, if any, that | from Class |
accessOfBaseMember | Gets the access specifier, if any, that a hypothetical member of | from Class |
canAccessClass | Holds if a base class | from AccessHolder |
canAccessMember | Holds if a non-static member | from AccessHolder |
couldAccessMember | Holds if a hypothetical non-static member of | from AccessHolder |
derivesFrom | Holds if this class/struct derives directly from that. | from Class |
explain | Gets a detailed string representation explaining the AST of this type (with all specifiers and nested constructs such as pointers). This is intended to help debug queries and is a very expensive operation; not to be used in production queries. | from Union |
findRootCause | Gets the source of this element: either itself or a macro that expanded to this element. | from Element |
fromSource | Holds if this element may be from source. This predicate holds for all elements, except for those in the dummy file, whose name is the empty string. The dummy file contains declarations that are built directly into the compiler. | from Element |
getABaseClass | Gets a direct base class/struct of this class/struct [N4140 10]. | from Class |
getABaseClassByteOffset | Gets the byte offset within | from Class |
getACanonicalMember | Gets a member declared in this class, struct or union. If you also want template instantiations of results, see | from Class |
getACanonicalMemberFunction | Gets a function declared in this class, struct or union. For template member functions, results include only the template. If you also want instantiations of the template, then use | from Class |
getACanonicalMemberVariable | Gets a member variable declared in this class, struct or union. For template member variables, results include only the template. If you also want instantiations of the template, then use | from Class |
getAConstructor | Gets a constructor of this class, struct or union. | from Class |
getADeclaration | Gets a child declaration of this class, struct or union. | from Class |
getADeclarationEntry | Gets a declaration entry corresponding to this declaration. See the comment above this class for an explanation of the relationship between | from UserType |
getADeclarationLocation | Gets the location of a declaration entry corresponding to this declaration. | from UserType |
getADerivation | Gets a class derivation of this class/struct, for example the | from Class |
getADerivedClass | Gets a class/struct that is directly derived from this class/struct [N4140 10]. | from Class |
getAField | Gets a field of this class, struct or union. | from Class |
getAFile | Gets a file where this element occurs. | from Declaration |
getAFriendDecl | Gets a friend declaration in this class, struct or union. | from Class |
getALinkTarget | Gets a link target which references this class, struct or union. | from Class |
getAMember | Gets a member declared in this class, struct or union. For template members, this may be either the template or an instantiation of that template. If you only want the template, see | from Class |
getAMember | Gets the (zero-based) | from Class |
getAMemberFunction | Gets a function declared in this class, struct or union. For template member functions, results include both the template and the instantiations of that template. If you only want the template, then use | from Class |
getAMemberVariable | Gets a member variable declared in this class, struct or union. For template member variables, results include both the template and the instantiations of that template. If you only want the template, then use | from Class |
getANameQualifier | Gets a name qualifier for which this is the qualifying namespace or user-defined type. For example: class | from NameQualifyingElement |
getANestedType | Gets a type declared in this class, struct or union. | from Class |
getAPrivateCanonicalMember | Gets a private canonical member declared in this class, struct or union. If you also want template instantiations of results, see | from Class |
getAPrivateMember | Gets a private member declared in this class, struct or union. For template members, this may be either the template or an instantiation of that template. For just the template, use | from Class |
getAProtectedCanonicalMember | Gets a protected canonical member declared in this class, struct or union. If you also want template instantiations of results, see | from Class |
getAProtectedMember | Gets a protected member declared in this class, struct or union. For template members, this may be either the template or an instantiation of that template. For just the template, use | from Class |
getAPublicCanonicalMember | Gets a public canonical member declared in this class, struct or union. If you also want template instantiations of results, see | from Class |
getAPublicMember | Gets a public member declared in this class, struct or union. For template members, this may be either the template or an instantiation of that template. For just the template, use | from Class |
getASpecifier | from UserType | |
getAStaticMember | Gets a static member declared in this class, struct or union. | from Class |
getATemplateArgument | Gets a template argument used to instantiate this declaration from a template. When called on a template, this will return a template parameter type for both typed and non-typed parameters. | from Declaration |
getATemplateArgumentKind | Gets a template argument used to instantiate this declaration from a template. When called on a template, this will return a non-typed template parameter value. | from Declaration |
getATypeNameUse | Gets as many places as possible where this type is used by name in the source after macros have been replaced (in particular, therefore, this will find type name uses caused by macros). Note that all type name uses within instantiations are currently excluded - this is too draconian in the absence of indexing prototype instantiations of functions, and is likely to improve in the future. At present, the method takes the conservative approach of giving valid type name uses, but not necessarily all type name uses. | from Type |
getAlignment | Gets the alignment of this type in bytes (on the machine where facts were extracted). | from Class |
getAnAttribute | Gets an attribute of this type. | from Type |
getCanonicalMember | Gets the (zero-based) | from Class |
getDeclaringType | Gets the class where this member is declared, if it is a member. For templates, both the template itself and all instantiations of the template are considered to have the same declaring class. | from Declaration |
getDefinition | Gets the declaration entry corresponding to this declaration that is a definition, if any. | from UserType |
getDefinitionLocation | Gets the location of the definition, if any. | from UserType |
getDerivation | Gets class derivation number | from Class |
getDescription | Gets a description of this | from Declaration |
getDestructor | Gets the destructor of this class, struct or union, if any. | from Class |
getEnclosingAccessHolder | Gets the nearest enclosing | from UserType |
getEnclosingElement | Gets the closest | from Element |
getEnclosingFunction | Gets the function that directly encloses this type (if any). | from UserType |
getFile | Gets the primary file where this element occurs. | from Element |
getLocation | Gets the preferred location of this declaration, if any. | from UserType |
getMetrics | Gets the metric class associated with this class, struct or union. | from Class |
getName | Gets the name of this type. | from UserType |
getNamespace | Gets the innermost namespace which contains this declaration. | from Declaration |
getNumberOfTemplateArguments | Gets the number of template arguments for this declaration. | from Declaration |
getParentScope | Gets the parent scope of this | from Element |
getPointerIndirectionLevel | Gets the pointer indirection level of this type. | from Type |
getPrimaryQlClasses | Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. | from ElementBase |
getQualifiedName | Gets the name of the declaration, fully qualified with its namespace and declaring type. | from Declaration |
getSimpleName | Gets the simple name of this type, without any template parameters. For example if the name of the type is | from UserType |
getSize | Gets the size of this type in bytes. | from Type |
getTemplateArgument | Gets the | from Declaration |
getTemplateArgumentKind | Gets the | from Declaration |
getUnderlyingType | Gets this type after typedefs have been resolved. | from Type |
getUnspecifiedType | Gets this type after specifiers have been deeply stripped and typedefs have been resolved. | from Type |
getUuid | Gets the UUID that associated with this class, struct or union via the | from Class |
getVirtualBaseClassByteOffset | Gets the byte offset of virtual base class subobject | from Class |
hasConstructor | Holds if this class, struct or union has a constructor. | from Class |
hasDeclaringType | Holds if this declaration is a member of a class/struct/union. | from Declaration |
hasDefinition | Holds if the declaration has a definition. | from Declaration |
hasDestructor | Holds if this class, struct or union has a destructor. | from Class |
hasGlobalName | Holds if this declaration has the given name in the global namespace. | from Declaration |
hasGlobalOrStdName | Holds if this declaration has the given name in the global namespace or the | from Declaration |
hasGlobalOrStdOrBslName | Holds if this declaration has the given name in the global namespace, the | from Declaration |
hasImplicitCopyAssignmentOperator | Holds if this class, struct or union has an implicitly-declared copy assignment operator that is not deleted. This predicate is more accurate than checking if this class, struct or union has a | from Class |
hasImplicitCopyConstructor | Holds if this class, struct or union has an implicitly-declared copy constructor that is not deleted. This predicate is more accurate than checking if this class, struct or union has a | from Class |
hasName | from UserType | |
hasPrivateBaseClass | Holds if this class/struct has a private class derivation, for example the | from Class |
hasProtectedBaseClass | Holds if this class/struct has a protected class derivation, for example the | from Class |
hasPublicBaseClass | Holds if this class/struct has a public class derivation, for example the | from Class |
hasQualifiedName | Holds if this declaration has a fully-qualified name with a name-space component of | from Declaration |
hasQualifiedName | Holds if this declaration has a fully-qualified name with a name-space component of | from Declaration |
hasSpecifier | from UserType | |
hasVirtualBaseClass | Holds if this class/struct has a virtual class derivation, for example the | from Class |
implicitCopyAssignmentOperatorDeleted | Holds if the compiler would be unable to generate a copy assignment operator for this class, struct or union. This predicate implements the rules listed here: http://en.cppreference.com/w/cpp/language/copy_assignment#Deleted_implicitly-declared_copy_assignment_operator | from Class |
implicitCopyConstructorDeleted | Holds if the compiler would be unable to generate a copy constructor for this class, struct or union. This predicate implements the rules listed here: http://en.cppreference.com/w/cpp/language/copy_constructor#Deleted_implicitly-declared_copy_constructor | from Class |
inMemberOrFriendOf | Holds if | from AccessHolder |
internal_getAnAdditionalSpecifier | Internal – should be | from Type |
involvesReference | Holds if this type involves a reference. | from Type |
involvesTemplateParameter | Holds if this type involves a template parameter. | from Class |
isAbstract | Holds if this class/struct is abstract, in other words whether it declares one or more pure virtual member functions. | from Class |
isAffectedByMacro | Holds if this element is affected in any way by a macro. All elements that are totally or partially generated by a macro are included, so this is a super-set of | from Element |
isAnonymous | Holds if this type is anonymous. | from UserType |
isConst | Holds if this type is const. | from Type |
isConstructedFrom | Holds if this class, struct or union is constructed from another class as a result of template instantiation. It originates either from a class template or from a class nested in a class template. | from Class |
isDeeplyConst | Holds if this type is constant and only contains constant types. For instance, a | from Type |
isDeeplyConstBelow | Holds if this type is constant and only contains constant types, excluding the type itself. It is implied by Type.isDeeplyConst() and is just used to implement that predicate. For example, | from Union |
isFinal | Holds if this class, struct or union was declared ‘final’. | from Class |
isFromTemplateInstantiation | Holds if this | from Element |
isFromUninstantiatedTemplate | Holds if this | from Element |
isInMacroExpansion | Holds if this element comes from a macro expansion. Only elements that are entirely generated by a macro are included - for elements that partially come from a macro, see | from Element |
isLocal | Holds if this is a local type (that is, a type that has a directly-enclosing function). | from UserType |
isMember | Holds if this declaration is a member of a class/struct/union. | from Declaration |
isPod | Holds if this class, struct or union is a POD (Plain Old Data) class [N4140 9(10)]. | from Class |
isPolymorphic | Holds if this class/struct is polymorphic (has a virtual function, or inherits one). | from Class |
isStandardLayout | Holds if this class, struct or union is a standard-layout class [N4140 9(7)]. Also holds for structs in C programs. | from Class |
isStatic | Holds if this declaration is static. | from Declaration |
isTopLevel | Holds if this declaration is a top-level declaration. | from Declaration |
isVolatile | Holds if this type is volatile. | from Type |
refersTo | Holds if this type refers to type | from Type |
refersToDirectly | Holds if this type refers to type | from Class |
resolveTypedefs | Gets this type with any typedefs resolved. For example, given | from Type |
stripTopLevelSpecifiers | Gets this type after any top-level specifiers and typedefs have been stripped. | from Type |
stripType | Gets the type stripped of pointers, references and cv-qualifiers, and resolving typedefs. For example, given | from Type |
toString | Gets a textual representation of this element. | from Declaration |