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

Class Raw::MacroDecl

INTERNAL: Do not use. A declaration of a macro. Some examples:

@freestanding(declaration)
macro A() = #externalMacro(module: "A", type: "A")
@freestanding(expression)
macro B() = Builtin.B
@attached(member)
macro C() = C.C

Import path

import codeql.swift.generated.Raw

Direct supertypes

Indirect supertypes

Predicates

getName

Gets the name of this macro.

getParameter

Gets the indexth parameter of this macro (0-based).

getRole

Gets the indexth role of this macro (0-based).

toString

Inherited predicates

getGenericTypeParam

Gets the indexth generic type parameter of this generic context (0-based).

from GenericContext
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