mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #17444 from hvitved/rust/final-classes
Rust/Swift: Make all public AST classes `final`
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
description: Changed the initial codegen comment.
|
||||
compatibility: full
|
||||
1832
swift/ql/.generated.list
generated
1832
swift/ql/.generated.list
generated
File diff suppressed because it is too large
Load Diff
302
swift/ql/.gitattributes
generated
vendored
302
swift/ql/.gitattributes
generated
vendored
@@ -1,397 +1,699 @@
|
||||
/.generated.list linguist-generated
|
||||
/.gitattributes linguist-generated
|
||||
/lib/codeql/swift/elements/AstNode.qll linguist-generated
|
||||
/lib/codeql/swift/elements/AvailabilityInfo.qll linguist-generated
|
||||
/lib/codeql/swift/elements/AvailabilityInfoConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/AvailabilitySpec.qll linguist-generated
|
||||
/lib/codeql/swift/elements/AvailabilitySpecImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/Callable.qll linguist-generated
|
||||
/lib/codeql/swift/elements/Comment.qll linguist-generated
|
||||
/lib/codeql/swift/elements/CommentConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/DbFile.qll linguist-generated
|
||||
/lib/codeql/swift/elements/DbFileConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/DbFileImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/DbLocation.qll linguist-generated
|
||||
/lib/codeql/swift/elements/DbLocationConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/DbLocationImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/Diagnostics.qll linguist-generated
|
||||
/lib/codeql/swift/elements/DiagnosticsConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/Element.qll linguist-generated
|
||||
/lib/codeql/swift/elements/ErrorElement.qll linguist-generated
|
||||
/lib/codeql/swift/elements/ErrorElementImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/File.qll linguist-generated
|
||||
/lib/codeql/swift/elements/KeyPathComponent.qll linguist-generated
|
||||
/lib/codeql/swift/elements/KeyPathComponentConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/Locatable.qll linguist-generated
|
||||
/lib/codeql/swift/elements/Location.qll linguist-generated
|
||||
/lib/codeql/swift/elements/MacroRole.qll linguist-generated
|
||||
/lib/codeql/swift/elements/MacroRoleConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/OtherAvailabilitySpec.qll linguist-generated
|
||||
/lib/codeql/swift/elements/OtherAvailabilitySpecConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/PlatformVersionAvailabilitySpec.qll linguist-generated
|
||||
/lib/codeql/swift/elements/PlatformVersionAvailabilitySpecConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/UnknownFile.qll linguist-generated
|
||||
/lib/codeql/swift/elements/UnknownLocation.qll linguist-generated
|
||||
/lib/codeql/swift/elements/UnspecifiedElement.qll linguist-generated
|
||||
/lib/codeql/swift/elements/UnspecifiedElementConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AbstractStorageDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AbstractStorageDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AbstractTypeParamDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AbstractTypeParamDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/Accessor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AccessorConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AccessorOrNamedFunction.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AccessorOrNamedFunctionImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AssociatedTypeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AssociatedTypeDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/AssociatedTypeDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/CapturedDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/CapturedDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ClassDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ClassDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ClassDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ConcreteVarDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ConcreteVarDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ConcreteVarDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/Decl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/Deinitializer.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/DeinitializerConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/EnumCaseDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/EnumCaseDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/EnumDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/EnumDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/EnumElementDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/EnumElementDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ExtensionDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ExtensionDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/Function.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/GenericContext.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/GenericContextImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/GenericTypeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/GenericTypeDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/GenericTypeParamDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/GenericTypeParamDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/GenericTypeParamDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/IfConfigDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/IfConfigDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ImportDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ImportDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/InfixOperatorDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/InfixOperatorDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/InfixOperatorDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/Initializer.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/InitializerConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/MacroDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/MacroDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/MacroDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/MissingMemberDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/MissingMemberDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ModuleDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ModuleDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ModuleDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/NamedFunction.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/NamedFunctionConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/NamedFunctionImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/NominalTypeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/OpaqueTypeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/OpaqueTypeDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/OpaqueTypeDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/OperatorDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ParamDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ParamDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PatternBindingDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PatternBindingDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PostfixOperatorDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PostfixOperatorDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PostfixOperatorDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PoundDiagnosticDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PoundDiagnosticDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PrecedenceGroupDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PrecedenceGroupDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PrefixOperatorDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PrefixOperatorDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/PrefixOperatorDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ProtocolDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ProtocolDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ProtocolDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/StructDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/StructDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/StructDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/SubscriptDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/SubscriptDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/TopLevelCodeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/TopLevelCodeDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/TypeAliasDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/TypeAliasDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/TypeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/ValueDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/VarDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AbiSafeConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AbiSafeConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AbiSafeConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AnyHashableErasureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AnyHashableErasureExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AnyHashableErasureExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AnyTryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AnyTryExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AppliedPropertyWrapperExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AppliedPropertyWrapperExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AppliedPropertyWrapperExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ApplyExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ArchetypeToSuperExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ArchetypeToSuperExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ArchetypeToSuperExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/Argument.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ArrayExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ArrayExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ArrayToPointerExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ArrayToPointerExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ArrayToPointerExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AssignExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AssignExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AutoClosureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AutoClosureExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AwaitExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AwaitExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BinaryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BinaryExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BindOptionalExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BindOptionalExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BooleanLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BooleanLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BorrowExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BorrowExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BorrowExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BridgeFromObjCExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BridgeFromObjCExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BridgeFromObjCExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BridgeToObjCExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BridgeToObjCExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BridgeToObjCExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/BuiltinLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CallExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CallExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CallExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CaptureListExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CaptureListExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CheckedCastExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CheckedCastExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ClassMetatypeToObjectExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ClassMetatypeToObjectExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ClassMetatypeToObjectExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ClosureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CoerceExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CoerceExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CoerceExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CollectionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CollectionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CollectionUpcastConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CollectionUpcastConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CollectionUpcastConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConditionalBridgeFromObjCExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConditionalBridgeFromObjCExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConditionalBridgeFromObjCExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConditionalCheckedCastExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConditionalCheckedCastExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConditionalCheckedCastExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConsumeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConsumeExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ConsumeExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CopyExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CopyExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CopyExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CovariantFunctionConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CovariantFunctionConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CovariantFunctionConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CovariantReturnConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CovariantReturnConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CovariantReturnConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DeclRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DeclRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DefaultArgumentExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DefaultArgumentExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DerivedToBaseExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DerivedToBaseExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DerivedToBaseExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DestructureTupleExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DestructureTupleExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DestructureTupleExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DictionaryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DictionaryExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DifferentiableFunctionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DifferentiableFunctionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DifferentiableFunctionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DifferentiableFunctionExtractOriginalExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DifferentiableFunctionExtractOriginalExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DiscardAssignmentExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DiscardAssignmentExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DotSelfExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DotSelfExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DotSyntaxBaseIgnoredExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DotSyntaxBaseIgnoredExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DotSyntaxCallExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DotSyntaxCallExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DynamicLookupExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DynamicLookupExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DynamicMemberRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DynamicMemberRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DynamicSubscriptExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DynamicSubscriptExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DynamicTypeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DynamicTypeExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/EnumIsCaseExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/EnumIsCaseExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ErasureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ErasureExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ErasureExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ErrorExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ErrorExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ErrorExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ExistentialMetatypeToObjectExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ExistentialMetatypeToObjectExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ExistentialMetatypeToObjectExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ExplicitCastExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ExplicitClosureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ExplicitClosureExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/Expr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/FloatLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/FloatLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForceTryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForceTryExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForceValueExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForceValueExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForcedCheckedCastExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForcedCheckedCastExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForcedCheckedCastExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForeignObjectConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForeignObjectConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForeignObjectConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/FunctionConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/FunctionConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/FunctionConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/IdentityExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/IfExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/IfExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ImplicitConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InOutExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InOutExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InOutToPointerExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InOutToPointerExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InOutToPointerExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InitializerRefCallExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InitializerRefCallExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InjectIntoOptionalExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InjectIntoOptionalExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InjectIntoOptionalExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/IntegerLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/IntegerLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InterpolatedStringLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/InterpolatedStringLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/IsExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/IsExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/KeyPathApplicationExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/KeyPathApplicationExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/KeyPathDotExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/KeyPathDotExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/KeyPathExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/KeyPathExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LazyInitializationExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LazyInitializationExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearFunctionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearFunctionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearFunctionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearFunctionExtractOriginalExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearFunctionExtractOriginalExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearFunctionExtractOriginalExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearToDifferentiableFunctionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearToDifferentiableFunctionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LinearToDifferentiableFunctionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LoadExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LoadExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LoadExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LookupExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/LookupExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MagicIdentifierLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MagicIdentifierLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MakeTemporarilyEscapableExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MakeTemporarilyEscapableExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MaterializePackExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MaterializePackExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MaterializePackExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MemberRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MemberRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MetatypeConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MetatypeConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MetatypeConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/MethodLookupExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/NilLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/NilLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/NumberLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/NumberLiteralExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ObjCSelectorExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ObjCSelectorExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ObjectLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ObjectLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OneWayExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OneWayExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OpaqueValueExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OpaqueValueExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OpaqueValueExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OpenExistentialExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OpenExistentialExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OpenExistentialExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OptionalEvaluationExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OptionalEvaluationExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OptionalEvaluationExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OptionalTryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OptionalTryExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OtherInitializerRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OtherInitializerRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OverloadedDeclRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OverloadedDeclRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/OverloadedDeclRefExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PackElementExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PackElementExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PackElementExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PackExpansionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PackExpansionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PackExpansionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ParenExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ParenExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PointerToPointerExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PointerToPointerExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PointerToPointerExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PostfixUnaryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PostfixUnaryExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PrefixUnaryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PrefixUnaryExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PropertyWrapperValuePlaceholderExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PropertyWrapperValuePlaceholderExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/PropertyWrapperValuePlaceholderExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ProtocolMetatypeToObjectExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ProtocolMetatypeToObjectExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ProtocolMetatypeToObjectExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/RebindSelfInInitializerExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/RebindSelfInInitializerExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/RegexLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/RegexLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SelfApplyExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SelfApplyExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SequenceExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SequenceExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SequenceExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SingleValueStmtExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SingleValueStmtExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SingleValueStmtExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/StringLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/StringLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/StringToPointerExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/StringToPointerExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/StringToPointerExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SubscriptExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SubscriptExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SuperRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/SuperRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TapExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TapExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TryExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TupleElementExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TupleElementExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TupleExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TupleExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TypeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/TypeExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnderlyingToOpaqueExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnderlyingToOpaqueExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnderlyingToOpaqueExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnevaluatedInstanceExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnevaluatedInstanceExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnevaluatedInstanceExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedDeclRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedDeclRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedDotExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedDotExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedMemberChainResultExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedMemberChainResultExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedMemberChainResultExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedMemberExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedMemberExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedMemberExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedPatternExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedPatternExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedPatternExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedSpecializeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedSpecializeExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedSpecializeExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedTypeConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedTypeConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedTypeConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/VarargExpansionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/VarargExpansionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/AnyPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/AnyPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/BindingPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/BindingPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/BoolPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/BoolPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/EnumElementPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/EnumElementPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/ExprPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/ExprPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/IsPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/IsPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/NamedPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/NamedPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/OptionalSomePattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/OptionalSomePatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/ParenPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/ParenPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/Pattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/TuplePattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/TuplePatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/TypedPattern.qll linguist-generated
|
||||
/lib/codeql/swift/elements/pattern/TypedPatternConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/BraceStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/BraceStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/BreakStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/BreakStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/CaseLabelItem.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/CaseLabelItemConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/CaseStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/CaseStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ConditionElement.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ConditionElementConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ContinueStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ContinueStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DeferStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DeferStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DiscardStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DiscardStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DiscardStmtImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DoCatchStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DoCatchStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DoStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/DoStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/FailStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/FailStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/FallthroughStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/FallthroughStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ForEachStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ForEachStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/GuardStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/GuardStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/IfStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/IfStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/LabeledConditionalStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/LabeledConditionalStmtImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/LabeledStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/PoundAssertStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/PoundAssertStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/RepeatWhileStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/RepeatWhileStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ReturnStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ReturnStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/Stmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/StmtCondition.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/StmtConditionConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/StmtImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/SwitchStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/SwitchStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ThenStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ThenStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ThenStmtImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ThrowStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/ThrowStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/WhileStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/WhileStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/YieldStmt.qll linguist-generated
|
||||
/lib/codeql/swift/elements/stmt/YieldStmtConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/AnyBuiltinIntegerType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/AnyBuiltinIntegerTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/AnyFunctionType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/AnyFunctionTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/AnyGenericType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/AnyGenericTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/AnyMetatypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/AnyMetatypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ArchetypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ArchetypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ArraySliceType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ArraySliceTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ArraySliceTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericClassType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericClassTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericClassTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericEnumType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericEnumTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericEnumTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericStructType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericStructTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericStructTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BoundGenericTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinBridgeObjectType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinBridgeObjectTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinBridgeObjectTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinDefaultActorStorageType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinDefaultActorStorageTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinDefaultActorStorageTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinExecutorType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinExecutorTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinExecutorTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinFloatType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinFloatTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinFloatTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinIntegerLiteralType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinIntegerLiteralTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinIntegerLiteralTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinIntegerType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinIntegerTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinIntegerTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinJobType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinJobTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinJobTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinNativeObjectType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinNativeObjectTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinNativeObjectTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinRawPointerType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinRawPointerTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinRawPointerTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinRawUnsafeContinuationType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinRawUnsafeContinuationTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinRawUnsafeContinuationTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinUnsafeValueBufferType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinUnsafeValueBufferTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinUnsafeValueBufferTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinVectorType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinVectorTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/BuiltinVectorTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ClassType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ClassTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ClassTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/DependentMemberType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/DependentMemberTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/DependentMemberTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/DictionaryType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/DictionaryTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/DictionaryTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/DynamicSelfType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/DynamicSelfTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ElementArchetypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ElementArchetypeTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ElementArchetypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/EnumType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/EnumTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/EnumTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ErrorType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ErrorTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ErrorTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ExistentialMetatypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ExistentialMetatypeTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ExistentialMetatypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ExistentialType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ExistentialTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ExistentialTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/FunctionType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/FunctionTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/FunctionTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/GenericFunctionType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/GenericFunctionTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/GenericFunctionTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/GenericTypeParamType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/GenericTypeParamTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/GenericTypeParamTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/InOutType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/InOutTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/InOutTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/LValueType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/LValueTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/LocalArchetypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/LocalArchetypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/MetatypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/MetatypeTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/MetatypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ModuleType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ModuleTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ModuleTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/NominalOrBoundGenericNominalType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/NominalOrBoundGenericNominalTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/NominalType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OpaqueTypeArchetypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OpaqueTypeArchetypeTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OpaqueTypeArchetypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OpenedArchetypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OpenedArchetypeTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OpenedArchetypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OptionalType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OptionalTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/OptionalTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackArchetypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackArchetypeTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackArchetypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackElementType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackElementTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackElementTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackExpansionType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackExpansionTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackExpansionTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PackTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ParameterizedProtocolType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ParameterizedProtocolTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ParameterizedProtocolTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ParenType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ParenTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ParenTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PrimaryArchetypeType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PrimaryArchetypeTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/PrimaryArchetypeTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ProtocolCompositionType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ProtocolCompositionTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ProtocolCompositionTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ProtocolType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ProtocolTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ProtocolTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ReferenceStorageType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/ReferenceStorageTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/StructType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/StructTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/StructTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/SubstitutableType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/SubstitutableTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/SugarType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/SugarTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/SyntaxSugarType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/SyntaxSugarTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/TupleType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/TupleTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/Type.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/TypeAliasType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/TypeAliasTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/TypeRepr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/TypeReprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnarySyntaxSugarType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnarySyntaxSugarTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnboundGenericType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnboundGenericTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnboundGenericTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnmanagedStorageType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnmanagedStorageTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnmanagedStorageTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnownedStorageType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnownedStorageTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnownedStorageTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnresolvedType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnresolvedTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/UnresolvedTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/VariadicSequenceType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/VariadicSequenceTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/WeakStorageType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/WeakStorageTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/WeakStorageTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements.qll linguist-generated
|
||||
/lib/codeql/swift/generated/AstNode.qll linguist-generated
|
||||
/lib/codeql/swift/generated/AvailabilityInfo.qll linguist-generated
|
||||
|
||||
2
swift/ql/lib/codeql/swift/elements.qll
generated
2
swift/ql/lib/codeql/swift/elements.qll
generated
@@ -1,4 +1,4 @@
|
||||
// generated by codegen/codegen.py
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module exports all modules providing `Element` subclasses.
|
||||
*/
|
||||
|
||||
85
swift/ql/lib/codeql/swift/elements/AstNode.qll
generated
85
swift/ql/lib/codeql/swift/elements/AstNode.qll
generated
@@ -1,84 +1,9 @@
|
||||
private import codeql.swift.generated.AstNode
|
||||
private import codeql.swift.elements.decl.Function
|
||||
private import codeql.swift.elements.decl.Decl
|
||||
private import codeql.swift.elements.expr.ClosureExpr
|
||||
private import codeql.swift.elements.Callable
|
||||
private import codeql.swift.generated.ParentChild
|
||||
|
||||
private module Cached {
|
||||
private Element getEnclosingDeclStep(Element e) {
|
||||
not e instanceof Decl and
|
||||
result = getImmediateParent(e)
|
||||
}
|
||||
|
||||
cached
|
||||
Decl getEnclosingDecl(AstNode ast) { result = getEnclosingDeclStep*(getImmediateParent(ast)) }
|
||||
|
||||
private Element getEnclosingFunctionStep(Element e) {
|
||||
not e instanceof Function and
|
||||
result = getEnclosingDecl(e)
|
||||
}
|
||||
|
||||
cached
|
||||
Function getEnclosingFunction(AstNode ast) {
|
||||
result = getEnclosingFunctionStep*(getEnclosingDecl(ast))
|
||||
}
|
||||
|
||||
private Element getEnclosingClosureStep(Element e) {
|
||||
not e instanceof Callable and
|
||||
result = getImmediateParent(e)
|
||||
}
|
||||
|
||||
cached
|
||||
ClosureExpr getEnclosingClosure(AstNode ast) {
|
||||
result = getEnclosingClosureStep*(getImmediateParent(ast))
|
||||
}
|
||||
}
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* A node in the abstract syntax tree.
|
||||
* This module provides the public class `AstNode`.
|
||||
*/
|
||||
class AstNode extends Generated::AstNode {
|
||||
/**
|
||||
* Gets the nearest function definition that contains this AST node, if any.
|
||||
* This includes functions, methods, (de)initializers, and accessors, but not closures.
|
||||
*
|
||||
* For example, in the following code, the AST node for `n + 1` has `foo` as its
|
||||
* enclosing function (via `getEnclosingFunction`), whereas its enclosing callable is
|
||||
* the closure `{(n : Int) in n + 1 }` (via `getEnclosingCallable`):
|
||||
*
|
||||
* ```swift
|
||||
* func foo() {
|
||||
* var f = { (n : Int) in n + 1 }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final Function getEnclosingFunction() { result = Cached::getEnclosingFunction(this) }
|
||||
|
||||
/**
|
||||
* Gets the nearest declaration that contains this AST node, if any.
|
||||
*
|
||||
* Note that the nearest declaration may be an extension of a type declaration. If you always
|
||||
* want the type declaration and not the extension, use `getEnclosingDecl().asNominalTypeDecl()`.
|
||||
*/
|
||||
final Decl getEnclosingDecl() { result = Cached::getEnclosingDecl(this) }
|
||||
private import AstNodeImpl
|
||||
import codeql.swift.elements.Locatable
|
||||
|
||||
/**
|
||||
* Gets the nearest `Callable` that contains this AST node, if any.
|
||||
* This includes (auto)closures, functions, methods, (de)initializers, and accessors.
|
||||
*
|
||||
* For example, in the following code, the AST node for `n + 1` has the closure
|
||||
* `{(n : Int) in n + 1 }` as its enclosing callable.
|
||||
*
|
||||
* ```swift
|
||||
* func foo() {
|
||||
* var f = { (n : Int) in n + 1 }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final Callable getEnclosingCallable() {
|
||||
if exists(Cached::getEnclosingClosure(this))
|
||||
then result = Cached::getEnclosingClosure(this)
|
||||
else result = Cached::getEnclosingFunction(this)
|
||||
}
|
||||
}
|
||||
final class AstNode = Impl::AstNode;
|
||||
|
||||
86
swift/ql/lib/codeql/swift/elements/AstNodeImpl.qll
Normal file
86
swift/ql/lib/codeql/swift/elements/AstNodeImpl.qll
Normal file
@@ -0,0 +1,86 @@
|
||||
private import codeql.swift.generated.AstNode
|
||||
private import codeql.swift.elements.decl.Function
|
||||
private import codeql.swift.elements.decl.Decl
|
||||
private import codeql.swift.elements.expr.ClosureExpr
|
||||
private import codeql.swift.elements.Callable
|
||||
private import codeql.swift.generated.ParentChild
|
||||
|
||||
module Impl {
|
||||
private module Cached {
|
||||
private Element getEnclosingDeclStep(Element e) {
|
||||
not e instanceof Decl and
|
||||
result = getImmediateParent(e)
|
||||
}
|
||||
|
||||
cached
|
||||
Decl getEnclosingDecl(AstNode ast) { result = getEnclosingDeclStep*(getImmediateParent(ast)) }
|
||||
|
||||
private Element getEnclosingFunctionStep(Element e) {
|
||||
not e instanceof Function and
|
||||
result = getEnclosingDecl(e)
|
||||
}
|
||||
|
||||
cached
|
||||
Function getEnclosingFunction(AstNode ast) {
|
||||
result = getEnclosingFunctionStep*(getEnclosingDecl(ast))
|
||||
}
|
||||
|
||||
private Element getEnclosingClosureStep(Element e) {
|
||||
not e instanceof Callable and
|
||||
result = getImmediateParent(e)
|
||||
}
|
||||
|
||||
cached
|
||||
ClosureExpr getEnclosingClosure(AstNode ast) {
|
||||
result = getEnclosingClosureStep*(getImmediateParent(ast))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A node in the abstract syntax tree.
|
||||
*/
|
||||
class AstNode extends Generated::AstNode {
|
||||
/**
|
||||
* Gets the nearest function definition that contains this AST node, if any.
|
||||
* This includes functions, methods, (de)initializers, and accessors, but not closures.
|
||||
*
|
||||
* For example, in the following code, the AST node for `n + 1` has `foo` as its
|
||||
* enclosing function (via `getEnclosingFunction`), whereas its enclosing callable is
|
||||
* the closure `{(n : Int) in n + 1 }` (via `getEnclosingCallable`):
|
||||
*
|
||||
* ```swift
|
||||
* func foo() {
|
||||
* var f = { (n : Int) in n + 1 }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final Function getEnclosingFunction() { result = Cached::getEnclosingFunction(this) }
|
||||
|
||||
/**
|
||||
* Gets the nearest declaration that contains this AST node, if any.
|
||||
*
|
||||
* Note that the nearest declaration may be an extension of a type declaration. If you always
|
||||
* want the type declaration and not the extension, use `getEnclosingDecl().asNominalTypeDecl()`.
|
||||
*/
|
||||
final Decl getEnclosingDecl() { result = Cached::getEnclosingDecl(this) }
|
||||
|
||||
/**
|
||||
* Gets the nearest `Callable` that contains this AST node, if any.
|
||||
* This includes (auto)closures, functions, methods, (de)initializers, and accessors.
|
||||
*
|
||||
* For example, in the following code, the AST node for `n + 1` has the closure
|
||||
* `{(n : Int) in n + 1 }` as its enclosing callable.
|
||||
*
|
||||
* ```swift
|
||||
* func foo() {
|
||||
* var f = { (n : Int) in n + 1 }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final Callable getEnclosingCallable() {
|
||||
if exists(Cached::getEnclosingClosure(this))
|
||||
then result = Cached::getEnclosingClosure(this)
|
||||
else result = Cached::getEnclosingFunction(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,12 @@
|
||||
private import codeql.swift.generated.AvailabilityInfo
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `AvailabilityInfo`.
|
||||
*/
|
||||
|
||||
private import AvailabilityInfoImpl
|
||||
import codeql.swift.elements.AstNode
|
||||
import codeql.swift.elements.AvailabilitySpec
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* An availability condition of an `if`, `while`, or `guard` statements.
|
||||
*
|
||||
@@ -16,10 +22,4 @@ private import codeql.swift.generated.AvailabilityInfo
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class AvailabilityInfo extends Generated::AvailabilityInfo {
|
||||
override string toString() {
|
||||
result = "#available" and not this.isUnavailable()
|
||||
or
|
||||
result = "#unavailable" and this.isUnavailable()
|
||||
}
|
||||
}
|
||||
final class AvailabilityInfo = Impl::AvailabilityInfo;
|
||||
|
||||
27
swift/ql/lib/codeql/swift/elements/AvailabilityInfoImpl.qll
Normal file
27
swift/ql/lib/codeql/swift/elements/AvailabilityInfoImpl.qll
Normal file
@@ -0,0 +1,27 @@
|
||||
private import codeql.swift.generated.AvailabilityInfo
|
||||
|
||||
module Impl {
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* An availability condition of an `if`, `while`, or `guard` statements.
|
||||
*
|
||||
* Examples:
|
||||
* ```
|
||||
* if #available(iOS 12, *) {
|
||||
* // Runs on iOS 12 and above
|
||||
* } else {
|
||||
* // Runs only anything below iOS 12
|
||||
* }
|
||||
* if #unavailable(macOS 10.14, *) {
|
||||
* // Runs only on macOS 10 and below
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class AvailabilityInfo extends Generated::AvailabilityInfo {
|
||||
override string toString() {
|
||||
result = "#available" and not this.isUnavailable()
|
||||
or
|
||||
result = "#unavailable" and this.isUnavailable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AvailabilitySpec`.
|
||||
* This module provides the public class `AvailabilitySpec`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.AvailabilitySpec
|
||||
private import AvailabilitySpecImpl
|
||||
import codeql.swift.elements.AstNode
|
||||
|
||||
/**
|
||||
* An availability spec, that is, part of an `AvailabilityInfo` condition. For example `iOS 12` and `*` in:
|
||||
@@ -11,4 +12,4 @@ private import codeql.swift.generated.AvailabilitySpec
|
||||
* if #available(iOS 12, *)
|
||||
* ```
|
||||
*/
|
||||
class AvailabilitySpec extends Generated::AvailabilitySpec { }
|
||||
final class AvailabilitySpec = Impl::AvailabilitySpec;
|
||||
|
||||
22
swift/ql/lib/codeql/swift/elements/AvailabilitySpecImpl.qll
generated
Normal file
22
swift/ql/lib/codeql/swift/elements/AvailabilitySpecImpl.qll
generated
Normal file
@@ -0,0 +1,22 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AvailabilitySpec`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.AvailabilitySpec
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `AvailabilitySpec` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* An availability spec, that is, part of an `AvailabilityInfo` condition. For example `iOS 12` and `*` in:
|
||||
* ```
|
||||
* if #available(iOS 12, *)
|
||||
* ```
|
||||
*/
|
||||
class AvailabilitySpec extends Generated::AvailabilitySpec { }
|
||||
}
|
||||
27
swift/ql/lib/codeql/swift/elements/Callable.qll
generated
27
swift/ql/lib/codeql/swift/elements/Callable.qll
generated
@@ -1,19 +1,12 @@
|
||||
private import codeql.swift.generated.Callable
|
||||
private import codeql.swift.elements.AstNode
|
||||
private import codeql.swift.elements.decl.Decl
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `Callable`.
|
||||
*/
|
||||
|
||||
class Callable extends Generated::Callable {
|
||||
/**
|
||||
* Holds if this Callable is a function named `funcName`.
|
||||
*/
|
||||
predicate hasName(string funcName) { this.getName() = funcName }
|
||||
private import CallableImpl
|
||||
import codeql.swift.elements.AstNode
|
||||
import codeql.swift.elements.stmt.BraceStmt
|
||||
import codeql.swift.elements.decl.CapturedDecl
|
||||
import codeql.swift.elements.decl.ParamDecl
|
||||
|
||||
/**
|
||||
* Holds if this Callable is a function named `funcName` defined in a module
|
||||
* called `moduleName`.
|
||||
*/
|
||||
predicate hasName(string moduleName, string funcName) {
|
||||
this.hasName(funcName) and
|
||||
this.(Decl).getModule().getFullName() = moduleName
|
||||
}
|
||||
}
|
||||
final class Callable = Impl::Callable;
|
||||
|
||||
21
swift/ql/lib/codeql/swift/elements/CallableImpl.qll
Normal file
21
swift/ql/lib/codeql/swift/elements/CallableImpl.qll
Normal file
@@ -0,0 +1,21 @@
|
||||
private import codeql.swift.generated.Callable
|
||||
private import codeql.swift.elements.AstNode
|
||||
private import codeql.swift.elements.decl.Decl
|
||||
|
||||
module Impl {
|
||||
class Callable extends Generated::Callable {
|
||||
/**
|
||||
* Holds if this Callable is a function named `funcName`.
|
||||
*/
|
||||
predicate hasName(string funcName) { this.getName() = funcName }
|
||||
|
||||
/**
|
||||
* Holds if this Callable is a function named `funcName` defined in a module
|
||||
* called `moduleName`.
|
||||
*/
|
||||
predicate hasName(string moduleName, string funcName) {
|
||||
this.hasName(funcName) and
|
||||
this.(Decl).getModule().getFullName() = moduleName
|
||||
}
|
||||
}
|
||||
}
|
||||
40
swift/ql/lib/codeql/swift/elements/Comment.qll
generated
40
swift/ql/lib/codeql/swift/elements/Comment.qll
generated
@@ -1,35 +1,9 @@
|
||||
private import codeql.swift.generated.Comment
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `Comment`.
|
||||
*/
|
||||
|
||||
class Comment extends Generated::Comment {
|
||||
/** toString */
|
||||
override string toString() { result = this.getText() }
|
||||
}
|
||||
private import CommentImpl
|
||||
import codeql.swift.elements.Locatable
|
||||
|
||||
class SingleLineComment extends Comment {
|
||||
SingleLineComment() {
|
||||
this.getText().matches("//%") and
|
||||
not this instanceof SingleLineDocComment
|
||||
}
|
||||
}
|
||||
|
||||
class MultiLineComment extends Comment {
|
||||
MultiLineComment() {
|
||||
this.getText().matches("/*%") and
|
||||
not this instanceof MultiLineDocComment
|
||||
}
|
||||
}
|
||||
|
||||
class DocComment extends Comment {
|
||||
DocComment() {
|
||||
this instanceof SingleLineDocComment or
|
||||
this instanceof MultiLineDocComment
|
||||
}
|
||||
}
|
||||
|
||||
class SingleLineDocComment extends Comment {
|
||||
SingleLineDocComment() { this.getText().matches("///%") }
|
||||
}
|
||||
|
||||
class MultiLineDocComment extends Comment {
|
||||
MultiLineDocComment() { this.getText().matches("/**%") }
|
||||
}
|
||||
final class Comment = Impl::Comment;
|
||||
|
||||
8
swift/ql/lib/codeql/swift/elements/CommentImpl.qll
Normal file
8
swift/ql/lib/codeql/swift/elements/CommentImpl.qll
Normal file
@@ -0,0 +1,8 @@
|
||||
private import codeql.swift.generated.Comment
|
||||
|
||||
module Impl {
|
||||
class Comment extends Generated::Comment {
|
||||
/** toString */
|
||||
override string toString() { result = this.getText() }
|
||||
}
|
||||
}
|
||||
27
swift/ql/lib/codeql/swift/elements/Comments.qll
Normal file
27
swift/ql/lib/codeql/swift/elements/Comments.qll
Normal file
@@ -0,0 +1,27 @@
|
||||
import Comment
|
||||
|
||||
final class SingleLineComment extends Comment {
|
||||
SingleLineComment() {
|
||||
this.getText().matches("//%") and
|
||||
not this instanceof SingleLineDocComment
|
||||
}
|
||||
}
|
||||
|
||||
final class MultiLineComment extends Comment {
|
||||
MultiLineComment() {
|
||||
this.getText().matches("/*%") and
|
||||
not this instanceof MultiLineDocComment
|
||||
}
|
||||
}
|
||||
|
||||
abstract private class DocCommentImpl extends Comment { }
|
||||
|
||||
final class DocComment = DocCommentImpl;
|
||||
|
||||
final class SingleLineDocComment extends DocCommentImpl {
|
||||
SingleLineDocComment() { this.getText().matches("///%") }
|
||||
}
|
||||
|
||||
final class MultiLineDocComment extends DocCommentImpl {
|
||||
MultiLineDocComment() { this.getText().matches("/**%") }
|
||||
}
|
||||
29
swift/ql/lib/codeql/swift/elements/CompilerDiagnostics.qll
Normal file
29
swift/ql/lib/codeql/swift/elements/CompilerDiagnostics.qll
Normal file
@@ -0,0 +1,29 @@
|
||||
import Diagnostics
|
||||
|
||||
/**
|
||||
* A compiler error message.
|
||||
*/
|
||||
final class CompilerError extends Diagnostics {
|
||||
CompilerError() { this.getSeverity() = "error" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A compiler-generated warning.
|
||||
*/
|
||||
final class CompilerWarning extends Diagnostics {
|
||||
CompilerWarning() { this.getSeverity() = "warning" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A compiler-generated note (typically attached to an error or warning).
|
||||
*/
|
||||
final class CompilerNote extends Diagnostics {
|
||||
CompilerNote() { this.getSeverity() = "note" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A compiler-generated remark (milder than a warning, this does not indicate an issue).
|
||||
*/
|
||||
final class CompilerRemark extends Diagnostics {
|
||||
CompilerRemark() { this.getSeverity() = "remark" }
|
||||
}
|
||||
9
swift/ql/lib/codeql/swift/elements/DbFile.qll
generated
9
swift/ql/lib/codeql/swift/elements/DbFile.qll
generated
@@ -1,8 +1,9 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `DbFile`.
|
||||
* This module provides the public class `DbFile`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.DbFile
|
||||
private import DbFileImpl
|
||||
import codeql.swift.elements.File
|
||||
|
||||
class DbFile extends Generated::DbFile { }
|
||||
final class DbFile = Impl::DbFile;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/DbFileImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/DbFileImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `DbFile`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.DbFile
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `DbFile` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class DbFile extends Generated::DbFile { }
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `DbLocation`.
|
||||
* This module provides the public class `DbLocation`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.DbLocation
|
||||
private import DbLocationImpl
|
||||
import codeql.swift.elements.Location
|
||||
|
||||
class DbLocation extends Generated::DbLocation { }
|
||||
final class DbLocation = Impl::DbLocation;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/DbLocationImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/DbLocationImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `DbLocation`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.DbLocation
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `DbLocation` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class DbLocation extends Generated::DbLocation { }
|
||||
}
|
||||
50
swift/ql/lib/codeql/swift/elements/Diagnostics.qll
generated
50
swift/ql/lib/codeql/swift/elements/Diagnostics.qll
generated
@@ -1,49 +1,9 @@
|
||||
private import codeql.swift.generated.Diagnostics
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* A compiler-generated error, warning, note or remark.
|
||||
* This module provides the public class `Diagnostics`.
|
||||
*/
|
||||
class Diagnostics extends Generated::Diagnostics {
|
||||
override string toString() { result = this.getSeverity() + ": " + this.getText() }
|
||||
|
||||
/**
|
||||
* Gets a string representing the severity of this compiler diagnostic.
|
||||
*/
|
||||
string getSeverity() {
|
||||
this.getKind() = 1 and result = "error"
|
||||
or
|
||||
this.getKind() = 2 and result = "warning"
|
||||
or
|
||||
this.getKind() = 3 and result = "note"
|
||||
or
|
||||
this.getKind() = 4 and result = "remark"
|
||||
}
|
||||
}
|
||||
private import DiagnosticsImpl
|
||||
import codeql.swift.elements.Locatable
|
||||
|
||||
/**
|
||||
* A compiler error message.
|
||||
*/
|
||||
class CompilerError extends Diagnostics {
|
||||
CompilerError() { this.getSeverity() = "error" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A compiler-generated warning.
|
||||
*/
|
||||
class CompilerWarning extends Diagnostics {
|
||||
CompilerWarning() { this.getSeverity() = "warning" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A compiler-generated note (typically attached to an error or warning).
|
||||
*/
|
||||
class CompilerNote extends Diagnostics {
|
||||
CompilerNote() { this.getSeverity() = "note" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A compiler-generated remark (milder than a warning, this does not indicate an issue).
|
||||
*/
|
||||
class CompilerRemark extends Diagnostics {
|
||||
CompilerRemark() { this.getSeverity() = "remark" }
|
||||
}
|
||||
final class Diagnostics = Impl::Diagnostics;
|
||||
|
||||
23
swift/ql/lib/codeql/swift/elements/DiagnosticsImpl.qll
Normal file
23
swift/ql/lib/codeql/swift/elements/DiagnosticsImpl.qll
Normal file
@@ -0,0 +1,23 @@
|
||||
private import codeql.swift.generated.Diagnostics
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* A compiler-generated error, warning, note or remark.
|
||||
*/
|
||||
class Diagnostics extends Generated::Diagnostics {
|
||||
override string toString() { result = this.getSeverity() + ": " + this.getText() }
|
||||
|
||||
/**
|
||||
* Gets a string representing the severity of this compiler diagnostic.
|
||||
*/
|
||||
string getSeverity() {
|
||||
this.getKind() = 1 and result = "error"
|
||||
or
|
||||
this.getKind() = 2 and result = "warning"
|
||||
or
|
||||
this.getKind() = 3 and result = "note"
|
||||
or
|
||||
this.getKind() = 4 and result = "remark"
|
||||
}
|
||||
}
|
||||
}
|
||||
24
swift/ql/lib/codeql/swift/elements/Element.qll
generated
24
swift/ql/lib/codeql/swift/elements/Element.qll
generated
@@ -1,20 +1,8 @@
|
||||
private import codeql.swift.generated.Element
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `Element`.
|
||||
*/
|
||||
|
||||
class Element extends Generated::Element {
|
||||
private predicate resolvesFrom(Element e) { e.getResolveStep() = this }
|
||||
private import ElementImpl
|
||||
|
||||
override string toString() { result = this.getPrimaryQlClasses() }
|
||||
|
||||
Element getFullyUnresolved() {
|
||||
not this.resolvesFrom(_) and result = this
|
||||
or
|
||||
exists(Element e |
|
||||
this.resolvesFrom(e) and
|
||||
result = e.getFullyUnresolved()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class UnknownElement extends Element {
|
||||
UnknownElement() { this.isUnknown() }
|
||||
}
|
||||
final class Element = Impl::Element;
|
||||
|
||||
22
swift/ql/lib/codeql/swift/elements/ElementImpl.qll
Normal file
22
swift/ql/lib/codeql/swift/elements/ElementImpl.qll
Normal file
@@ -0,0 +1,22 @@
|
||||
private import codeql.swift.generated.Element
|
||||
|
||||
module Impl {
|
||||
class Element extends Generated::Element {
|
||||
private predicate resolvesFrom(Element e) { e.getResolveStep() = this }
|
||||
|
||||
override string toString() { result = this.getPrimaryQlClasses() }
|
||||
|
||||
Element getFullyUnresolved() {
|
||||
not this.resolvesFrom(_) and result = this
|
||||
or
|
||||
exists(Element e |
|
||||
this.resolvesFrom(e) and
|
||||
result = e.getFullyUnresolved()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class UnknownElement extends Element {
|
||||
UnknownElement() { this.isUnknown() }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ErrorElement`.
|
||||
* This module provides the public class `ErrorElement`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.ErrorElement
|
||||
private import ErrorElementImpl
|
||||
import codeql.swift.elements.Locatable
|
||||
|
||||
/**
|
||||
* The superclass of all elements indicating some kind of error.
|
||||
*/
|
||||
class ErrorElement extends Generated::ErrorElement { }
|
||||
final class ErrorElement = Impl::ErrorElement;
|
||||
|
||||
19
swift/ql/lib/codeql/swift/elements/ErrorElementImpl.qll
generated
Normal file
19
swift/ql/lib/codeql/swift/elements/ErrorElementImpl.qll
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ErrorElement`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.ErrorElement
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ErrorElement` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* The superclass of all elements indicating some kind of error.
|
||||
*/
|
||||
class ErrorElement extends Generated::ErrorElement { }
|
||||
}
|
||||
112
swift/ql/lib/codeql/swift/elements/File.qll
generated
112
swift/ql/lib/codeql/swift/elements/File.qll
generated
@@ -1,107 +1,9 @@
|
||||
private import codeql.swift.generated.File
|
||||
private import codeql.swift.elements.Location
|
||||
private import codeql.swift.elements.UnknownLocation
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `File`.
|
||||
*/
|
||||
|
||||
class File extends Generated::File {
|
||||
/** toString */
|
||||
override string toString() { result = this.getAbsolutePath() }
|
||||
private import FileImpl
|
||||
import codeql.swift.elements.Element
|
||||
|
||||
/** Gets the absolute path of this file. */
|
||||
string getAbsolutePath() { result = this.getName() }
|
||||
|
||||
/** Gets the full name of this file. */
|
||||
string getFullName() { result = this.getAbsolutePath() }
|
||||
|
||||
/** Gets the URL of this file. */
|
||||
string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
|
||||
|
||||
/**
|
||||
* Holds if either,
|
||||
* - `part` is the base name of this container and `i = 1`, or
|
||||
* - `part` is the stem of this container and `i = 2`, or
|
||||
* - `part` is the extension of this container and `i = 3`.
|
||||
*/
|
||||
cached
|
||||
private predicate splitAbsolutePath(string part, int i) {
|
||||
part = this.getAbsolutePath().regexpCapture(".*/(([^/]*?)(?:\\.([^.]*))?)", i)
|
||||
}
|
||||
|
||||
/** Gets the base name of this file. */
|
||||
string getBaseName() { this.splitAbsolutePath(result, 1) }
|
||||
|
||||
/**
|
||||
* Gets the extension of this container, that is, the suffix of its base name
|
||||
* after the last dot character, if any.
|
||||
*
|
||||
* In particular,
|
||||
*
|
||||
* - if the name does not include a dot, there is no extension, so this
|
||||
* predicate has no result;
|
||||
* - if the name ends in a dot, the extension is the empty string;
|
||||
* - if the name contains multiple dots, the extension follows the last dot.
|
||||
*
|
||||
* Here are some examples of absolute paths and the corresponding extensions
|
||||
* (surrounded with quotes to avoid ambiguity):
|
||||
*
|
||||
* <table border="1">
|
||||
* <tr><th>Absolute path</th><th>Extension</th></tr>
|
||||
* <tr><td>"/tmp/tst.txt"</td><td>"txt"</td></tr>
|
||||
* <tr><td>"/tmp/.classpath"</td><td>"classpath"</td></tr>
|
||||
* <tr><td>"/bin/bash"</td><td>not defined</td></tr>
|
||||
* <tr><td>"/tmp/tst2."</td><td>""</td></tr>
|
||||
* <tr><td>"/tmp/x.tar.gz"</td><td>"gz"</td></tr>
|
||||
* </table>
|
||||
*/
|
||||
string getExtension() { this.splitAbsolutePath(result, 3) }
|
||||
|
||||
/**
|
||||
* Gets the stem of this container, that is, the prefix of its base name up to
|
||||
* (but not including) the last dot character if there is one, or the entire
|
||||
* base name if there is not.
|
||||
*
|
||||
* Here are some examples of absolute paths and the corresponding stems
|
||||
* (surrounded with quotes to avoid ambiguity):
|
||||
*
|
||||
* <table border="1">
|
||||
* <tr><th>Absolute path</th><th>Stem</th></tr>
|
||||
* <tr><td>"/tmp/tst.txt"</td><td>"tst"</td></tr>
|
||||
* <tr><td>"/tmp/.classpath"</td><td>""</td></tr>
|
||||
* <tr><td>"/bin/bash"</td><td>"bash"</td></tr>
|
||||
* <tr><td>"/tmp/tst2."</td><td>"tst2"</td></tr>
|
||||
* <tr><td>"/tmp/x.tar.gz"</td><td>"x.tar"</td></tr>
|
||||
* </table>
|
||||
*/
|
||||
string getStem() { this.splitAbsolutePath(result, 2) }
|
||||
|
||||
/**
|
||||
* Gets the number of lines containing code in this file. This value
|
||||
* is approximate.
|
||||
*/
|
||||
int getNumberOfLinesOfCode() {
|
||||
result =
|
||||
count(int line |
|
||||
exists(Location loc |
|
||||
not loc instanceof UnknownLocation and loc.getFile() = this and loc.getStartLine() = line
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the relative path of this file from the root folder of the
|
||||
* analyzed source location. The relative path of the root folder itself
|
||||
* would be the empty string.
|
||||
*
|
||||
* This has no result if the file is outside the source root, that is,
|
||||
* if the root folder is not a reflexive, transitive parent of this file.
|
||||
*/
|
||||
string getRelativePath() {
|
||||
exists(string absPath, string pref |
|
||||
absPath = this.getAbsolutePath() and sourceLocationPrefix(pref)
|
||||
|
|
||||
absPath = pref and result = ""
|
||||
or
|
||||
absPath = pref.regexpReplaceAll("/$", "") + "/" + result and
|
||||
not result.matches("/%")
|
||||
)
|
||||
}
|
||||
}
|
||||
final class File = Impl::File;
|
||||
|
||||
111
swift/ql/lib/codeql/swift/elements/FileImpl.qll
Normal file
111
swift/ql/lib/codeql/swift/elements/FileImpl.qll
Normal file
@@ -0,0 +1,111 @@
|
||||
private import codeql.swift.generated.File
|
||||
private import codeql.swift.elements.Location
|
||||
private import codeql.swift.elements.UnknownLocation
|
||||
|
||||
module Impl {
|
||||
class File extends Generated::File {
|
||||
/** toString */
|
||||
override string toString() { result = this.getAbsolutePath() }
|
||||
|
||||
/** Gets the absolute path of this file. */
|
||||
string getAbsolutePath() { result = this.getName() }
|
||||
|
||||
/** Gets the full name of this file. */
|
||||
string getFullName() { result = this.getAbsolutePath() }
|
||||
|
||||
/** Gets the URL of this file. */
|
||||
string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
|
||||
|
||||
/**
|
||||
* Holds if either,
|
||||
* - `part` is the base name of this container and `i = 1`, or
|
||||
* - `part` is the stem of this container and `i = 2`, or
|
||||
* - `part` is the extension of this container and `i = 3`.
|
||||
*/
|
||||
cached
|
||||
private predicate splitAbsolutePath(string part, int i) {
|
||||
part = this.getAbsolutePath().regexpCapture(".*/(([^/]*?)(?:\\.([^.]*))?)", i)
|
||||
}
|
||||
|
||||
/** Gets the base name of this file. */
|
||||
string getBaseName() { this.splitAbsolutePath(result, 1) }
|
||||
|
||||
/**
|
||||
* Gets the extension of this container, that is, the suffix of its base name
|
||||
* after the last dot character, if any.
|
||||
*
|
||||
* In particular,
|
||||
*
|
||||
* - if the name does not include a dot, there is no extension, so this
|
||||
* predicate has no result;
|
||||
* - if the name ends in a dot, the extension is the empty string;
|
||||
* - if the name contains multiple dots, the extension follows the last dot.
|
||||
*
|
||||
* Here are some examples of absolute paths and the corresponding extensions
|
||||
* (surrounded with quotes to avoid ambiguity):
|
||||
*
|
||||
* <table border="1">
|
||||
* <tr><th>Absolute path</th><th>Extension</th></tr>
|
||||
* <tr><td>"/tmp/tst.txt"</td><td>"txt"</td></tr>
|
||||
* <tr><td>"/tmp/.classpath"</td><td>"classpath"</td></tr>
|
||||
* <tr><td>"/bin/bash"</td><td>not defined</td></tr>
|
||||
* <tr><td>"/tmp/tst2."</td><td>""</td></tr>
|
||||
* <tr><td>"/tmp/x.tar.gz"</td><td>"gz"</td></tr>
|
||||
* </table>
|
||||
*/
|
||||
string getExtension() { this.splitAbsolutePath(result, 3) }
|
||||
|
||||
/**
|
||||
* Gets the stem of this container, that is, the prefix of its base name up to
|
||||
* (but not including) the last dot character if there is one, or the entire
|
||||
* base name if there is not.
|
||||
*
|
||||
* Here are some examples of absolute paths and the corresponding stems
|
||||
* (surrounded with quotes to avoid ambiguity):
|
||||
*
|
||||
* <table border="1">
|
||||
* <tr><th>Absolute path</th><th>Stem</th></tr>
|
||||
* <tr><td>"/tmp/tst.txt"</td><td>"tst"</td></tr>
|
||||
* <tr><td>"/tmp/.classpath"</td><td>""</td></tr>
|
||||
* <tr><td>"/bin/bash"</td><td>"bash"</td></tr>
|
||||
* <tr><td>"/tmp/tst2."</td><td>"tst2"</td></tr>
|
||||
* <tr><td>"/tmp/x.tar.gz"</td><td>"x.tar"</td></tr>
|
||||
* </table>
|
||||
*/
|
||||
string getStem() { this.splitAbsolutePath(result, 2) }
|
||||
|
||||
/**
|
||||
* Gets the number of lines containing code in this file. This value
|
||||
* is approximate.
|
||||
*/
|
||||
int getNumberOfLinesOfCode() {
|
||||
result =
|
||||
count(int line |
|
||||
exists(Location loc |
|
||||
not loc instanceof UnknownLocation and
|
||||
loc.getFile() = this and
|
||||
loc.getStartLine() = line
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the relative path of this file from the root folder of the
|
||||
* analyzed source location. The relative path of the root folder itself
|
||||
* would be the empty string.
|
||||
*
|
||||
* This has no result if the file is outside the source root, that is,
|
||||
* if the root folder is not a reflexive, transitive parent of this file.
|
||||
*/
|
||||
string getRelativePath() {
|
||||
exists(string absPath, string pref |
|
||||
absPath = this.getAbsolutePath() and sourceLocationPrefix(pref)
|
||||
|
|
||||
absPath = pref and result = ""
|
||||
or
|
||||
absPath = pref.regexpReplaceAll("/$", "") + "/" + result and
|
||||
not result.matches("/%")
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,62 +1,15 @@
|
||||
private import codeql.swift.generated.KeyPathComponent
|
||||
private import swift
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `KeyPathComponent`.
|
||||
*/
|
||||
|
||||
private import KeyPathComponentImpl
|
||||
import codeql.swift.elements.expr.Argument
|
||||
import codeql.swift.elements.AstNode
|
||||
import codeql.swift.elements.type.Type
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A component of a `KeyPathExpr`.
|
||||
*/
|
||||
class KeyPathComponent extends Generated::KeyPathComponent {
|
||||
/**
|
||||
* Property access like `.bar` in `\Foo.bar`.
|
||||
*/
|
||||
predicate isProperty() { this.getKind() = 3 }
|
||||
|
||||
/**
|
||||
* Array or dictionary subscript like `[1]` or `["a", "b"]`.
|
||||
*/
|
||||
predicate isSubscript() { this.getKind() = 4 }
|
||||
|
||||
/**
|
||||
* Optional forcing `!`.
|
||||
*/
|
||||
predicate isOptionalForcing() { this.getKind() = 5 }
|
||||
|
||||
/**
|
||||
* Optional chaining `?`.
|
||||
*/
|
||||
predicate isOptionalChaining() { this.getKind() = 6 }
|
||||
|
||||
/**
|
||||
* Implicit optional wrapping component inserted by the compiler when an optional chain ends in a non-optional value.
|
||||
*/
|
||||
predicate isOptionalWrapping() { this.getKind() = 7 }
|
||||
|
||||
/**
|
||||
* Reference to the entire object; the `self` in `\Foo.self`.
|
||||
*/
|
||||
predicate isSelf() { this.getKind() = 8 }
|
||||
|
||||
/**
|
||||
* Tuple indexing like `.1`.
|
||||
*/
|
||||
predicate isTupleIndexing() { this.getKind() = 9 }
|
||||
|
||||
/** Gets the underlying key-path expression which this is a component of. */
|
||||
KeyPathExpr getKeyPathExpr() { result.getAComponent() = this }
|
||||
|
||||
/** Holds if this component is the i'th component of the underling key-path expression. */
|
||||
predicate hasIndex(int i) { any(KeyPathExpr e).getComponent(i) = this }
|
||||
|
||||
/** Gets the next component of the underlying key-path expression. */
|
||||
KeyPathComponent getNextComponent() {
|
||||
exists(int i, KeyPathExpr e |
|
||||
hasKeyPathExprAndIndex(e, i, this) and
|
||||
hasKeyPathExprAndIndex(e, i + 1, result)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate hasKeyPathExprAndIndex(KeyPathExpr e, int i, KeyPathComponent c) {
|
||||
e.getComponent(i) = c
|
||||
}
|
||||
final class KeyPathComponent = Impl::KeyPathComponent;
|
||||
|
||||
64
swift/ql/lib/codeql/swift/elements/KeyPathComponentImpl.qll
Normal file
64
swift/ql/lib/codeql/swift/elements/KeyPathComponentImpl.qll
Normal file
@@ -0,0 +1,64 @@
|
||||
private import codeql.swift.generated.KeyPathComponent
|
||||
private import swift
|
||||
|
||||
module Impl {
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A component of a `KeyPathExpr`.
|
||||
*/
|
||||
class KeyPathComponent extends Generated::KeyPathComponent {
|
||||
/**
|
||||
* Property access like `.bar` in `\Foo.bar`.
|
||||
*/
|
||||
predicate isProperty() { this.getKind() = 3 }
|
||||
|
||||
/**
|
||||
* Array or dictionary subscript like `[1]` or `["a", "b"]`.
|
||||
*/
|
||||
predicate isSubscript() { this.getKind() = 4 }
|
||||
|
||||
/**
|
||||
* Optional forcing `!`.
|
||||
*/
|
||||
predicate isOptionalForcing() { this.getKind() = 5 }
|
||||
|
||||
/**
|
||||
* Optional chaining `?`.
|
||||
*/
|
||||
predicate isOptionalChaining() { this.getKind() = 6 }
|
||||
|
||||
/**
|
||||
* Implicit optional wrapping component inserted by the compiler when an optional chain ends in a non-optional value.
|
||||
*/
|
||||
predicate isOptionalWrapping() { this.getKind() = 7 }
|
||||
|
||||
/**
|
||||
* Reference to the entire object; the `self` in `\Foo.self`.
|
||||
*/
|
||||
predicate isSelf() { this.getKind() = 8 }
|
||||
|
||||
/**
|
||||
* Tuple indexing like `.1`.
|
||||
*/
|
||||
predicate isTupleIndexing() { this.getKind() = 9 }
|
||||
|
||||
/** Gets the underlying key-path expression which this is a component of. */
|
||||
KeyPathExpr getKeyPathExpr() { result.getAComponent() = this }
|
||||
|
||||
/** Holds if this component is the i'th component of the underling key-path expression. */
|
||||
predicate hasIndex(int i) { any(KeyPathExpr e).getComponent(i) = this }
|
||||
|
||||
/** Gets the next component of the underlying key-path expression. */
|
||||
KeyPathComponent getNextComponent() {
|
||||
exists(int i, KeyPathExpr e |
|
||||
hasKeyPathExprAndIndex(e, i, this) and
|
||||
hasKeyPathExprAndIndex(e, i + 1, result)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate hasKeyPathExprAndIndex(KeyPathExpr e, int i, KeyPathComponent c) {
|
||||
e.getComponent(i) = c
|
||||
}
|
||||
}
|
||||
24
swift/ql/lib/codeql/swift/elements/Locatable.qll
generated
24
swift/ql/lib/codeql/swift/elements/Locatable.qll
generated
@@ -1,18 +1,10 @@
|
||||
private import codeql.swift.generated.Locatable
|
||||
private import codeql.swift.elements.File
|
||||
private import codeql.swift.elements.UnknownLocation
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `Locatable`.
|
||||
*/
|
||||
|
||||
class Locatable extends Generated::Locatable {
|
||||
pragma[nomagic]
|
||||
override Location getLocation() {
|
||||
result = Generated::Locatable.super.getLocation()
|
||||
or
|
||||
not exists(Generated::Locatable.super.getLocation()) and
|
||||
result instanceof UnknownLocation
|
||||
}
|
||||
private import LocatableImpl
|
||||
import codeql.swift.elements.Element
|
||||
import codeql.swift.elements.Location
|
||||
|
||||
/**
|
||||
* Gets the primary file where this element occurs.
|
||||
*/
|
||||
File getFile() { result = this.getLocation().getFile() }
|
||||
}
|
||||
final class Locatable = Impl::Locatable;
|
||||
|
||||
20
swift/ql/lib/codeql/swift/elements/LocatableImpl.qll
Normal file
20
swift/ql/lib/codeql/swift/elements/LocatableImpl.qll
Normal file
@@ -0,0 +1,20 @@
|
||||
private import codeql.swift.generated.Locatable
|
||||
private import codeql.swift.elements.File
|
||||
private import codeql.swift.elements.UnknownLocation
|
||||
|
||||
module Impl {
|
||||
class Locatable extends Generated::Locatable {
|
||||
pragma[nomagic]
|
||||
override Location getLocation() {
|
||||
result = Generated::Locatable.super.getLocation()
|
||||
or
|
||||
not exists(Generated::Locatable.super.getLocation()) and
|
||||
result instanceof UnknownLocation
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the primary file where this element occurs.
|
||||
*/
|
||||
File getFile() { result = this.getLocation().getFile() }
|
||||
}
|
||||
}
|
||||
32
swift/ql/lib/codeql/swift/elements/Location.qll
generated
32
swift/ql/lib/codeql/swift/elements/Location.qll
generated
@@ -1,28 +1,10 @@
|
||||
private import codeql.swift.generated.Location
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* A location of a program element.
|
||||
* This module provides the public class `Location`.
|
||||
*/
|
||||
class Location extends Generated::Location {
|
||||
/**
|
||||
* Holds if this location is described by `path`, `startLine`, `startColumn`, `endLine` and `endColumn`.
|
||||
*/
|
||||
predicate hasLocationInfo(string path, int startLine, int startColumn, int endLine, int endColumn) {
|
||||
path = this.getFile().getFullName() and
|
||||
startLine = this.getStartLine() and
|
||||
startColumn = this.getStartColumn() and
|
||||
endLine = this.getEndLine() and
|
||||
endColumn = this.getEndColumn()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a textual representation of this location.
|
||||
*/
|
||||
override string toString() {
|
||||
exists(string filePath, int startLine, int startColumn, int endLine, int endColumn |
|
||||
this.hasLocationInfo(filePath, startLine, startColumn, endLine, endColumn)
|
||||
|
|
||||
toUrl(filePath, startLine, startColumn, endLine, endColumn, result)
|
||||
)
|
||||
}
|
||||
}
|
||||
private import LocationImpl
|
||||
import codeql.swift.elements.Element
|
||||
import codeql.swift.elements.File
|
||||
|
||||
final class Location = Impl::Location;
|
||||
|
||||
32
swift/ql/lib/codeql/swift/elements/LocationImpl.qll
Normal file
32
swift/ql/lib/codeql/swift/elements/LocationImpl.qll
Normal file
@@ -0,0 +1,32 @@
|
||||
private import codeql.swift.generated.Location
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* A location of a program element.
|
||||
*/
|
||||
class Location extends Generated::Location {
|
||||
/**
|
||||
* Holds if this location is described by `path`, `startLine`, `startColumn`, `endLine` and `endColumn`.
|
||||
*/
|
||||
predicate hasLocationInfo(
|
||||
string path, int startLine, int startColumn, int endLine, int endColumn
|
||||
) {
|
||||
path = this.getFile().getFullName() and
|
||||
startLine = this.getStartLine() and
|
||||
startColumn = this.getStartColumn() and
|
||||
endLine = this.getEndLine() and
|
||||
endColumn = this.getEndColumn()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a textual representation of this location.
|
||||
*/
|
||||
override string toString() {
|
||||
exists(string filePath, int startLine, int startColumn, int endLine, int endColumn |
|
||||
this.hasLocationInfo(filePath, startLine, startColumn, endLine, endColumn)
|
||||
|
|
||||
toUrl(filePath, startLine, startColumn, endLine, endColumn, result)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
99
swift/ql/lib/codeql/swift/elements/MacroRole.qll
generated
99
swift/ql/lib/codeql/swift/elements/MacroRole.qll
generated
@@ -1,100 +1,13 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `MacroRole`.
|
||||
* This module provides the public class `MacroRole`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.MacroRole
|
||||
private import MacroRoleImpl
|
||||
import codeql.swift.elements.AstNode
|
||||
import codeql.swift.elements.expr.TypeExpr
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* The role of a macro, for example #freestanding(declaration) or @attached(member).
|
||||
*/
|
||||
class MacroRole extends Generated::MacroRole {
|
||||
/**
|
||||
* String representation of the role kind.
|
||||
*/
|
||||
string getKindName() {
|
||||
this.isExpressionKind() and result = "expression"
|
||||
or
|
||||
this.isDeclarationKind() and result = "declaration"
|
||||
or
|
||||
this.isAccessorKind() and result = "accessor"
|
||||
or
|
||||
this.isMemberAttributeKind() and result = "memberAttribute"
|
||||
or
|
||||
this.isMemberKind() and result = "member"
|
||||
or
|
||||
this.isPeerKind() and result = "peer"
|
||||
or
|
||||
this.isConformanceKind() and result = "conformance"
|
||||
or
|
||||
this.isCodeItemKind() and result = "codeItem"
|
||||
or
|
||||
this.isExtensionKind() and result = "extension"
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds for `expression` roles.
|
||||
*/
|
||||
predicate isExpressionKind() { this.getKind() = 1 }
|
||||
|
||||
/**
|
||||
* Holds for `declaration` roles.
|
||||
*/
|
||||
predicate isDeclarationKind() { this.getKind() = 2 }
|
||||
|
||||
/**
|
||||
* Holds for `accessor` roles.
|
||||
*/
|
||||
predicate isAccessorKind() { this.getKind() = 4 }
|
||||
|
||||
/**
|
||||
* Holds for `memberAttribute` roles.
|
||||
*/
|
||||
predicate isMemberAttributeKind() { this.getKind() = 8 }
|
||||
|
||||
/**
|
||||
* Holds for `member` roles.
|
||||
*/
|
||||
predicate isMemberKind() { this.getKind() = 16 }
|
||||
|
||||
/**
|
||||
* Holds for `peer` roles.
|
||||
*/
|
||||
predicate isPeerKind() { this.getKind() = 32 }
|
||||
|
||||
/**
|
||||
* Holds for `conformance` roles.
|
||||
*/
|
||||
predicate isConformanceKind() { this.getKind() = 64 }
|
||||
|
||||
/**
|
||||
* Holds for `codeItem` roles.
|
||||
*/
|
||||
predicate isCodeItemKind() { this.getKind() = 128 }
|
||||
|
||||
/**
|
||||
* Holds for `extension` roles.
|
||||
*/
|
||||
predicate isExtensionKind() { this.getKind() = 256 }
|
||||
|
||||
/**
|
||||
* String representation of the macro syntax.
|
||||
*/
|
||||
string getMacroSyntaxName() {
|
||||
this.isFreestandingMacroSyntax() and result = "#freestanding"
|
||||
or
|
||||
this.isAttachedMacroSyntax() and result = "@attached"
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds for #freestanding macros.
|
||||
*/
|
||||
predicate isFreestandingMacroSyntax() { this.getMacroSyntax() = 0 }
|
||||
|
||||
/**
|
||||
* Holds for @attached macros.
|
||||
*/
|
||||
predicate isAttachedMacroSyntax() { this.getMacroSyntax() = 1 }
|
||||
|
||||
override string toString() { result = this.getMacroSyntaxName() + "(" + this.getKindName() + ")" }
|
||||
}
|
||||
final class MacroRole = Impl::MacroRole;
|
||||
|
||||
104
swift/ql/lib/codeql/swift/elements/MacroRoleImpl.qll
Normal file
104
swift/ql/lib/codeql/swift/elements/MacroRoleImpl.qll
Normal file
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `MacroRole`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.MacroRole
|
||||
|
||||
module Impl {
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* The role of a macro, for example #freestanding(declaration) or @attached(member).
|
||||
*/
|
||||
class MacroRole extends Generated::MacroRole {
|
||||
/**
|
||||
* String representation of the role kind.
|
||||
*/
|
||||
string getKindName() {
|
||||
this.isExpressionKind() and result = "expression"
|
||||
or
|
||||
this.isDeclarationKind() and result = "declaration"
|
||||
or
|
||||
this.isAccessorKind() and result = "accessor"
|
||||
or
|
||||
this.isMemberAttributeKind() and result = "memberAttribute"
|
||||
or
|
||||
this.isMemberKind() and result = "member"
|
||||
or
|
||||
this.isPeerKind() and result = "peer"
|
||||
or
|
||||
this.isConformanceKind() and result = "conformance"
|
||||
or
|
||||
this.isCodeItemKind() and result = "codeItem"
|
||||
or
|
||||
this.isExtensionKind() and result = "extension"
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds for `expression` roles.
|
||||
*/
|
||||
predicate isExpressionKind() { this.getKind() = 1 }
|
||||
|
||||
/**
|
||||
* Holds for `declaration` roles.
|
||||
*/
|
||||
predicate isDeclarationKind() { this.getKind() = 2 }
|
||||
|
||||
/**
|
||||
* Holds for `accessor` roles.
|
||||
*/
|
||||
predicate isAccessorKind() { this.getKind() = 4 }
|
||||
|
||||
/**
|
||||
* Holds for `memberAttribute` roles.
|
||||
*/
|
||||
predicate isMemberAttributeKind() { this.getKind() = 8 }
|
||||
|
||||
/**
|
||||
* Holds for `member` roles.
|
||||
*/
|
||||
predicate isMemberKind() { this.getKind() = 16 }
|
||||
|
||||
/**
|
||||
* Holds for `peer` roles.
|
||||
*/
|
||||
predicate isPeerKind() { this.getKind() = 32 }
|
||||
|
||||
/**
|
||||
* Holds for `conformance` roles.
|
||||
*/
|
||||
predicate isConformanceKind() { this.getKind() = 64 }
|
||||
|
||||
/**
|
||||
* Holds for `codeItem` roles.
|
||||
*/
|
||||
predicate isCodeItemKind() { this.getKind() = 128 }
|
||||
|
||||
/**
|
||||
* Holds for `extension` roles.
|
||||
*/
|
||||
predicate isExtensionKind() { this.getKind() = 256 }
|
||||
|
||||
/**
|
||||
* String representation of the macro syntax.
|
||||
*/
|
||||
string getMacroSyntaxName() {
|
||||
this.isFreestandingMacroSyntax() and result = "#freestanding"
|
||||
or
|
||||
this.isAttachedMacroSyntax() and result = "@attached"
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds for #freestanding macros.
|
||||
*/
|
||||
predicate isFreestandingMacroSyntax() { this.getMacroSyntax() = 0 }
|
||||
|
||||
/**
|
||||
* Holds for @attached macros.
|
||||
*/
|
||||
predicate isAttachedMacroSyntax() { this.getMacroSyntax() = 1 }
|
||||
|
||||
override string toString() {
|
||||
result = this.getMacroSyntaxName() + "(" + this.getKindName() + ")"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
private import codeql.swift.generated.OtherAvailabilitySpec
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `OtherAvailabilitySpec`.
|
||||
*/
|
||||
|
||||
private import OtherAvailabilitySpecImpl
|
||||
import codeql.swift.elements.AvailabilitySpec
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A wildcard availability spec `*`
|
||||
*/
|
||||
class OtherAvailabilitySpec extends Generated::OtherAvailabilitySpec {
|
||||
override string toString() { result = "*" }
|
||||
}
|
||||
final class OtherAvailabilitySpec = Impl::OtherAvailabilitySpec;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
private import codeql.swift.generated.OtherAvailabilitySpec
|
||||
|
||||
module Impl {
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A wildcard availability spec `*`
|
||||
*/
|
||||
class OtherAvailabilitySpec extends Generated::OtherAvailabilitySpec {
|
||||
override string toString() { result = "*" }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
private import codeql.swift.generated.PlatformVersionAvailabilitySpec
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `PlatformVersionAvailabilitySpec`.
|
||||
*/
|
||||
|
||||
private import PlatformVersionAvailabilitySpecImpl
|
||||
import codeql.swift.elements.AvailabilitySpec
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* An availability spec based on platform and version, for example `macOS 12` or `watchOS 14`
|
||||
*/
|
||||
class PlatformVersionAvailabilitySpec extends Generated::PlatformVersionAvailabilitySpec {
|
||||
override string toString() { result = this.getPlatform() + " " + this.getVersion() }
|
||||
}
|
||||
final class PlatformVersionAvailabilitySpec = Impl::PlatformVersionAvailabilitySpec;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
private import codeql.swift.generated.PlatformVersionAvailabilitySpec
|
||||
|
||||
module Impl {
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* An availability spec based on platform and version, for example `macOS 12` or `watchOS 14`
|
||||
*/
|
||||
class PlatformVersionAvailabilitySpec extends Generated::PlatformVersionAvailabilitySpec {
|
||||
override string toString() { result = this.getPlatform() + " " + this.getVersion() }
|
||||
}
|
||||
}
|
||||
12
swift/ql/lib/codeql/swift/elements/UnknownFile.qll
generated
12
swift/ql/lib/codeql/swift/elements/UnknownFile.qll
generated
@@ -1,5 +1,9 @@
|
||||
private import codeql.swift.generated.UnknownFile
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `UnknownFile`.
|
||||
*/
|
||||
|
||||
class UnknownFile extends Generated::UnknownFile {
|
||||
override string getName() { result = "" }
|
||||
}
|
||||
private import UnknownFileImpl
|
||||
import codeql.swift.elements.File
|
||||
|
||||
final class UnknownFile = Impl::UnknownFile;
|
||||
|
||||
7
swift/ql/lib/codeql/swift/elements/UnknownFileImpl.qll
Normal file
7
swift/ql/lib/codeql/swift/elements/UnknownFileImpl.qll
Normal file
@@ -0,0 +1,7 @@
|
||||
private import codeql.swift.generated.UnknownFile
|
||||
|
||||
module Impl {
|
||||
class UnknownFile extends Generated::UnknownFile {
|
||||
override string getName() { result = "" }
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,9 @@
|
||||
private import codeql.swift.generated.UnknownLocation
|
||||
private import codeql.swift.elements.UnknownFile
|
||||
private import codeql.swift.elements.File
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* A `Location` that is given to something that is not associated with any position in the source code.
|
||||
* This module provides the public class `UnknownLocation`.
|
||||
*/
|
||||
class UnknownLocation extends Generated::UnknownLocation {
|
||||
override File getFile() { result instanceof UnknownFile }
|
||||
|
||||
override int getStartLine() { result = 0 }
|
||||
private import UnknownLocationImpl
|
||||
import codeql.swift.elements.Location
|
||||
|
||||
override int getStartColumn() { result = 0 }
|
||||
|
||||
override int getEndLine() { result = 0 }
|
||||
|
||||
override int getEndColumn() { result = 0 }
|
||||
|
||||
override string toString() { result = "UnknownLocation" }
|
||||
}
|
||||
final class UnknownLocation = Impl::UnknownLocation;
|
||||
|
||||
22
swift/ql/lib/codeql/swift/elements/UnknownLocationImpl.qll
Normal file
22
swift/ql/lib/codeql/swift/elements/UnknownLocationImpl.qll
Normal file
@@ -0,0 +1,22 @@
|
||||
private import codeql.swift.generated.UnknownLocation
|
||||
private import codeql.swift.elements.UnknownFile
|
||||
private import codeql.swift.elements.File
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* A `Location` that is given to something that is not associated with any position in the source code.
|
||||
*/
|
||||
class UnknownLocation extends Generated::UnknownLocation {
|
||||
override File getFile() { result instanceof UnknownFile }
|
||||
|
||||
override int getStartLine() { result = 0 }
|
||||
|
||||
override int getStartColumn() { result = 0 }
|
||||
|
||||
override int getEndLine() { result = 0 }
|
||||
|
||||
override int getEndColumn() { result = 0 }
|
||||
|
||||
override string toString() { result = "UnknownLocation" }
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,11 @@
|
||||
private import codeql.swift.generated.UnspecifiedElement
|
||||
import codeql.swift.elements.Location
|
||||
import codeql.swift.elements.Locatable
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `UnspecifiedElement`.
|
||||
*/
|
||||
|
||||
class UnspecifiedElement extends Generated::UnspecifiedElement {
|
||||
override string toString() {
|
||||
exists(string source, string index |
|
||||
(
|
||||
source = " from " + this.getParent().getPrimaryQlClasses()
|
||||
or
|
||||
not this.hasParent() and source = ""
|
||||
) and
|
||||
(
|
||||
index = "[" + this.getIndex() + "]"
|
||||
or
|
||||
not this.hasIndex() and index = ""
|
||||
) and
|
||||
result = "missing " + this.getProperty() + index + source
|
||||
)
|
||||
}
|
||||
private import UnspecifiedElementImpl
|
||||
import codeql.swift.elements.AstNode
|
||||
import codeql.swift.elements.Element
|
||||
import codeql.swift.elements.ErrorElement
|
||||
|
||||
override Location getLocation() { result = this.getParent().(Locatable).getLocation() }
|
||||
}
|
||||
final class UnspecifiedElement = Impl::UnspecifiedElement;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
private import codeql.swift.generated.UnspecifiedElement
|
||||
import codeql.swift.elements.Location
|
||||
import codeql.swift.elements.Locatable
|
||||
|
||||
module Impl {
|
||||
class UnspecifiedElement extends Generated::UnspecifiedElement {
|
||||
override string toString() {
|
||||
exists(string source, string index |
|
||||
(
|
||||
source = " from " + this.getParent().getPrimaryQlClasses()
|
||||
or
|
||||
not this.hasParent() and source = ""
|
||||
) and
|
||||
(
|
||||
index = "[" + this.getIndex() + "]"
|
||||
or
|
||||
not this.hasIndex() and index = ""
|
||||
) and
|
||||
result = "missing " + this.getProperty() + index + source
|
||||
)
|
||||
}
|
||||
|
||||
override Location getLocation() { result = this.getParent().(Locatable).getLocation() }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AbstractStorageDecl`.
|
||||
* This module provides the public class `AbstractStorageDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.AbstractStorageDecl
|
||||
private import AbstractStorageDeclImpl
|
||||
import codeql.swift.elements.decl.Accessor
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
|
||||
class AbstractStorageDecl extends Generated::AbstractStorageDecl { }
|
||||
final class AbstractStorageDecl = Impl::AbstractStorageDecl;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/AbstractStorageDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/AbstractStorageDeclImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AbstractStorageDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.AbstractStorageDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `AbstractStorageDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class AbstractStorageDecl extends Generated::AbstractStorageDecl { }
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AbstractTypeParamDecl`.
|
||||
* This module provides the public class `AbstractTypeParamDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.AbstractTypeParamDecl
|
||||
private import AbstractTypeParamDeclImpl
|
||||
import codeql.swift.elements.decl.TypeDecl
|
||||
|
||||
class AbstractTypeParamDecl extends Generated::AbstractTypeParamDecl { }
|
||||
final class AbstractTypeParamDecl = Impl::AbstractTypeParamDecl;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/AbstractTypeParamDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/AbstractTypeParamDeclImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AbstractTypeParamDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.AbstractTypeParamDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `AbstractTypeParamDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class AbstractTypeParamDecl extends Generated::AbstractTypeParamDecl { }
|
||||
}
|
||||
45
swift/ql/lib/codeql/swift/elements/decl/Accessor.qll
generated
45
swift/ql/lib/codeql/swift/elements/decl/Accessor.qll
generated
@@ -1,40 +1,9 @@
|
||||
private import codeql.swift.generated.decl.Accessor
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `Accessor`.
|
||||
*/
|
||||
|
||||
private predicate isKnownAccessorKind(Accessor decl, string kind) {
|
||||
decl.isGetter() and kind = "get"
|
||||
or
|
||||
decl.isSetter() and kind = "set"
|
||||
or
|
||||
decl.isWillSet() and kind = "willSet"
|
||||
or
|
||||
decl.isDidSet() and kind = "didSet"
|
||||
or
|
||||
decl.isRead() and kind = "_read"
|
||||
or
|
||||
decl.isModify() and kind = "_modify"
|
||||
or
|
||||
decl.isUnsafeAddress() and kind = "unsafeAddress"
|
||||
or
|
||||
decl.isUnsafeMutableAddress() and kind = "unsafeMutableAddress"
|
||||
}
|
||||
private import AccessorImpl
|
||||
import codeql.swift.elements.decl.AccessorOrNamedFunction
|
||||
|
||||
class Accessor extends Generated::Accessor {
|
||||
predicate isPropertyObserver() {
|
||||
this instanceof WillSetObserver or this instanceof DidSetObserver
|
||||
}
|
||||
|
||||
override string toString() {
|
||||
isKnownAccessorKind(this, result)
|
||||
or
|
||||
not isKnownAccessorKind(this, _) and
|
||||
result = super.toString()
|
||||
}
|
||||
}
|
||||
|
||||
class WillSetObserver extends Accessor {
|
||||
WillSetObserver() { this.isWillSet() }
|
||||
}
|
||||
|
||||
class DidSetObserver extends Accessor {
|
||||
DidSetObserver() { this.isDidSet() }
|
||||
}
|
||||
final class Accessor = Impl::Accessor;
|
||||
|
||||
35
swift/ql/lib/codeql/swift/elements/decl/AccessorImpl.qll
Normal file
35
swift/ql/lib/codeql/swift/elements/decl/AccessorImpl.qll
Normal file
@@ -0,0 +1,35 @@
|
||||
private import codeql.swift.generated.decl.Accessor
|
||||
private import SetObserver
|
||||
|
||||
module Impl {
|
||||
private predicate isKnownAccessorKind(Accessor decl, string kind) {
|
||||
decl.isGetter() and kind = "get"
|
||||
or
|
||||
decl.isSetter() and kind = "set"
|
||||
or
|
||||
decl.isWillSet() and kind = "willSet"
|
||||
or
|
||||
decl.isDidSet() and kind = "didSet"
|
||||
or
|
||||
decl.isRead() and kind = "_read"
|
||||
or
|
||||
decl.isModify() and kind = "_modify"
|
||||
or
|
||||
decl.isUnsafeAddress() and kind = "unsafeAddress"
|
||||
or
|
||||
decl.isUnsafeMutableAddress() and kind = "unsafeMutableAddress"
|
||||
}
|
||||
|
||||
class Accessor extends Generated::Accessor {
|
||||
predicate isPropertyObserver() {
|
||||
this instanceof WillSetObserver or this instanceof DidSetObserver
|
||||
}
|
||||
|
||||
override string toString() {
|
||||
isKnownAccessorKind(this, result)
|
||||
or
|
||||
not isKnownAccessorKind(this, _) and
|
||||
result = super.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AccessorOrNamedFunction`.
|
||||
* INTERNAL: Do not use.
|
||||
* This module provides the public class `AccessorOrNamedFunction`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.AccessorOrNamedFunction
|
||||
private import AccessorOrNamedFunctionImpl
|
||||
import codeql.swift.elements.decl.Function
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class AccessorOrNamedFunction extends Generated::AccessorOrNamedFunction { }
|
||||
final class AccessorOrNamedFunction = Impl::AccessorOrNamedFunction;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/AccessorOrNamedFunctionImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/AccessorOrNamedFunctionImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AccessorOrNamedFunction`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.AccessorOrNamedFunction
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `AccessorOrNamedFunction` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class AccessorOrNamedFunction extends Generated::AccessorOrNamedFunction { }
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AssociatedTypeDecl`.
|
||||
* This module provides the public class `AssociatedTypeDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.AssociatedTypeDecl
|
||||
private import AssociatedTypeDeclImpl
|
||||
import codeql.swift.elements.decl.AbstractTypeParamDecl
|
||||
|
||||
class AssociatedTypeDecl extends Generated::AssociatedTypeDecl { }
|
||||
final class AssociatedTypeDecl = Impl::AssociatedTypeDecl;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/AssociatedTypeDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/AssociatedTypeDeclImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `AssociatedTypeDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.AssociatedTypeDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `AssociatedTypeDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class AssociatedTypeDecl extends Generated::AssociatedTypeDecl { }
|
||||
}
|
||||
@@ -1,23 +1,10 @@
|
||||
private import codeql.swift.generated.decl.CapturedDecl
|
||||
private import codeql.swift.elements.Callable
|
||||
private import codeql.swift.elements.expr.DeclRefExpr
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* A captured variable or function parameter in the scope of a closure.
|
||||
* This module provides the public class `CapturedDecl`.
|
||||
*/
|
||||
class CapturedDecl extends Generated::CapturedDecl {
|
||||
override string toString() { result = this.getDecl().toString() }
|
||||
|
||||
/**
|
||||
* Gets the closure or function that captures this variable.
|
||||
*/
|
||||
Callable getScope() { result.getACapture() = this }
|
||||
private import CapturedDeclImpl
|
||||
import codeql.swift.elements.decl.Decl
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
|
||||
/**
|
||||
* Get an access to this capture within the scope of its closure.
|
||||
*/
|
||||
DeclRefExpr getAnAccess() {
|
||||
result.getEnclosingCallable() = this.getScope() and
|
||||
result.getDecl() = this.getDecl()
|
||||
}
|
||||
}
|
||||
final class CapturedDecl = Impl::CapturedDecl;
|
||||
|
||||
25
swift/ql/lib/codeql/swift/elements/decl/CapturedDeclImpl.qll
Normal file
25
swift/ql/lib/codeql/swift/elements/decl/CapturedDeclImpl.qll
Normal file
@@ -0,0 +1,25 @@
|
||||
private import codeql.swift.generated.decl.CapturedDecl
|
||||
private import codeql.swift.elements.Callable
|
||||
private import codeql.swift.elements.expr.DeclRefExpr
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* A captured variable or function parameter in the scope of a closure.
|
||||
*/
|
||||
class CapturedDecl extends Generated::CapturedDecl {
|
||||
override string toString() { result = this.getDecl().toString() }
|
||||
|
||||
/**
|
||||
* Gets the closure or function that captures this variable.
|
||||
*/
|
||||
Callable getScope() { result.getACapture() = this }
|
||||
|
||||
/**
|
||||
* Get an access to this capture within the scope of its closure.
|
||||
*/
|
||||
DeclRefExpr getAnAccess() {
|
||||
result.getEnclosingCallable() = this.getScope() and
|
||||
result.getDecl() = this.getDecl()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ClassDecl`.
|
||||
* This module provides the public class `ClassDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.ClassDecl
|
||||
private import ClassDeclImpl
|
||||
import codeql.swift.elements.decl.NominalTypeDecl
|
||||
|
||||
class ClassDecl extends Generated::ClassDecl { }
|
||||
final class ClassDecl = Impl::ClassDecl;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/ClassDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/ClassDeclImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ClassDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.ClassDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ClassDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class ClassDecl extends Generated::ClassDecl { }
|
||||
}
|
||||
@@ -14,7 +14,7 @@ private import codeql.swift.elements.decl.NominalTypeDecl
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class ClassOrStructDecl extends NominalTypeDecl {
|
||||
final class ClassOrStructDecl extends NominalTypeDecl {
|
||||
ClassOrStructDecl() {
|
||||
this instanceof ClassDecl
|
||||
or
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ConcreteVarDecl`.
|
||||
* This module provides the public class `ConcreteVarDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.ConcreteVarDecl
|
||||
private import ConcreteVarDeclImpl
|
||||
import codeql.swift.elements.decl.VarDecl
|
||||
|
||||
class ConcreteVarDecl extends Generated::ConcreteVarDecl { }
|
||||
final class ConcreteVarDecl = Impl::ConcreteVarDecl;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/ConcreteVarDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/ConcreteVarDeclImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ConcreteVarDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.ConcreteVarDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ConcreteVarDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class ConcreteVarDecl extends Generated::ConcreteVarDecl { }
|
||||
}
|
||||
28
swift/ql/lib/codeql/swift/elements/decl/Decl.qll
generated
28
swift/ql/lib/codeql/swift/elements/decl/Decl.qll
generated
@@ -1,22 +1,10 @@
|
||||
private import codeql.swift.generated.decl.Decl
|
||||
private import codeql.swift.elements.decl.NominalTypeDecl
|
||||
private import codeql.swift.elements.decl.ExtensionDecl
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `Decl`.
|
||||
*/
|
||||
|
||||
class Decl extends Generated::Decl {
|
||||
override string toString() { result = super.toString() }
|
||||
private import DeclImpl
|
||||
import codeql.swift.elements.AstNode
|
||||
import codeql.swift.elements.decl.ModuleDecl
|
||||
|
||||
/**
|
||||
* Gets the `NominalTypeDecl` corresponding to this `Decl`, if any. This
|
||||
* resolves an `ExtensionDecl` to the `NominalTypeDecl` that it extends.
|
||||
*/
|
||||
NominalTypeDecl asNominalTypeDecl() {
|
||||
result = this
|
||||
or
|
||||
result = this.(ExtensionDecl).getExtendedTypeDecl()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the declaration that declares this declaration as a member, if any.
|
||||
*/
|
||||
Decl getDeclaringDecl() { this = result.getAMember() }
|
||||
}
|
||||
final class Decl = Impl::Decl;
|
||||
|
||||
24
swift/ql/lib/codeql/swift/elements/decl/DeclImpl.qll
Normal file
24
swift/ql/lib/codeql/swift/elements/decl/DeclImpl.qll
Normal file
@@ -0,0 +1,24 @@
|
||||
private import codeql.swift.generated.decl.Decl
|
||||
private import codeql.swift.elements.decl.NominalTypeDecl
|
||||
private import codeql.swift.elements.decl.ExtensionDecl
|
||||
|
||||
module Impl {
|
||||
class Decl extends Generated::Decl {
|
||||
override string toString() { result = super.toString() }
|
||||
|
||||
/**
|
||||
* Gets the `NominalTypeDecl` corresponding to this `Decl`, if any. This
|
||||
* resolves an `ExtensionDecl` to the `NominalTypeDecl` that it extends.
|
||||
*/
|
||||
NominalTypeDecl asNominalTypeDecl() {
|
||||
result = this
|
||||
or
|
||||
result = this.(ExtensionDecl).getExtendedTypeDecl()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the declaration that declares this declaration as a member, if any.
|
||||
*/
|
||||
Decl getDeclaringDecl() { this = result.getAMember() }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
private import codeql.swift.generated.decl.Deinitializer
|
||||
private import codeql.swift.elements.decl.Method
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* A deinitializer of a class.
|
||||
* This module provides the public class `Deinitializer`.
|
||||
*/
|
||||
class Deinitializer extends Generated::Deinitializer, Method {
|
||||
override string toString() { result = this.getSelfParam().getType() + "." + super.toString() }
|
||||
}
|
||||
|
||||
private import DeinitializerImpl
|
||||
import codeql.swift.elements.decl.Function
|
||||
|
||||
final class Deinitializer = Impl::Deinitializer;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
private import codeql.swift.generated.decl.Deinitializer
|
||||
private import codeql.swift.elements.decl.Method
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* A deinitializer of a class.
|
||||
*/
|
||||
class Deinitializer extends Generated::Deinitializer {
|
||||
override string toString() { result = this.getSelfParam().getType() + "." + super.toString() }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
private import codeql.swift.generated.decl.EnumCaseDecl
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `EnumCaseDecl`.
|
||||
*/
|
||||
|
||||
class EnumCaseDecl extends Generated::EnumCaseDecl {
|
||||
override string toString() { result = "case ..." }
|
||||
}
|
||||
private import EnumCaseDeclImpl
|
||||
import codeql.swift.elements.decl.Decl
|
||||
import codeql.swift.elements.decl.EnumElementDecl
|
||||
|
||||
final class EnumCaseDecl = Impl::EnumCaseDecl;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
private import codeql.swift.generated.decl.EnumCaseDecl
|
||||
|
||||
module Impl {
|
||||
class EnumCaseDecl extends Generated::EnumCaseDecl {
|
||||
override string toString() { result = "case ..." }
|
||||
}
|
||||
}
|
||||
39
swift/ql/lib/codeql/swift/elements/decl/EnumDecl.qll
generated
39
swift/ql/lib/codeql/swift/elements/decl/EnumDecl.qll
generated
@@ -1,36 +1,9 @@
|
||||
private import codeql.swift.generated.decl.EnumDecl
|
||||
private import codeql.swift.elements.decl.EnumCaseDecl
|
||||
private import codeql.swift.elements.decl.EnumElementDecl
|
||||
private import codeql.swift.elements.decl.Decl
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* An enumeration declaration, for example:
|
||||
* ```
|
||||
* enum MyColours {
|
||||
* case red
|
||||
* case green
|
||||
* case blue
|
||||
* }
|
||||
* ```
|
||||
* This module provides the public class `EnumDecl`.
|
||||
*/
|
||||
class EnumDecl extends Generated::EnumDecl {
|
||||
/**
|
||||
* Gets the `index`th enumeration element of this enumeration (0-based).
|
||||
*/
|
||||
final EnumElementDecl getEnumElement(int index) {
|
||||
result =
|
||||
rank[index + 1](int memberIndex, Decl d |
|
||||
d = this.getMember(memberIndex) and
|
||||
d instanceof EnumElementDecl
|
||||
|
|
||||
d order by memberIndex
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an enumeration element of this enumeration.
|
||||
*/
|
||||
final EnumElementDecl getAnEnumElement() {
|
||||
result = this.getMember(_).(EnumCaseDecl).getElement(_)
|
||||
}
|
||||
}
|
||||
private import EnumDeclImpl
|
||||
import codeql.swift.elements.decl.NominalTypeDecl
|
||||
|
||||
final class EnumDecl = Impl::EnumDecl;
|
||||
|
||||
38
swift/ql/lib/codeql/swift/elements/decl/EnumDeclImpl.qll
Normal file
38
swift/ql/lib/codeql/swift/elements/decl/EnumDeclImpl.qll
Normal file
@@ -0,0 +1,38 @@
|
||||
private import codeql.swift.generated.decl.EnumDecl
|
||||
private import codeql.swift.elements.decl.EnumCaseDecl
|
||||
private import codeql.swift.elements.decl.EnumElementDecl
|
||||
private import codeql.swift.elements.decl.Decl
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* An enumeration declaration, for example:
|
||||
* ```
|
||||
* enum MyColours {
|
||||
* case red
|
||||
* case green
|
||||
* case blue
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class EnumDecl extends Generated::EnumDecl {
|
||||
/**
|
||||
* Gets the `index`th enumeration element of this enumeration (0-based).
|
||||
*/
|
||||
final EnumElementDecl getEnumElement(int index) {
|
||||
result =
|
||||
rank[index + 1](int memberIndex, Decl d |
|
||||
d = this.getMember(memberIndex) and
|
||||
d instanceof EnumElementDecl
|
||||
|
|
||||
d order by memberIndex
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an enumeration element of this enumeration.
|
||||
*/
|
||||
final EnumElementDecl getAnEnumElement() {
|
||||
result = this.getMember(_).(EnumCaseDecl).getElement(_)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +1,10 @@
|
||||
private import codeql.swift.generated.decl.EnumElementDecl
|
||||
private import codeql.swift.elements.decl.EnumDecl
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* An enum element declaration, for example `enumElement` and `anotherEnumElement` in:
|
||||
* ```
|
||||
* enum MyEnum {
|
||||
* case enumElement
|
||||
* case anotherEnumElement(Int)
|
||||
* }
|
||||
* ```
|
||||
* This module provides the public class `EnumElementDecl`.
|
||||
*/
|
||||
class EnumElementDecl extends Generated::EnumElementDecl {
|
||||
override string toString() { result = this.getName() }
|
||||
|
||||
/**
|
||||
* Holds if this enum element declaration is called `enumElementName` and is a member of an
|
||||
* enum called `enumName`.
|
||||
*/
|
||||
cached
|
||||
predicate hasQualifiedName(string enumName, string enumElementName) {
|
||||
this.getName() = enumElementName and
|
||||
exists(EnumDecl d |
|
||||
d.getFullName() = enumName and
|
||||
d.getAMember() = this
|
||||
)
|
||||
}
|
||||
private import EnumElementDeclImpl
|
||||
import codeql.swift.elements.decl.ParamDecl
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
|
||||
/**
|
||||
* Holds if this enum element declaration is called `enumElementName` and is a member of an
|
||||
* enumcalled `enumName` in a module called `moduleName`.
|
||||
*/
|
||||
predicate hasQualifiedName(string moduleName, string enumName, string enumElementName) {
|
||||
this.hasQualifiedName(enumName, enumElementName) and
|
||||
this.getModule().getFullName() = moduleName
|
||||
}
|
||||
}
|
||||
final class EnumElementDecl = Impl::EnumElementDecl;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
private import codeql.swift.generated.decl.EnumElementDecl
|
||||
private import codeql.swift.elements.decl.EnumDecl
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* An enum element declaration, for example `enumElement` and `anotherEnumElement` in:
|
||||
* ```
|
||||
* enum MyEnum {
|
||||
* case enumElement
|
||||
* case anotherEnumElement(Int)
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class EnumElementDecl extends Generated::EnumElementDecl {
|
||||
override string toString() { result = this.getName() }
|
||||
|
||||
/**
|
||||
* Holds if this enum element declaration is called `enumElementName` and is a member of an
|
||||
* enum called `enumName`.
|
||||
*/
|
||||
cached
|
||||
predicate hasQualifiedName(string enumName, string enumElementName) {
|
||||
this.getName() = enumElementName and
|
||||
exists(EnumDecl d |
|
||||
d.getFullName() = enumName and
|
||||
d.getAMember() = this
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this enum element declaration is called `enumElementName` and is a member of an
|
||||
* enumcalled `enumName` in a module called `moduleName`.
|
||||
*/
|
||||
predicate hasQualifiedName(string moduleName, string enumName, string enumElementName) {
|
||||
this.hasQualifiedName(enumName, enumElementName) and
|
||||
this.getModule().getFullName() = moduleName
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
private import codeql.swift.generated.decl.ExtensionDecl
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `ExtensionDecl`.
|
||||
*/
|
||||
|
||||
class ExtensionDecl extends Generated::ExtensionDecl {
|
||||
override string toString() {
|
||||
result =
|
||||
"extension of " + unique(NominalTypeDecl td | td = this.getExtendedTypeDecl()).toString()
|
||||
or
|
||||
count(this.getExtendedTypeDecl()) != 1 and
|
||||
result = "extension"
|
||||
}
|
||||
}
|
||||
private import ExtensionDeclImpl
|
||||
import codeql.swift.elements.decl.Decl
|
||||
import codeql.swift.elements.decl.GenericContext
|
||||
import codeql.swift.elements.decl.NominalTypeDecl
|
||||
import codeql.swift.elements.decl.ProtocolDecl
|
||||
|
||||
final class ExtensionDecl = Impl::ExtensionDecl;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
private import codeql.swift.generated.decl.ExtensionDecl
|
||||
|
||||
module Impl {
|
||||
class ExtensionDecl extends Generated::ExtensionDecl {
|
||||
override string toString() {
|
||||
result =
|
||||
"extension of " + unique(NominalTypeDecl td | td = this.getExtendedTypeDecl()).toString()
|
||||
or
|
||||
count(this.getExtendedTypeDecl()) != 1 and
|
||||
result = "extension"
|
||||
}
|
||||
}
|
||||
}
|
||||
32
swift/ql/lib/codeql/swift/elements/decl/FieldDecl.qll
Normal file
32
swift/ql/lib/codeql/swift/elements/decl/FieldDecl.qll
Normal file
@@ -0,0 +1,32 @@
|
||||
private import VarDecl
|
||||
|
||||
/**
|
||||
* A field declaration. That is, a variable declaration that is a member of a
|
||||
* class, struct, enum or protocol.
|
||||
*/
|
||||
final class FieldDecl extends VarDecl {
|
||||
FieldDecl() { this = any(Decl ctx).getAMember() }
|
||||
|
||||
/**
|
||||
* Holds if this field is called `fieldName` and is a member of a
|
||||
* class, struct, extension, enum or protocol called `typeName`.
|
||||
*/
|
||||
cached
|
||||
predicate hasQualifiedName(string typeName, string fieldName) {
|
||||
this.getName() = fieldName and
|
||||
exists(Decl d |
|
||||
d.asNominalTypeDecl().getFullName() = typeName and
|
||||
d.getAMember() = this
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this field is called `fieldName` and is a member of a
|
||||
* class, struct, extension, enum or protocol called `typeName` in a module
|
||||
* called `moduleName`.
|
||||
*/
|
||||
predicate hasQualifiedName(string moduleName, string typeName, string fieldName) {
|
||||
this.hasQualifiedName(typeName, fieldName) and
|
||||
this.getModule().getFullName() = moduleName
|
||||
}
|
||||
}
|
||||
9
swift/ql/lib/codeql/swift/elements/decl/FreeFunction.qll
Normal file
9
swift/ql/lib/codeql/swift/elements/decl/FreeFunction.qll
Normal file
@@ -0,0 +1,9 @@
|
||||
private import Function
|
||||
private import Method
|
||||
|
||||
/**
|
||||
* A free (non-member) function.
|
||||
*/
|
||||
final class FreeFunction extends Function {
|
||||
FreeFunction() { not this instanceof Method }
|
||||
}
|
||||
29
swift/ql/lib/codeql/swift/elements/decl/Function.qll
generated
29
swift/ql/lib/codeql/swift/elements/decl/Function.qll
generated
@@ -1,26 +1,11 @@
|
||||
private import codeql.swift.generated.decl.Function
|
||||
private import codeql.swift.elements.decl.Method
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* A function.
|
||||
* This module provides the public class `Function`.
|
||||
*/
|
||||
class Function extends Generated::Function, Callable {
|
||||
override string toString() { result = this.getName() }
|
||||
|
||||
/**
|
||||
* Gets the name of this function, without the argument list. For example
|
||||
* a function with name `myFunction(arg:)` has short name `myFunction`.
|
||||
*/
|
||||
string getShortName() {
|
||||
// match as many characters as possible that are not `(`.
|
||||
// (`*+` is possessive matching)
|
||||
result = this.getName().regexpCapture("([^(]*+).*", 1)
|
||||
}
|
||||
}
|
||||
private import FunctionImpl
|
||||
import codeql.swift.elements.Callable
|
||||
import codeql.swift.elements.decl.GenericContext
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
|
||||
/**
|
||||
* A free (non-member) function.
|
||||
*/
|
||||
class FreeFunction extends Function {
|
||||
FreeFunction() { not this instanceof Method }
|
||||
}
|
||||
final class Function = Impl::Function;
|
||||
|
||||
28
swift/ql/lib/codeql/swift/elements/decl/FunctionImpl.qll
Normal file
28
swift/ql/lib/codeql/swift/elements/decl/FunctionImpl.qll
Normal file
@@ -0,0 +1,28 @@
|
||||
private import codeql.swift.generated.decl.Function
|
||||
private import codeql.swift.elements.decl.Method
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* A function.
|
||||
*/
|
||||
class Function extends Generated::Function {
|
||||
override string toString() { result = this.getName() }
|
||||
|
||||
/**
|
||||
* Gets the name of this function, without the argument list. For example
|
||||
* a function with name `myFunction(arg:)` has short name `myFunction`.
|
||||
*/
|
||||
string getShortName() {
|
||||
// match as many characters as possible that are not `(`.
|
||||
// (`*+` is possessive matching)
|
||||
result = this.getName().regexpCapture("([^(]*+).*", 1)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A free (non-member) function.
|
||||
*/
|
||||
class FreeFunction extends Function {
|
||||
FreeFunction() { not this instanceof Method }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `GenericContext`.
|
||||
* This module provides the public class `GenericContext`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.GenericContext
|
||||
private import GenericContextImpl
|
||||
import codeql.swift.elements.Element
|
||||
import codeql.swift.elements.decl.GenericTypeParamDecl
|
||||
|
||||
class GenericContext extends Generated::GenericContext { }
|
||||
final class GenericContext = Impl::GenericContext;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/GenericContextImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/GenericContextImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `GenericContext`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.GenericContext
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `GenericContext` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class GenericContext extends Generated::GenericContext { }
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `GenericTypeDecl`.
|
||||
* This module provides the public class `GenericTypeDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.GenericTypeDecl
|
||||
private import GenericTypeDeclImpl
|
||||
import codeql.swift.elements.decl.GenericContext
|
||||
import codeql.swift.elements.decl.TypeDecl
|
||||
|
||||
class GenericTypeDecl extends Generated::GenericTypeDecl { }
|
||||
final class GenericTypeDecl = Impl::GenericTypeDecl;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/GenericTypeDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/GenericTypeDeclImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `GenericTypeDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.GenericTypeDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `GenericTypeDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class GenericTypeDecl extends Generated::GenericTypeDecl { }
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `GenericTypeParamDecl`.
|
||||
* This module provides the public class `GenericTypeParamDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.GenericTypeParamDecl
|
||||
private import GenericTypeParamDeclImpl
|
||||
import codeql.swift.elements.decl.AbstractTypeParamDecl
|
||||
|
||||
class GenericTypeParamDecl extends Generated::GenericTypeParamDecl { }
|
||||
final class GenericTypeParamDecl = Impl::GenericTypeParamDecl;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/GenericTypeParamDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/GenericTypeParamDeclImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `GenericTypeParamDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.GenericTypeParamDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `GenericTypeParamDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class GenericTypeParamDecl extends Generated::GenericTypeParamDecl { }
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
private import codeql.swift.generated.decl.IfConfigDecl
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `IfConfigDecl`.
|
||||
*/
|
||||
|
||||
class IfConfigDecl extends Generated::IfConfigDecl {
|
||||
override string toString() { result = "#if ..." }
|
||||
}
|
||||
private import IfConfigDeclImpl
|
||||
import codeql.swift.elements.AstNode
|
||||
import codeql.swift.elements.decl.Decl
|
||||
|
||||
final class IfConfigDecl = Impl::IfConfigDecl;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
private import codeql.swift.generated.decl.IfConfigDecl
|
||||
|
||||
module Impl {
|
||||
class IfConfigDecl extends Generated::IfConfigDecl {
|
||||
override string toString() { result = "#if ..." }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
private import codeql.swift.generated.decl.ImportDecl
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `ImportDecl`.
|
||||
*/
|
||||
|
||||
class ImportDecl extends Generated::ImportDecl {
|
||||
override string toString() { result = "import ..." }
|
||||
}
|
||||
private import ImportDeclImpl
|
||||
import codeql.swift.elements.decl.Decl
|
||||
import codeql.swift.elements.decl.ModuleDecl
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
|
||||
final class ImportDecl = Impl::ImportDecl;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
private import codeql.swift.generated.decl.ImportDecl
|
||||
|
||||
module Impl {
|
||||
class ImportDecl extends Generated::ImportDecl {
|
||||
override string toString() { result = "import ..." }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `InfixOperatorDecl`.
|
||||
* This module provides the public class `InfixOperatorDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.InfixOperatorDecl
|
||||
private import InfixOperatorDeclImpl
|
||||
import codeql.swift.elements.decl.OperatorDecl
|
||||
import codeql.swift.elements.decl.PrecedenceGroupDecl
|
||||
|
||||
class InfixOperatorDecl extends Generated::InfixOperatorDecl { }
|
||||
final class InfixOperatorDecl = Impl::InfixOperatorDecl;
|
||||
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/InfixOperatorDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/InfixOperatorDeclImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `InfixOperatorDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.InfixOperatorDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `InfixOperatorDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class InfixOperatorDecl extends Generated::InfixOperatorDecl { }
|
||||
}
|
||||
@@ -1,17 +1,9 @@
|
||||
private import codeql.swift.generated.decl.Initializer
|
||||
private import codeql.swift.elements.decl.Method
|
||||
private import codeql.swift.elements.type.FunctionType
|
||||
private import codeql.swift.elements.type.OptionalType
|
||||
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* An initializer of a class, struct, enum or protocol.
|
||||
* This module provides the public class `Initializer`.
|
||||
*/
|
||||
class Initializer extends Generated::Initializer, Method {
|
||||
override string toString() { result = this.getSelfParam().getType() + "." + super.toString() }
|
||||
|
||||
/** Holds if this initializer returns an optional type. Failable initializers are written as `init?`. */
|
||||
predicate isFailable() {
|
||||
this.getInterfaceType().(FunctionType).getResult().(FunctionType).getResult() instanceof
|
||||
OptionalType
|
||||
}
|
||||
}
|
||||
private import InitializerImpl
|
||||
import codeql.swift.elements.decl.Function
|
||||
|
||||
final class Initializer = Impl::Initializer;
|
||||
|
||||
20
swift/ql/lib/codeql/swift/elements/decl/InitializerImpl.qll
Normal file
20
swift/ql/lib/codeql/swift/elements/decl/InitializerImpl.qll
Normal file
@@ -0,0 +1,20 @@
|
||||
private import codeql.swift.generated.decl.Initializer
|
||||
private import codeql.swift.elements.decl.Method
|
||||
private import codeql.swift.elements.decl.MethodImpl::Impl as MethodImpl
|
||||
private import codeql.swift.elements.type.FunctionType
|
||||
private import codeql.swift.elements.type.OptionalType
|
||||
|
||||
module Impl {
|
||||
/**
|
||||
* An initializer of a class, struct, enum or protocol.
|
||||
*/
|
||||
class Initializer extends Generated::Initializer, MethodImpl::Method {
|
||||
override string toString() { result = this.getSelfParam().getType() + "." + super.toString() }
|
||||
|
||||
/** Holds if this initializer returns an optional type. Failable initializers are written as `init?`. */
|
||||
predicate isFailable() {
|
||||
this.getInterfaceType().(FunctionType).getResult().(FunctionType).getResult() instanceof
|
||||
OptionalType
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `MacroDecl`.
|
||||
* This module provides the public class `MacroDecl`.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.MacroDecl
|
||||
private import MacroDeclImpl
|
||||
import codeql.swift.elements.decl.GenericContext
|
||||
import codeql.swift.elements.MacroRole
|
||||
import codeql.swift.elements.decl.ParamDecl
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
|
||||
/**
|
||||
* A declaration of a macro. Some examples:
|
||||
@@ -17,4 +21,4 @@ private import codeql.swift.generated.decl.MacroDecl
|
||||
* macro C() = C.C
|
||||
* ```
|
||||
*/
|
||||
class MacroDecl extends Generated::MacroDecl { }
|
||||
final class MacroDecl = Impl::MacroDecl;
|
||||
|
||||
28
swift/ql/lib/codeql/swift/elements/decl/MacroDeclImpl.qll
generated
Normal file
28
swift/ql/lib/codeql/swift/elements/decl/MacroDeclImpl.qll
generated
Normal file
@@ -0,0 +1,28 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `MacroDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.MacroDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `MacroDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* 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
|
||||
* ```
|
||||
*/
|
||||
class MacroDecl extends Generated::MacroDecl { }
|
||||
}
|
||||
@@ -1,60 +1,3 @@
|
||||
private import swift
|
||||
private import MethodImpl
|
||||
|
||||
private Decl getAMember(Decl ctx) {
|
||||
ctx.getAMember() = result
|
||||
or
|
||||
exists(VarDecl var |
|
||||
ctx.getAMember() = var and
|
||||
var.getAnAccessor() = result
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that is a member of a class, struct, enum or protocol.
|
||||
*/
|
||||
class Method extends Function {
|
||||
Method() {
|
||||
this = getAMember(any(ClassDecl c))
|
||||
or
|
||||
this = getAMember(any(StructDecl c))
|
||||
or
|
||||
this = getAMember(any(ExtensionDecl c))
|
||||
or
|
||||
this = getAMember(any(EnumDecl c))
|
||||
or
|
||||
this = getAMember(any(ProtocolDecl c))
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this function is called `funcName` and is a member of a
|
||||
* class, struct, extension, enum or protocol called `typeName`.
|
||||
*/
|
||||
cached
|
||||
predicate hasQualifiedName(string typeName, string funcName) {
|
||||
this.getName() = funcName and
|
||||
exists(Decl d |
|
||||
d.asNominalTypeDecl().getFullName() = typeName and
|
||||
d.getAMember() = this
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this function is called `funcName` and is a member of a
|
||||
* class, struct, extension, enum or protocol called `typeName` in a module
|
||||
* called `moduleName`.
|
||||
*/
|
||||
predicate hasQualifiedName(string moduleName, string typeName, string funcName) {
|
||||
this.hasQualifiedName(typeName, funcName) and
|
||||
this.getModule().getFullName() = moduleName
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this function is a `static` or `class` method, as opposed to an instance method.
|
||||
*/
|
||||
predicate isStaticOrClassMethod() { this.getSelfParam().getType() instanceof MetatypeType }
|
||||
|
||||
/**
|
||||
* Holds if this function is an instance method, as opposed to a `static` or `class` method.
|
||||
*/
|
||||
predicate isInstanceMethod() { not this.isStaticOrClassMethod() }
|
||||
}
|
||||
final class Method = Impl::Method;
|
||||
|
||||
63
swift/ql/lib/codeql/swift/elements/decl/MethodImpl.qll
Normal file
63
swift/ql/lib/codeql/swift/elements/decl/MethodImpl.qll
Normal file
@@ -0,0 +1,63 @@
|
||||
private import swift
|
||||
private import codeql.swift.elements.decl.FunctionImpl::Impl as FunctionImpl
|
||||
|
||||
module Impl {
|
||||
private Decl getAMember(Decl ctx) {
|
||||
ctx.getAMember() = result
|
||||
or
|
||||
exists(VarDecl var |
|
||||
ctx.getAMember() = var and
|
||||
var.getAnAccessor() = result
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that is a member of a class, struct, enum or protocol.
|
||||
*/
|
||||
class Method extends FunctionImpl::Function {
|
||||
Method() {
|
||||
this = getAMember(any(ClassDecl c))
|
||||
or
|
||||
this = getAMember(any(StructDecl c))
|
||||
or
|
||||
this = getAMember(any(ExtensionDecl c))
|
||||
or
|
||||
this = getAMember(any(EnumDecl c))
|
||||
or
|
||||
this = getAMember(any(ProtocolDecl c))
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this function is called `funcName` and is a member of a
|
||||
* class, struct, extension, enum or protocol called `typeName`.
|
||||
*/
|
||||
cached
|
||||
predicate hasQualifiedName(string typeName, string funcName) {
|
||||
this.getName() = funcName and
|
||||
exists(Decl d |
|
||||
d.asNominalTypeDecl().getFullName() = typeName and
|
||||
d.getAMember() = this
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this function is called `funcName` and is a member of a
|
||||
* class, struct, extension, enum or protocol called `typeName` in a module
|
||||
* called `moduleName`.
|
||||
*/
|
||||
predicate hasQualifiedName(string moduleName, string typeName, string funcName) {
|
||||
this.hasQualifiedName(typeName, funcName) and
|
||||
this.getModule().getFullName() = moduleName
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this function is a `static` or `class` method, as opposed to an instance method.
|
||||
*/
|
||||
predicate isStaticOrClassMethod() { this.getSelfParam().getType() instanceof MetatypeType }
|
||||
|
||||
/**
|
||||
* Holds if this function is an instance method, as opposed to a `static` or `class` method.
|
||||
*/
|
||||
predicate isInstanceMethod() { not this.isStaticOrClassMethod() }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
private import codeql.swift.generated.decl.MissingMemberDecl
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `MissingMemberDecl`.
|
||||
*/
|
||||
|
||||
private import MissingMemberDeclImpl
|
||||
import codeql.swift.elements.decl.Decl
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A placeholder for missing declarations that can arise on object deserialization.
|
||||
*/
|
||||
class MissingMemberDecl extends Generated::MissingMemberDecl {
|
||||
override string toString() { result = this.getName() + " (missing)" }
|
||||
}
|
||||
final class MissingMemberDecl = Impl::MissingMemberDecl;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user