CodeQL library for Swift
codeql/swift-all 3.0.1-dev (changelog, source)
Search

Class Raw::VarDecl

INTERNAL: Do not use. A declaration of a variable such as

  • a local variable in a function:
func foo() {
  var x = 42  // <-
  let y = "hello"  // <-
  ...
}
  • a member of a struct or class:
struct S {
  var size : Int  // <-
}

Import path

import codeql.swift.generated.Raw

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getAttachedPropertyWrapperType

Gets the attached property wrapper type of this variable declaration, if it exists.

getName

Gets the name of this variable declaration.

getParentInitializer

Gets the parent initializer of this variable declaration, if it exists.

getParentPattern

Gets the parent pattern of this variable declaration, if it exists.

getPropertyWrapperBackingVar

Gets the property wrapper backing variable of this variable declaration, if it exists.

getPropertyWrapperBackingVarBinding

Gets the property wrapper backing variable binding of this variable declaration, if it exists.

getPropertyWrapperProjectionVar

Gets the property wrapper projection variable of this variable declaration, if it exists.

getPropertyWrapperProjectionVarBinding

Gets the property wrapper projection variable binding of this variable declaration, if it exists.

getType

Gets the type of this variable declaration.

Inherited predicates

getAccessor

Gets the indexth accessor of this abstract storage declaration (0-based).

from AbstractStorageDecl
getInterfaceType

Gets the interface type of this value declaration.

from ValueDecl
getLocation

Gets the location associated with this element in the code, if it exists.

from Locatable
getMember

Gets the indexth member of this declaration (0-based).

from Decl
getModule

Gets the module of this declaration.

from Decl
isUnknown

Holds if this element is unknown.

from Element
toStringfrom Element