mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #20732 from jketema/swift-6.2-elements
Swift: Support AST elements new in Swift 6.2
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
class Element extends @element {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
class Expr extends @expr {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
class Decl extends @decl {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
class DeclOrNone extends @decl_or_none {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
class ModuleOrNone extends @module_decl_or_none {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
class Type extends @type {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
class TypeOrNone extends @type_or_none {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
query predicate new_decls(Decl decl, ModuleOrNone moduleOrNone) {
|
||||
decls(decl, moduleOrNone) and not using_decls(decl)
|
||||
}
|
||||
|
||||
query predicate new_decl_members(Decl decl, int index, DeclOrNone declOrNone) {
|
||||
decl_members(decl, index, declOrNone) and not using_decls(decl)
|
||||
}
|
||||
|
||||
query predicate new_expr_types(Expr id, TypeOrNone typeOrNone) {
|
||||
expr_types(id, typeOrNone) and not unsafe_exprs(id)
|
||||
}
|
||||
|
||||
query predicate new_types(Type id, string name, TypeOrNone typeOrNone) {
|
||||
types(id, name, typeOrNone) and not inline_array_types(id, _, _)
|
||||
}
|
||||
|
||||
query predicate new_unspecified_elements(Element id, string property, string error) {
|
||||
unspecified_elements(id, property, error)
|
||||
or
|
||||
using_decls(id) and
|
||||
property = "" and
|
||||
error = "UsingDecl removed during database downgrade. Please update your CodeQL."
|
||||
or
|
||||
unsafe_exprs(id) and
|
||||
property = "" and
|
||||
error = "UnsafeExpr removed during database downgrade. Please update your CodeQL."
|
||||
or
|
||||
inline_array_types(id, _, _) and
|
||||
property = "" and
|
||||
error = "InlineArrayType removed during database downgrade. Please update your CodeQL."
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
description: Support AST elements new in Swift 6.2
|
||||
compatibility: backwards
|
||||
accessor_is_distributed_get.rel: delete
|
||||
accessor_is_read2.rel: delete
|
||||
accessor_is_modify2.rel: delete
|
||||
accessor_is_init.rel: delete
|
||||
decls.rel: run downgrades.qlo new_decls
|
||||
decl_members.rel: run downgrades.qlo new_decl_members
|
||||
expr_types.rel: run downgrades.qlo new_expr_types
|
||||
inline_array_types.rel: delete
|
||||
types.rel: run downgrades.qlo new_types
|
||||
unsafe_exprs.rel: delete
|
||||
unspecified_elements.rel: run downgrades.qlo new_unspecified_elements
|
||||
using_decls.rel: delete
|
||||
using_decl_is_main_actor.rel: delete
|
||||
using_decl_is_nonisolated.rel: delete
|
||||
@@ -19,14 +19,19 @@ class ValueDeclOrNone extends @value_decl_or_none {
|
||||
}
|
||||
|
||||
predicate isKeyPathComponentWithNewKind(KeyPathComponent id) {
|
||||
key_path_components(id, 3, _) or key_path_components(id, 4, _)
|
||||
key_path_components(id, 1, _) or key_path_components(id, 4, _)
|
||||
}
|
||||
|
||||
query predicate new_key_path_components(KeyPathComponent id, int kind, TypeOrNone component_type) {
|
||||
exists(int old_kind |
|
||||
key_path_components(id, old_kind, component_type) and
|
||||
not isKeyPathComponentWithNewKind(id) and
|
||||
if old_kind < 5 then kind = old_kind else kind = old_kind - 2
|
||||
if old_kind = 0
|
||||
then kind = old_kind
|
||||
else
|
||||
if old_kind = 2 or old_kind = 3
|
||||
then kind = old_kind - 1
|
||||
else kind = old_kind - 2
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ MAP(swift::Expr, ExprTag)
|
||||
MAP(swift::ParenExpr, ParenExprTag)
|
||||
MAP(swift::DotSelfExpr, DotSelfExprTag)
|
||||
MAP(swift::AwaitExpr, AwaitExprTag)
|
||||
MAP(swift::UnsafeExpr, void) // TODO: Swift 6.2
|
||||
MAP(swift::UnsafeExpr, UnsafeExprTag)
|
||||
MAP(swift::BorrowExpr, BorrowExprTag)
|
||||
MAP(swift::UnresolvedMemberChainResultExpr, UnresolvedMemberChainResultExprTag)
|
||||
MAP(swift::AnyTryExpr, AnyTryExprTag)
|
||||
@@ -241,7 +241,7 @@ MAP(swift::Decl, DeclTag)
|
||||
MAP(swift::MissingMemberDecl, MissingMemberDeclTag)
|
||||
MAP(swift::PatternBindingDecl, PatternBindingDeclTag)
|
||||
MAP(swift::EnumCaseDecl, EnumCaseDeclTag)
|
||||
MAP(swift::UsingDecl, void) // TODO: Swift 6.2
|
||||
MAP(swift::UsingDecl, UsingDeclTag)
|
||||
MAP(swift::OperatorDecl, OperatorDeclTag)
|
||||
MAP(swift::InfixOperatorDecl, InfixOperatorDeclTag)
|
||||
MAP(swift::PrefixOperatorDecl, PrefixOperatorDeclTag)
|
||||
@@ -342,13 +342,13 @@ MAP(swift::TypeBase, TypeTag)
|
||||
MAP(swift::IntegerType, IntegerTypeTag)
|
||||
MAP(swift::SugarType, SugarTypeTag)
|
||||
MAP(swift::TypeAliasType, TypeAliasTypeTag)
|
||||
MAP(swift::LocatableType, void) // TODO: Swift 6.2
|
||||
MAP(swift::LocatableType, void) // created during type checking and only used for constraint checking
|
||||
MAP(swift::SyntaxSugarType, SyntaxSugarTypeTag)
|
||||
MAP(swift::UnarySyntaxSugarType, UnarySyntaxSugarTypeTag)
|
||||
MAP(swift::ArraySliceType, ArraySliceTypeTag)
|
||||
MAP(swift::OptionalType, OptionalTypeTag)
|
||||
MAP(swift::VariadicSequenceType, VariadicSequenceTypeTag)
|
||||
MAP(swift::InlineArrayType, void) // TODO: Swift 6.2
|
||||
MAP(swift::InlineArrayType, InlineArrayTypeTag)
|
||||
MAP(swift::DictionaryType, DictionaryTypeTag)
|
||||
|
||||
MAP(swift::AvailabilitySpec, AvailabilitySpecTag)
|
||||
|
||||
@@ -137,6 +137,19 @@ codeql::EnumCaseDecl DeclTranslator::translateEnumCaseDecl(const swift::EnumCase
|
||||
return entry;
|
||||
}
|
||||
|
||||
codeql::UsingDecl DeclTranslator::translateUsingDecl(const swift::UsingDecl& decl) {
|
||||
auto entry = createEntry(decl);
|
||||
switch (decl.getSpecifier()) {
|
||||
case swift::UsingSpecifier::MainActor:
|
||||
entry.is_main_actor = true;
|
||||
break;
|
||||
case swift::UsingSpecifier::Nonisolated:
|
||||
entry.is_nonisolated = true;
|
||||
break;
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
codeql::EnumElementDecl DeclTranslator::translateEnumElementDecl(
|
||||
const swift::EnumElementDecl& decl) {
|
||||
auto entry = createEntry(decl);
|
||||
@@ -198,16 +211,16 @@ codeql::Accessor DeclTranslator::translateAccessorDecl(const swift::AccessorDecl
|
||||
entry.is_unsafe_mutable_address = true;
|
||||
break;
|
||||
case swift::AccessorKind::DistributedGet:
|
||||
// TODO: Swift 6.2
|
||||
entry.is_distributed_get = true;
|
||||
break;
|
||||
case swift::AccessorKind::Read2:
|
||||
// TODO: Swift 6.2
|
||||
entry.is_read2 = true;
|
||||
break;
|
||||
case swift::AccessorKind::Modify2:
|
||||
// TODO: Swift 6.2
|
||||
entry.is_modify2 = true;
|
||||
break;
|
||||
case swift::AccessorKind::Init:
|
||||
// TODO: Swift 6.2
|
||||
entry.is_init = true;
|
||||
break;
|
||||
}
|
||||
fillFunction(decl, entry);
|
||||
|
||||
@@ -34,6 +34,7 @@ class DeclTranslator : public AstTranslatorBase<DeclTranslator> {
|
||||
codeql::EnumDecl translateEnumDecl(const swift::EnumDecl& decl);
|
||||
codeql::ProtocolDecl translateProtocolDecl(const swift::ProtocolDecl& decl);
|
||||
codeql::EnumCaseDecl translateEnumCaseDecl(const swift::EnumCaseDecl& decl);
|
||||
codeql::UsingDecl translateUsingDecl(const swift::UsingDecl& decl);
|
||||
codeql::EnumElementDecl translateEnumElementDecl(const swift::EnumElementDecl& decl);
|
||||
codeql::GenericTypeParamDecl translateGenericTypeParamDecl(
|
||||
const swift::GenericTypeParamDecl& decl);
|
||||
|
||||
@@ -88,6 +88,14 @@ codeql::ArraySliceType TypeTranslator::translateArraySliceType(const swift::Arra
|
||||
return entry;
|
||||
}
|
||||
|
||||
codeql::InlineArrayType TypeTranslator::translateInlineArrayType(
|
||||
const swift::InlineArrayType& type) {
|
||||
auto entry = createTypeEntry(type);
|
||||
entry.count_type = dispatcher.fetchLabel(type.getCountType());
|
||||
entry.element_type = dispatcher.fetchLabel(type.getElementType());
|
||||
return entry;
|
||||
}
|
||||
|
||||
codeql::DictionaryType TypeTranslator::translateDictionaryType(const swift::DictionaryType& type) {
|
||||
auto entry = createTypeEntry(type);
|
||||
entry.key_type = dispatcher.fetchLabel(type.getKeyType());
|
||||
|
||||
@@ -28,6 +28,7 @@ class TypeTranslator : public TypeTranslatorBase<TypeTranslator> {
|
||||
const swift::UnarySyntaxSugarType& type);
|
||||
codeql::OptionalType translateOptionalType(const swift::OptionalType& type);
|
||||
codeql::ArraySliceType translateArraySliceType(const swift::ArraySliceType& type);
|
||||
codeql::InlineArrayType translateInlineArrayType(const swift::InlineArrayType& type);
|
||||
codeql::DictionaryType translateDictionaryType(const swift::DictionaryType& type);
|
||||
codeql::GenericFunctionType translateGenericFunctionType(const swift::GenericFunctionType& type);
|
||||
codeql::GenericTypeParamType translateGenericTypeParamType(
|
||||
|
||||
30
swift/ql/.generated.list
generated
30
swift/ql/.generated.list
generated
@@ -56,6 +56,7 @@ lib/codeql/swift/elements/decl/SubscriptDecl.qll b55ac28cda7402efea4e57b6fe6c6b5
|
||||
lib/codeql/swift/elements/decl/TopLevelCodeDecl.qll e5786a58e02c0d737ad382571ca6591bf18e0615b3d06b30a057209a80550e50 7b2cc05de78788cd862c8961e481a80b325b91e4fb64f22049564a21f0a5f95e
|
||||
lib/codeql/swift/elements/decl/TypeAliasDecl.qll 73e7ecca7d4faf078640a872f4857f465e80ce4d0c99017f3943419c8b65acf4 bfd14ad6a8411acb936036c4efc2ab4e1e165459eb270c02017b9f0de9a71fab
|
||||
lib/codeql/swift/elements/decl/TypeDecl.qll feb11a9eb276eff1eac5e72b5be4097fd4492c6dc81710d86c3eb55e37240795 2d1e4419aa05997e3149775a68e80065f5955fcaa141402c1892b7cb23ca58a2
|
||||
lib/codeql/swift/elements/decl/UsingDecl.qll 40fa34a7e7204ec53132cefa69857c9c4bfc286b8bd05e693a3ceead881e0e4a 44c62d2e4cc8b42481a999083b520e07c6d5e652677ac5b4c55887957be50e4e
|
||||
lib/codeql/swift/elements/decl/ValueDecl.qll f71d9aa147eb78894b5b1c292b13334b9661a0b4347a25803a118cdccfa29cf7 de304b3dc9c5b6e7d7a0d5989fd40e25827aefdd5062ab2634c0f8c79121cfd3
|
||||
lib/codeql/swift/elements/decl/VarDecl.qll 5eb74f663d935328da028e892e8224a25e09c0edafa34b87471f57e4d7e51bdc 3f8e03ee0748ea67aa7a962a12c97fd20d37a1987cabadc0c1d5080900d149d5
|
||||
lib/codeql/swift/elements/decl/internal/AbstractStorageDeclImpl.qll 56e7b7332f4a55a8860c03d0d756bfb31f66048c8082834a15bf613eca9d6e12 f6a9c384f9355bbc34e8c8654fd19f62ea2592c96b8bf79dcd2915406ff54f23
|
||||
@@ -108,6 +109,8 @@ lib/codeql/swift/elements/decl/internal/StructDeclImpl.qll 9fc7b419040e509723320
|
||||
lib/codeql/swift/elements/decl/internal/SubscriptDeclConstructor.qll 67882596f384f4710dd81aa284b53c7b3e9cd3c30f120e98252bfbd2f5dd34e1 f336269cdfbd3ef115ea29fe39c2d04deeb95ae8f927af27a4dc7acc4a14699a
|
||||
lib/codeql/swift/elements/decl/internal/TopLevelCodeDeclConstructor.qll 3924b6e5bee007fd62ae4b2352e38ae20292dbdab65fd1724ca9cd698bfc88f4 28ac8627c75cd787e6dca1a8bfed4c36edbfd13cdad19a08905a49d56b815ad7
|
||||
lib/codeql/swift/elements/decl/internal/TypeAliasDeclConstructor.qll 1dc3d7ef11adf5fb9b4be1c824b8a49393137071584ed44224a2f47b3a0b8a4a 2e1e8222b851376b0d7843a93fb6affeac7f8ee52867623b1e2fa99c1ac37dbb
|
||||
lib/codeql/swift/elements/decl/internal/UsingDeclConstructor.qll 52fdc32c208571c3a0c588768cc65f04e708b8d7533b4d2d206734616f7d1475 aeece428c56101536ec8abd25364d208f1a020727d1294e9c97b13b7ab90f923
|
||||
lib/codeql/swift/elements/decl/internal/UsingDeclImpl.qll 49e5068c50f424d314d0c2df6723c17cb51bfab5a419b0d45d88f411f326e232 5389436fe692eb0ecf96e80555a589596e6c7b553d37f2990addd8a11e4efce0
|
||||
lib/codeql/swift/elements/expr/AbiSafeConversionExpr.qll 62c6b231898c42a7756cae20ed9b3818958872cb581cca6f1db0b28e4cff9b93 b90f7496229e76a40ac66e8a3d0ac2f14c65d729ebeea796cb34f395f2858b32
|
||||
lib/codeql/swift/elements/expr/ActorIsolationErasureExpr.qll bbbc615255877e7fd95199710449fa696d68d81a4cfb985240d0cfbf124d9d37 526e7b4f2b5af5f2c8172b5d2c76c1f7198025e02c9e1068f92fa6c78cddeb81
|
||||
lib/codeql/swift/elements/expr/AnyHashableErasureExpr.qll 3388c1ad2c9d984fb0a0368ef9090f03cc5bbd63088024308a056cabfb9c93c9 49e3450180b8a4626911fc83bd64d17e486fad6b50f33b55b9322faef1ced39f
|
||||
@@ -240,6 +243,7 @@ lib/codeql/swift/elements/expr/UnresolvedPatternExpr.qll f27ef68f5bbb2d957513efd
|
||||
lib/codeql/swift/elements/expr/UnresolvedSpecializeExpr.qll 9e1b27d90419e757480d0ae369bec1f159de3c28ddf760cdf24dd30b0ec6fcf9 1aeab5e10b1c3f081c5c3ca5bd807bfc38726a7b21b7201e0a9f997572935c73
|
||||
lib/codeql/swift/elements/expr/UnresolvedTypeConversionExpr.qll e259a187d70ea6b6007ebdd3659aa7e1947b2dc606642ccda27309ff74ffc3db c6a85856f82e74ed5597e381a5e4c27927eb4f01c7b588b1f4277dfb0e977521
|
||||
lib/codeql/swift/elements/expr/UnsafeCastExpr.qll 09c18a43f66432340b3212cb1933e096faf3825fa0a9abb30f7be11f170b6f97 93f35d500d67b71ed52d508ca9f7236c671f5b68a0ce6a0ee6a1a03d2b5db290
|
||||
lib/codeql/swift/elements/expr/UnsafeExpr.qll 49f076af1e154ff5eb6588f77e6532e75b4b6d9710185443fd48740bc5aaba99 7c558095d3be8401aa4d9065bd86110959cbced7f5d65f8120530d5497b3de15
|
||||
lib/codeql/swift/elements/expr/VarargExpansionExpr.qll c7d7574caaac88fd73e69e82a84ca924e078eece0fd85a476b4a831e23b425f9 27213c88f864b7f8fd73edf8951e04a5ae7a57140a387df7c03dc1544ced723b
|
||||
lib/codeql/swift/elements/expr/internal/AbiSafeConversionExprConstructor.qll de9d2daf68b754e783374d017116606c8cd0710dbf8989d3606939e977dc672c 63c5ddb9da56da2c9637d7a0a6d9d069f745b4c095b07c9494a0b3a7e11be95b
|
||||
lib/codeql/swift/elements/expr/internal/AbiSafeConversionExprImpl.qll 6b2c51a5a5dd17044c6f5510048a9a2187aac9d35a70541faa9400406e35bc1e 448c23eec2ef44bd90e6c1636e3e881ca3447198eb68b8261412f42c4995b766
|
||||
@@ -429,6 +433,8 @@ lib/codeql/swift/elements/expr/internal/UnresolvedTypeConversionExprConstructor.
|
||||
lib/codeql/swift/elements/expr/internal/UnresolvedTypeConversionExprImpl.qll 3511bf1bea3e3cee95c0793e40000493537076d76f235bfe91866e1e0caf97ab b97de4c795e873acee89d9b87d8c58b14e05f0c09e3a0385a479638adcf32966
|
||||
lib/codeql/swift/elements/expr/internal/UnsafeCastExprConstructor.qll f8771eb8f677003fc62a2f78dcdffc46ee5510001428dde58a7e9d82746b6f97 f20eb160de27d9413a3b5d7ace406fe5f6912ad5720db85d8a12c48c71e42b35
|
||||
lib/codeql/swift/elements/expr/internal/UnsafeCastExprImpl.qll 787104ce97d702c0c3efa81a0f8416584f35c454d3b2ffe7bd0917861589612b 50496a0f3f3a9e3d5a2e6cbcd5eb16b634cf3fd5e0878bdf017678243dbfd8a0
|
||||
lib/codeql/swift/elements/expr/internal/UnsafeExprConstructor.qll e7644366f93dfab6ae13910908a18a3a79aa7aee728c62da0bda158fe18279dd 7b9d866b762e1b49a9fa3320247b6c9f8d3f80283e2521c58a422dc73a15f6ce
|
||||
lib/codeql/swift/elements/expr/internal/UnsafeExprImpl.qll bae39cfbca303a18001397aa5f24c9ae59cd6c722e0db9488c48173027529a8a f0de29ed4b8b53b5b6f0cabf94d64eb3559f6b5462fe80bcbce062c7588371fb
|
||||
lib/codeql/swift/elements/expr/internal/VarargExpansionExprConstructor.qll 917701083da11fce895c53d5f3e0a52b8e3142e9aacdf1d8536a4216ef377b16 b72ca103ced9cbb45f2ef9387387b8aaf3134e358ae5a03fa3ea242896954c81
|
||||
lib/codeql/swift/elements/internal/AvailabilityInfoConstructor.qll 89c731f266122a3434b88dfd573d68c50b5c4fa5e13c2443c54f78e682190d1e 86beb6f684e08b6f557b7d67bc164113e9f5270c09bbe95fbd81c558d77f7f84
|
||||
lib/codeql/swift/elements/internal/AvailabilitySpecConstructor.qll cca46cd2908923a08b7f6a8bea0c0c11071523bcc421bfe141d0e0bafd8dfcb4 cbb1494346379083c0f275111eca78617591568894258a6b73efda34f3fba1ba
|
||||
@@ -558,6 +564,7 @@ lib/codeql/swift/elements/type/FunctionType.qll 1a64eb24e8baa74ef2a8e4451f97442a
|
||||
lib/codeql/swift/elements/type/GenericFunctionType.qll 8df1db2785c4e6b88f9af13eb7ba473f91459f57d19c4d706847ac6e3a02d64a 186efec4c23c372f9d9f7038d4b5a36f9c3184564e5b6899d2e467864977dd89
|
||||
lib/codeql/swift/elements/type/GenericTypeParamType.qll d75c865295501f7efe27399ce93b30f6a4a217ed207e7227a5d9870cf536ad5f 1a764963700b872c8ea7afd586abbc0dadda68366555baefa6737d87b701a73f
|
||||
lib/codeql/swift/elements/type/InOutType.qll 3ff69b884d2604f66290b188892f1d9d4321bf77a20bcda2ce5cb69e565b0cfb 3cd2b06bc606d84b1d73b8fcd2aea4d49aed0c8b98902b44dd6f19d298db7f9d
|
||||
lib/codeql/swift/elements/type/InlineArrayType.qll 6af5235213a7d861944e7450143393bf3f56acbe4ac86770aa3920f39f7e61cb 7e04b96dd988e2f7edd7e34d5cf4a787cbcb94b8d0c21417e3e4829112dbe34e
|
||||
lib/codeql/swift/elements/type/IntegerType.qll 118acea4a849506aeddd5df92e9f134bf611f8c08cb44e18dc56259df1c98e5f 6801c067c63e310f28fed70a7c1ed87d08be6b7070a7ec677517a93b6eab0c3f
|
||||
lib/codeql/swift/elements/type/LValueType.qll e1e53b1467f7b4ff77a812ae9cd8ce151cfc21443a4da14319aee390c081775c 42f5a39fb2c1e5dad3fef6db56430c6063cb04b1ba9c1f2b9c68356aef6aef1c
|
||||
lib/codeql/swift/elements/type/LocalArchetypeType.qll 449ff6d721a70a0f8f7a8e1604471513af1523bad6efcc49820154e4d42a426b 1121b807f15d442b708bb614b684ad3d0581c787bae4a16999b8dd7da5103ab6
|
||||
@@ -660,6 +667,8 @@ lib/codeql/swift/elements/type/internal/GenericTypeParamTypeConstructor.qll b126
|
||||
lib/codeql/swift/elements/type/internal/GenericTypeParamTypeImpl.qll efca259897a044fc967341a9fdb39497fc5e9bcb0b4ba33fa76cb926b98b3eb7 aaa621c691813a2f70f4071e3592d7760cef319904209770442ca0d0583f65a1
|
||||
lib/codeql/swift/elements/type/internal/InOutTypeConstructor.qll 40550fd07551bc7c1692e08f1cb0692defca613c3c6403719efc5998eb1f1bfd 775f16224a455e336da239a179f84581b345803b9576aca119aeb3eef583d739
|
||||
lib/codeql/swift/elements/type/internal/InOutTypeImpl.qll 28fc2931a424f551107b0ee49663d5d5307146c725353c5e484f0dd289f93dc0 ff12e91e30ee53bb8acdcf9e31261b6b1b0ae966babb4eacacb344c22aa1cb6e
|
||||
lib/codeql/swift/elements/type/internal/InlineArrayTypeConstructor.qll 382c61399e3e51d8ffa41e5ee3c59d93fc4899284e715f7fb58696cad5d9ca54 0401ff7ff1c07d8d55e670f21a47377b6d650fe74b78c7d9daf9d23de30dbfdf
|
||||
lib/codeql/swift/elements/type/internal/InlineArrayTypeImpl.qll b74965b9567b7bb6afdf1834ab3e372da0b13ca10244cbdeee55f71ad952e418 c026806f4f3e5fb416b0d1511c8e8aa6b31fa525b2987a0774d8750118dacad4
|
||||
lib/codeql/swift/elements/type/internal/IntegerTypeConstructor.qll 39e33225066f7162309f888723f81893703ee0daba68f192e3277f922060160b 08903e4d0bc8889761d016d6b6c4b7f1bd061a08c97e2a151b59cc0400ea2199
|
||||
lib/codeql/swift/elements/type/internal/IntegerTypeImpl.qll ba8e6e972dcea4dbe937083c819c5fd9eb49ba4b6176e040ce65d36a95fe31bd 88064b52d9430b67edd62ed37426f5adc8f6d80722370340d147b0a4ca90f70c
|
||||
lib/codeql/swift/elements/type/internal/LValueTypeConstructor.qll e3ab6ebb6191a2553bd4a483067acf7131862bc7235af2da74c35e2250300da8 cfa65d0f22416408ee1e5e5af440166fe5f5b39ae9bf1b9ae92bd9f9f2954b76
|
||||
@@ -712,7 +721,7 @@ lib/codeql/swift/elements/type/internal/UnresolvedTypeImpl.qll ee1499dd568753898
|
||||
lib/codeql/swift/elements/type/internal/VariadicSequenceTypeConstructor.qll fc74a5a2a2effa28ef24509b20ee4373d97cf6e8c71840121bb031c6adedf584 c9b2effc1d01c13c5e6a74a111122fa79a2f6554dda3cb016d68ba397e566ec4
|
||||
lib/codeql/swift/elements/type/internal/WeakStorageTypeConstructor.qll 5fdce3716aba6318522174a2c455a63480970222ae81c732fb19c6dd3ae2d271 60ea79d6943e129deba0deccb566cf9d73f78398b0f7f0212674d91287d6b2ae
|
||||
lib/codeql/swift/elements/type/internal/WeakStorageTypeImpl.qll 74f79b458f3204ec2519bd654de21bc4fb6b76816bd8ca01990fe897563a1383 34e1810f74cecda5b580ed050438ae1d914b97a36b8f4e2de1c25254c0cac633
|
||||
lib/codeql/swift/elements.qll 84a5704b697f4a3f224ec2b99d49f4d2a6ee2655aa86c72ea1cbc901b8231879 84a5704b697f4a3f224ec2b99d49f4d2a6ee2655aa86c72ea1cbc901b8231879
|
||||
lib/codeql/swift/elements.qll ec0104a658330f595eac7dd8578d996905a6c2cf78765744c3967a8f3d1c3273 ec0104a658330f595eac7dd8578d996905a6c2cf78765744c3967a8f3d1c3273
|
||||
lib/codeql/swift/generated/AstNode.qll 6fb80e9b230a1e3ae8193af40744f253d5cc81dc4239156924e5ab606c491efc e5c28418e9a38bde08f323a3986a199620189fc4a8a4dc8f670610a5d3d65b99
|
||||
lib/codeql/swift/generated/AvailabilityInfo.qll e3a5274c43e72ff124b6988fd8be0c83a41b89337e11104150dd0ca7f51d8a11 889563791ca8d9758dbbccf64a0731c4bdbf721cad32bc6cd723f1072b6aa1de
|
||||
lib/codeql/swift/generated/AvailabilitySpec.qll 1bd2a0ee085f802c99090e681ab3339fc5013024d79deef39f376de12ab76d37 658f2eb51860726cfa6808b3e3501d624e0734750d1420f7a25c89782f1f6c7e
|
||||
@@ -724,21 +733,21 @@ lib/codeql/swift/generated/Diagnostics.qll 03ea201db80d33b18f7f6c71267044c695c25
|
||||
lib/codeql/swift/generated/Element.qll bf8f688e05f44f18384067c3cab7f05796764e2b4cce7ff24da419c3dae26194 820390ffbb1012f73267668626f7d0ccd368500331c91bbc276fcb1c25037e41
|
||||
lib/codeql/swift/generated/ErrorElement.qll b39bd7c8b4e2011f4a6889e073ebf5b628db32f36f50b067250ae730d9f26561 fd859ec969ba434049e7ba4e78271cc8cebc8b058d2e96e4d47a22064cbb5a21
|
||||
lib/codeql/swift/generated/File.qll 476ac95566ef0080e0ad8c3da144b1be1d945d2f33a24f0864d85ff7c56a09b1 3134018bb50166cbf2690f64bba551cace350e4a7e6e25bcded18f997ad1835b
|
||||
lib/codeql/swift/generated/KeyPathComponent.qll 99d1699394bb7f9ff904e2d44149f20d3e08e35df171a6141f111c9ac9138b62 d8f62f60cc2c1e73146af79e5567c04cd273b73bfb5202bda964ec15032cb040
|
||||
lib/codeql/swift/generated/KeyPathComponent.qll e11dcf952045b5e6062e24c23515cff9eae0b61e5ddf16d29f2c58e2a79a6aa6 3371ae8f26dd5168ac1593bc92a4acd5105905a10a2d696d9ff5478370e6b055
|
||||
lib/codeql/swift/generated/Locatable.qll 1d37fa20de71c0b9986bfd7a7c0cb82ab7bf3fda2d2008700f955ad82ce109a7 e97d4d4fb8a4800e0008cc00f60c8ed9b1ebd5f1140fd85e68b034616178d721
|
||||
lib/codeql/swift/generated/Location.qll 5e20316c3e480ddfe632b7e88e016c19f10a67df1f6ae9c8f128755a6907d6f5 5a0af2d070bcb2ed53d6d0282bf9c60dc64c2dce89c21fdd485e9c7893c1c8fa
|
||||
lib/codeql/swift/generated/MacroRole.qll facf907e75490d69cd401c491215e4719324d751f40ea46c86ccf24cf3663c1f 969d8d4b44e3f1a9c193a152a4d83a303e56d2dbb871fc920c47a33f699cf018
|
||||
lib/codeql/swift/generated/ParentChild.qll 88a8941821b1f511925eb8955ff25065a6004c61aa866854ee941d7556b1eb6d 6e32b4902cea8a78a9b2775826d64300987932c406212d841deeab7c48a5ef8b
|
||||
lib/codeql/swift/generated/ParentChild.qll 4d697f5372ad82380dc375a59fa0619ee56c7d88be58530147cd8e160262bbe3 e164b712a41f20d0b9986804cd753fb5e55ceb55139234d98bdb332a8f248db4
|
||||
lib/codeql/swift/generated/PureSynthConstructors.qll bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4 bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4
|
||||
lib/codeql/swift/generated/Raw.qll aa47e81ab3004a0049da3a85f25456bba15ed37329622153c154a296024077f3 46e9fb37fadc23d168fd43cbe77a792ba8e56aab7f4a3a984add1928efd4ac78
|
||||
lib/codeql/swift/generated/Synth.qll a472fca73084eedab9ca8bb2fb82e7573d525444bb8d3729a3d18e06647fd96d b19984583774e30dae481d3d5cc95ebf2843c04dd952eb16cbf8a702ae52bbd8
|
||||
lib/codeql/swift/generated/SynthConstructors.qll f3687a56d2fd9bc38d95d9ca335f558a91c865bd0bd1c7c73affedefd7514183 f3687a56d2fd9bc38d95d9ca335f558a91c865bd0bd1c7c73affedefd7514183
|
||||
lib/codeql/swift/generated/Raw.qll f7dd5c3eb1afba1077dd6c291502e2b5dd5d18000ee581f7e3ad4f0050165c69 f042929df4651dfe587769cd3f539d07f97328c2fe17fbe19cbb8e4fbefe97f2
|
||||
lib/codeql/swift/generated/Synth.qll 6af0f5778c6c6a9d9a518c00707501c3fdb3ccaa96fa06793549c2b1f28c9cbb 575829e7a2a4c7619c6d98f1b7ec47d978d0b3d77d5c1a87eae5e9f98612ef5b
|
||||
lib/codeql/swift/generated/SynthConstructors.qll c40f01e1331bdbe238620a41d17409cefe34a6b23066708ef5d74f8631b54f48 c40f01e1331bdbe238620a41d17409cefe34a6b23066708ef5d74f8631b54f48
|
||||
lib/codeql/swift/generated/UnknownFile.qll 247ddf2ebb49ce5ed4bf7bf91a969ddff37de6c78d43d8affccaf7eb586e06f2 452b29f0465ef45e978ef8b647b75e5a2a1e53f2a568fc003bc8f52f73b3fa4d
|
||||
lib/codeql/swift/generated/UnknownLocation.qll d871000b4f53ffca4f67ea23ca5626e5dcce125d62a4d4b9969e08cc974af6fc b05971d7774e60790362fb810fb7086314f40a2de747b8cb1bc823ec6494a4dd
|
||||
lib/codeql/swift/generated/UnspecifiedElement.qll d9ad4ba1ffff90cc465e8ba0dea8c4e8ba67dce5529b53b63ab6dc8e13c85e67 025218e1fee8ee382b63ad38009dfec73dc604d2ba80b9ad956c7c96eeed7022
|
||||
lib/codeql/swift/generated/decl/AbstractStorageDecl.qll 2e1479489d879fe5a712d69fd7956f81c413a854c55f1094a0c801af5ee9478b a20e02c383350c7cf7ddb23db1e782f802a82f4d76b67243f8d6491a759d1d53
|
||||
lib/codeql/swift/generated/decl/AbstractTypeParamDecl.qll b72e0759f91cad222e097629b1546e4d12dbc3e247cbb4d82057bb448deb1bfd 00e4135e775ff7076cada8894c6bae60aa642db717d6367a05f87b937f447a6e
|
||||
lib/codeql/swift/generated/decl/Accessor.qll 2b015ca1f56cb083d5da653f8a230f712cd86a0121e95c5dd97a3c54cd730872 980e94dbed41ff3852b88e5799620ab3b34f533e7623f8b56385ee0ac8569470
|
||||
lib/codeql/swift/generated/decl/Accessor.qll 4e03be18e1191959d7724eb933826c7089f337c56885b08f0962221535935f21 aa2156241f3740246950bd26f97641fc2a8a140fa5d1cd0a341b14c235f7a2b2
|
||||
lib/codeql/swift/generated/decl/AccessorOrNamedFunction.qll 4c545d471aff763dc92a2b2047a0543b3c3a487a591509d42bd5878b5b3d1747 07ec58884fdc5e3ddf138c4dd1eccea6bba849671a84e03d9ee12e2310fa8cf2
|
||||
lib/codeql/swift/generated/decl/AssociatedTypeDecl.qll a590cfa5980eaf5b52c2bfb0ad7c7d96e8f70894b9945099eea9940d7ef9ed35 fa909d2d471119652c12fac3fdf51abe526920d5f961fd9f9e9c7c512be3bd5d
|
||||
lib/codeql/swift/generated/decl/CapturedDecl.qll 07999cdbe928b22e157a7295f25c0a9483b29fd1784fe3d9c6e7f1f211b676ab 62b45dc415ab912ad77db69f93011573918ddaeb0ce6837434b86c3fe561536f
|
||||
@@ -777,6 +786,7 @@ lib/codeql/swift/generated/decl/SubscriptDecl.qll 18d84b4ef27ecb732ac4350b8b01cb
|
||||
lib/codeql/swift/generated/decl/TopLevelCodeDecl.qll b327da6de5b1e40f5eea5893f4fcb01803cfdd78bd757ec93daadedb7169bf8d 2d316fff198707fae5a43e6b24d2a547ee9502fd278468846495d1b2f4ea62b1
|
||||
lib/codeql/swift/generated/decl/TypeAliasDecl.qll 041c098c276bc7369049e9a11540e99b061d50977338cceca47488f82b21694e 06deed614cbe77031fdbf3f9591780e80b9f545adec8b7831a2b5329ee49bc5f
|
||||
lib/codeql/swift/generated/decl/TypeDecl.qll 92f74709cce7e9f0f713598d3b20b730475c312957c518b8096206f8744419a2 305bda46c8bef48b7e30392698e724093ab2984ffed74cae3361f818cbf8c77a
|
||||
lib/codeql/swift/generated/decl/UsingDecl.qll 3bb697961f5699ec9ed1b87511714eac4ee69f5d82e1fd8c6598f121e23a2f7b 4e72b98a84f796d3e0e556ae6b84bf7b7f08adc225dcdc00fd120461e287b472
|
||||
lib/codeql/swift/generated/decl/ValueDecl.qll d3b9c241fd6cb1ce8274435c0242775c28c08f6a47caae01ad1ecd38897b2cd5 bc81291b1394b47972d7b75b6a767ed847f881932a7d9345d28d161a55b66bd1
|
||||
lib/codeql/swift/generated/decl/VarDecl.qll 8978a73fa2d7a9f952b68a2638788eda857e62502311a33fa6de1dad49a6cb1c b8b6c8cf6773056c3a90494754b0a257dcae494c03d933f138ece7f531fb9158
|
||||
lib/codeql/swift/generated/expr/AbiSafeConversionExpr.qll 9d8f0f895a5e1abb89bed9671a9b398e48eca4664eb10b4b41263eb2a29bb2cf 4f65b8e62876664a357433f886baccaf40e4bf7e9ca7eebeb9f5d999354578f9
|
||||
@@ -914,6 +924,7 @@ lib/codeql/swift/generated/expr/UnresolvedPatternExpr.qll f197e1f19aa3b7641df8e9
|
||||
lib/codeql/swift/generated/expr/UnresolvedSpecializeExpr.qll 5b6d9a88439442624051af347514b0a9fd5e932a440979778cf4072f71317770 a8f10642376f9ffa7f7cc73ca81e1a1f5905778a2752f20360f8a84f333dbfdd
|
||||
lib/codeql/swift/generated/expr/UnresolvedTypeConversionExpr.qll f30db08dbb5fce2bf6149238f608c62b51079c3694ed80d15ddcbecb2af75346 71b60e93c67f7b66468400ce9cc8714c9ead1bacaa7ce27e9df94542b41318f9
|
||||
lib/codeql/swift/generated/expr/UnsafeCastExpr.qll ec430464e1b6253dfcf0d17c08a01efae318b3f0c8beb7c977209504ccc2cc4f 48d5a80c96dfa71e091be2ce13ab7123997a37f8bcbaa6bde070493286f6b7f0
|
||||
lib/codeql/swift/generated/expr/UnsafeExpr.qll 5c81d5ebcd95bb217703298b25741b84804d52536cbc70ddf51896cc8e84441c 9bfacf26cc4aa119a47db4b968e81e0db45aecf48390eb67d690053700aecfcb
|
||||
lib/codeql/swift/generated/expr/VarargExpansionExpr.qll 3f382a545ef79ef5cd7eadf397f01524769d5fa0ee6410f1d92ff6b9985a99ff ffe8d0caec0226a13599de646f9e0c5f0e1af3c2b7ed480b327f2d51850e9e32
|
||||
lib/codeql/swift/generated/pattern/AnyPattern.qll af808c11b81a388f7d35bd98b6abf0fef45a1e1ec850cad16abb754c97c4da82 5c6cb800d4f026792a49fb84a3404f0797e599425bc54f474e3df6a948c18cfe
|
||||
lib/codeql/swift/generated/pattern/BindingPattern.qll ec7a78c6f2c2e56494d87c8865da2028cc65875edc516fdbdbde8f2fc80a28e7 df9988a745548d8920a78c0aca6692b24e6dad19251420208d050ee4eb39eee3
|
||||
@@ -992,6 +1003,7 @@ lib/codeql/swift/generated/type/FunctionType.qll 739192b77787905a66d9c9970dc077c
|
||||
lib/codeql/swift/generated/type/GenericFunctionType.qll 50743701a62cad6f2cbe8b331a45bd3b18f3154b860720355b831735fd2208b4 481b28aee3e473a74a66628acd2050cfee9807ebad8c8a0646783e3942b89297
|
||||
lib/codeql/swift/generated/type/GenericTypeParamType.qll f266dffcd2f87f8411b796b97faa671a7bb5e6dd0aa67d3bfc9bbc06a47f1a3b 0e1625a7d2447faf75ec4c716ed1d5219b82ba8720450bc77d279e9854599758
|
||||
lib/codeql/swift/generated/type/InOutType.qll 809a3bb1c5eec066416c2fce85df9116e7402a368c7e955abe6a01c7673cbdf4 7c614fa92e624890f3a83e7a7f3464f8a94f45b60beeb77f9295850567522ba7
|
||||
lib/codeql/swift/generated/type/InlineArrayType.qll 90254c4b169240f55cf3d061474bb72cb9e107550d2ff1525e1ac6a38f03624a effa3759a6c2177f8586670c90445e7242a391bcffb3c354b5428221404ec926
|
||||
lib/codeql/swift/generated/type/IntegerType.qll f2040268ae94c41f27a659c09c55360b20000d40440cb9513409a95379b3b37f 4397d31da9bad9e5167d6dc6cb7f26071bb80e00538bd8f55e7fc53e45e8bd32
|
||||
lib/codeql/swift/generated/type/LValueType.qll 4a6422f21bd21b841d841cad9f7c01ce7eeb9ba6b5d1fa004fa44dc008eaa432 8914e356e0475f0f3b81c681295fa7a833fae2e24c491d8d6e552ad897be4184
|
||||
lib/codeql/swift/generated/type/LocalArchetypeType.qll de4f291bab61ccb699609f39682cbe29936da3c8be51e9a5620b0bce384bc852 152a74964a40daa7419de15d646ee8b62d137a8a5d7c5d0b002d81d1fdf12c47
|
||||
@@ -1032,7 +1044,7 @@ test/extractor-tests/generated/Comment/MISSING_SOURCE.txt 35fb32ea5393152eb7a875
|
||||
test/extractor-tests/generated/Diagnostics/Diagnostics.ql c1f8be2c283e13c1a4dadaa008e42f660ea09d9ee1de22b0e8493ef76384546e d84efa40eaecbce6b928a5b235e10bf1e4409a9d0778c365ec19d2fade7ab3ab
|
||||
test/extractor-tests/generated/File/File.ql a1385ef2080e04e8757f61b8e1d0129df9f955edf03fbb3b83cc9cb5498b4e95 0364d8c7f108d01b2641f996efedab7084956307e875e6bc078ea677d04267e0
|
||||
test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql 3fa617f8ed1b308d0c56f429ee8abe6d33ef60bf57d87f6dc89fdc8fe969a102 c2fa3153077dbe9e0fc608524dc03c82ff4ed460364d341ee6a817b0d75291c3
|
||||
test/extractor-tests/generated/decl/Accessor/Accessor.ql 7e50dd3c4119162bbfa3e2461300d876c60321d4b6473ddd35e0cb992108570e eb81ed8db92bff46974079e0f1100cf94bd639191a36db45ee9e65467abb6e38
|
||||
test/extractor-tests/generated/decl/Accessor/Accessor.ql 3d4301ec9ec6284b547f8cccf94c3077f0baf70778f458bc21bebc5de55c86e5 2f263e79ecd1ac8da56c17caff400fd3c40d83b6aa3d501830f1d2eeb48a57cd
|
||||
test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql 55a78a6b96a17532178a39bd39aa4df23295f98019bb00de041ba15dfd4f84d9 51dbcd86203d5d031d748f77943a81c2c50de4ff559af20a4a1a682a19978d4f
|
||||
test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql fd62be6c38d39f371c20e8c2f233e37a9da5aa234588920634f5db67e8beb3bd d51d35d4fd6a21cd596e064e0221d0c86e36312412a9bd4e64f431c123f3019a
|
||||
test/extractor-tests/generated/decl/ClassDecl/ClassDecl.ql d5fa7f68307e2e3e7ad060a125bda148e4a28f6acbef08a1a975bbf9ba947641 46d1e4f801414f1c869601dc706e41393e5fcd399e51da593c1e58737f6ff427
|
||||
@@ -1063,6 +1075,7 @@ test/extractor-tests/generated/decl/StructDecl/MISSING_SOURCE.txt 35fb32ea539315
|
||||
test/extractor-tests/generated/decl/SubscriptDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/decl/TopLevelCodeDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/decl/TypeAliasDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/decl/UsingDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql 612ed1b62baed51cb74ea682512de8042c71cc14c99f966f8de33c65c8be7cdf 390197357690dd42d23ee5f0670f1183139cfbdd63f67c7430dd62c51e5d9426
|
||||
test/extractor-tests/generated/expr/Argument/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/expr/ArrayExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
@@ -1188,6 +1201,7 @@ test/extractor-tests/generated/type/FunctionType/MISSING_SOURCE.txt 35fb32ea5393
|
||||
test/extractor-tests/generated/type/GenericFunctionType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/type/GenericTypeParamType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/type/InOutType/InOutType.ql 611aea3776fbcd3763d798b58eba36522db9d4f8ae95dad133562abc6b9d0a9c 184e35f8ef3aa77b52d7d6dbd784fe4749793c50f0484195bd91f49bc2838509
|
||||
test/extractor-tests/generated/type/InlineArrayType/InlineArrayType.ql e51c2fb11a7b19bcdd008944d16fd32b62a4460e53b792370aba45a8150a2b97 7c9541613e0a5ca33a1d73d03900de2a1dd5466a910e2a153e206a3ae650f8b8
|
||||
test/extractor-tests/generated/type/IntegerType/IntegerType.ql 6f18b3b5b4c53ca5d5302a78b04fea929bce478fa5c342f01951379a405b4c8a 486c1ceef03d02b064381ba514ad19eeca250c83ce54354a08c3a7c94bd4fd11
|
||||
test/extractor-tests/generated/type/LValueType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/type/MetatypeType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
|
||||
14
swift/ql/.gitattributes
generated
vendored
14
swift/ql/.gitattributes
generated
vendored
@@ -58,6 +58,7 @@
|
||||
/lib/codeql/swift/elements/decl/TopLevelCodeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/TypeAliasDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/TypeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/UsingDecl.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/decl/internal/AbstractStorageDeclImpl.qll linguist-generated
|
||||
@@ -110,6 +111,8 @@
|
||||
/lib/codeql/swift/elements/decl/internal/SubscriptDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/internal/TopLevelCodeDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/internal/TypeAliasDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/internal/UsingDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/internal/UsingDeclImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AbiSafeConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ActorIsolationErasureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AnyHashableErasureExpr.qll linguist-generated
|
||||
@@ -242,6 +245,7 @@
|
||||
/lib/codeql/swift/elements/expr/UnresolvedSpecializeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedTypeConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnsafeCastExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnsafeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/VarargExpansionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/AbiSafeConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/AbiSafeConversionExprImpl.qll linguist-generated
|
||||
@@ -431,6 +435,8 @@
|
||||
/lib/codeql/swift/elements/expr/internal/UnresolvedTypeConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnsafeCastExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnsafeCastExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnsafeExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnsafeExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/VarargExpansionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/internal/AvailabilityInfoConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/internal/AvailabilitySpecConstructor.qll linguist-generated
|
||||
@@ -560,6 +566,7 @@
|
||||
/lib/codeql/swift/elements/type/GenericFunctionType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/GenericTypeParamType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/InOutType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/InlineArrayType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/IntegerType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/LValueType.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/LocalArchetypeType.qll linguist-generated
|
||||
@@ -662,6 +669,8 @@
|
||||
/lib/codeql/swift/elements/type/internal/GenericTypeParamTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/internal/InOutTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/internal/InOutTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/internal/InlineArrayTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/internal/InlineArrayTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/internal/IntegerTypeConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/internal/IntegerTypeImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/type/internal/LValueTypeConstructor.qll linguist-generated
|
||||
@@ -779,6 +788,7 @@
|
||||
/lib/codeql/swift/generated/decl/TopLevelCodeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/generated/decl/TypeAliasDecl.qll linguist-generated
|
||||
/lib/codeql/swift/generated/decl/TypeDecl.qll linguist-generated
|
||||
/lib/codeql/swift/generated/decl/UsingDecl.qll linguist-generated
|
||||
/lib/codeql/swift/generated/decl/ValueDecl.qll linguist-generated
|
||||
/lib/codeql/swift/generated/decl/VarDecl.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/AbiSafeConversionExpr.qll linguist-generated
|
||||
@@ -916,6 +926,7 @@
|
||||
/lib/codeql/swift/generated/expr/UnresolvedSpecializeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnresolvedTypeConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnsafeCastExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnsafeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/VarargExpansionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/pattern/AnyPattern.qll linguist-generated
|
||||
/lib/codeql/swift/generated/pattern/BindingPattern.qll linguist-generated
|
||||
@@ -994,6 +1005,7 @@
|
||||
/lib/codeql/swift/generated/type/GenericFunctionType.qll linguist-generated
|
||||
/lib/codeql/swift/generated/type/GenericTypeParamType.qll linguist-generated
|
||||
/lib/codeql/swift/generated/type/InOutType.qll linguist-generated
|
||||
/lib/codeql/swift/generated/type/InlineArrayType.qll linguist-generated
|
||||
/lib/codeql/swift/generated/type/IntegerType.qll linguist-generated
|
||||
/lib/codeql/swift/generated/type/LValueType.qll linguist-generated
|
||||
/lib/codeql/swift/generated/type/LocalArchetypeType.qll linguist-generated
|
||||
@@ -1065,6 +1077,7 @@
|
||||
/test/extractor-tests/generated/decl/SubscriptDecl/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/decl/TopLevelCodeDecl/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/decl/TypeAliasDecl/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/decl/UsingDecl/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/expr/Argument/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/expr/ArrayExpr/MISSING_SOURCE.txt linguist-generated
|
||||
@@ -1190,6 +1203,7 @@
|
||||
/test/extractor-tests/generated/type/GenericFunctionType/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/type/GenericTypeParamType/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/type/InOutType/InOutType.ql linguist-generated
|
||||
/test/extractor-tests/generated/type/InlineArrayType/InlineArrayType.ql linguist-generated
|
||||
/test/extractor-tests/generated/type/IntegerType/IntegerType.ql linguist-generated
|
||||
/test/extractor-tests/generated/type/LValueType/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/type/MetatypeType/MISSING_SOURCE.txt linguist-generated
|
||||
|
||||
6
swift/ql/lib/change-notes/2025-10-31-swift-6.2-ast.md
Normal file
6
swift/ql/lib/change-notes/2025-10-31-swift-6.2-ast.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: feature
|
||||
---
|
||||
* Added AST nodes `UsingDecl`, `UnsafeExpr`, and `InlineArrayType` that correspond to new nodes in Swift 6.2.
|
||||
* Added new predicates `isDistributedGet`, `isRead2`, `isModify2`, and `isInit` to the `Accessor` class that correspond to new accessors in Swift 6.2.
|
||||
* Added a new predicate `isApply` to the `KeyPathComponent` class that corresponds to method and initializer key path components in Swift 6.2.
|
||||
3
swift/ql/lib/codeql/swift/elements.qll
generated
3
swift/ql/lib/codeql/swift/elements.qll
generated
@@ -61,6 +61,7 @@ import codeql.swift.elements.decl.SubscriptDecl
|
||||
import codeql.swift.elements.decl.TopLevelCodeDecl
|
||||
import codeql.swift.elements.decl.TypeAliasDecl
|
||||
import codeql.swift.elements.decl.TypeDecl
|
||||
import codeql.swift.elements.decl.UsingDecl
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
import codeql.swift.elements.decl.VarDecl
|
||||
import codeql.swift.elements.expr.AbiSafeConversionExpr
|
||||
@@ -195,6 +196,7 @@ import codeql.swift.elements.expr.UnresolvedPatternExpr
|
||||
import codeql.swift.elements.expr.UnresolvedSpecializeExpr
|
||||
import codeql.swift.elements.expr.UnresolvedTypeConversionExpr
|
||||
import codeql.swift.elements.expr.UnsafeCastExpr
|
||||
import codeql.swift.elements.expr.UnsafeExpr
|
||||
import codeql.swift.elements.expr.VarargExpansionExpr
|
||||
import codeql.swift.elements.pattern.AnyPattern
|
||||
import codeql.swift.elements.pattern.BindingPattern
|
||||
@@ -273,6 +275,7 @@ import codeql.swift.elements.type.FunctionType
|
||||
import codeql.swift.elements.type.GenericFunctionType
|
||||
import codeql.swift.elements.type.GenericTypeParamType
|
||||
import codeql.swift.elements.type.InOutType
|
||||
import codeql.swift.elements.type.InlineArrayType
|
||||
import codeql.swift.elements.type.IntegerType
|
||||
import codeql.swift.elements.type.LValueType
|
||||
import codeql.swift.elements.type.LocalArchetypeType
|
||||
|
||||
9
swift/ql/lib/codeql/swift/elements/decl/UsingDecl.qll
generated
Normal file
9
swift/ql/lib/codeql/swift/elements/decl/UsingDecl.qll
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `UsingDecl`.
|
||||
*/
|
||||
|
||||
private import internal.UsingDeclImpl
|
||||
import codeql.swift.elements.decl.Decl
|
||||
|
||||
final class UsingDecl = Impl::UsingDecl;
|
||||
@@ -18,6 +18,14 @@ module Impl {
|
||||
decl.isUnsafeAddress() and kind = "unsafeAddress"
|
||||
or
|
||||
decl.isUnsafeMutableAddress() and kind = "unsafeMutableAddress"
|
||||
or
|
||||
decl.isDistributedGet() and kind = "distributed get"
|
||||
or
|
||||
decl.isRead2() and kind = "read"
|
||||
or
|
||||
decl.isModify2() and kind = "modify"
|
||||
or
|
||||
decl.isInit() and kind = "init"
|
||||
}
|
||||
|
||||
class Accessor extends Generated::Accessor {
|
||||
|
||||
14
swift/ql/lib/codeql/swift/elements/decl/internal/UsingDeclConstructor.qll
generated
Normal file
14
swift/ql/lib/codeql/swift/elements/decl/internal/UsingDeclConstructor.qll
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `UsingDecl` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `UsingDecl` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructUsingDecl(Raw::UsingDecl id) { any() }
|
||||
16
swift/ql/lib/codeql/swift/elements/decl/internal/UsingDeclImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/decl/internal/UsingDeclImpl.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 `UsingDecl`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.decl.UsingDecl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `UsingDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class UsingDecl extends Generated::UsingDecl { }
|
||||
}
|
||||
9
swift/ql/lib/codeql/swift/elements/expr/UnsafeExpr.qll
generated
Normal file
9
swift/ql/lib/codeql/swift/elements/expr/UnsafeExpr.qll
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `UnsafeExpr`.
|
||||
*/
|
||||
|
||||
private import internal.UnsafeExprImpl
|
||||
import codeql.swift.elements.expr.IdentityExpr
|
||||
|
||||
final class UnsafeExpr = Impl::UnsafeExpr;
|
||||
14
swift/ql/lib/codeql/swift/elements/expr/internal/UnsafeExprConstructor.qll
generated
Normal file
14
swift/ql/lib/codeql/swift/elements/expr/internal/UnsafeExprConstructor.qll
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `UnsafeExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `UnsafeExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructUnsafeExpr(Raw::UnsafeExpr id) { any() }
|
||||
16
swift/ql/lib/codeql/swift/elements/expr/internal/UnsafeExprImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/expr/internal/UnsafeExprImpl.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 `UnsafeExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.expr.UnsafeExpr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `UnsafeExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class UnsafeExpr extends Generated::UnsafeExpr { }
|
||||
}
|
||||
@@ -7,6 +7,11 @@ module Impl {
|
||||
* A component of a `KeyPathExpr`.
|
||||
*/
|
||||
class KeyPathComponent extends Generated::KeyPathComponent {
|
||||
/**
|
||||
* Method or initializer application like `.bar` in `\Foo.bar` with `bar` a method.
|
||||
*/
|
||||
predicate isApply() { this.getKind() = 4 }
|
||||
|
||||
/**
|
||||
* Property access like `.bar` in `\Foo.bar`.
|
||||
*/
|
||||
|
||||
10
swift/ql/lib/codeql/swift/elements/type/InlineArrayType.qll
generated
Normal file
10
swift/ql/lib/codeql/swift/elements/type/InlineArrayType.qll
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `InlineArrayType`.
|
||||
*/
|
||||
|
||||
private import internal.InlineArrayTypeImpl
|
||||
import codeql.swift.elements.type.SyntaxSugarType
|
||||
import codeql.swift.elements.type.Type
|
||||
|
||||
final class InlineArrayType = Impl::InlineArrayType;
|
||||
14
swift/ql/lib/codeql/swift/elements/type/internal/InlineArrayTypeConstructor.qll
generated
Normal file
14
swift/ql/lib/codeql/swift/elements/type/internal/InlineArrayTypeConstructor.qll
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `InlineArrayType` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `InlineArrayType` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructInlineArrayType(Raw::InlineArrayType id) { any() }
|
||||
16
swift/ql/lib/codeql/swift/elements/type/internal/InlineArrayTypeImpl.qll
generated
Normal file
16
swift/ql/lib/codeql/swift/elements/type/internal/InlineArrayTypeImpl.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 `InlineArrayType`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.type.InlineArrayType
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `InlineArrayType` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class InlineArrayType extends Generated::InlineArrayType { }
|
||||
}
|
||||
@@ -29,15 +29,13 @@ module Generated {
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*
|
||||
* TODO: Swift 6.2 update with UnresolvedApply and Apply
|
||||
* This is 4 for method or initializer application, 5 for members, 6 for array and dictionary
|
||||
* subscripts, 7 for optional forcing (`!`), 8 for optional chaining (`?`), 9 for implicit
|
||||
* optional wrapping, 10 for `self`, and 11 for tuple element indexing.
|
||||
*
|
||||
* This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
|
||||
* (`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
|
||||
* and 11 for tuple element indexing.
|
||||
*
|
||||
* The following values should not appear: 0 for invalid components, 2 for unresolved
|
||||
* properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
|
||||
* implicit IDE code completion data.
|
||||
* The following values should not appear: 0 for invalid components, 1 for unresolved
|
||||
* method or initializer applications, 2 for unresolved members, 3 for unresolved subscripts,
|
||||
* 12 for #keyPath dictionary keys, and 13 for implicit IDE code completion data.
|
||||
*/
|
||||
int getKind() {
|
||||
result = Synth::convertKeyPathComponentToRaw(this).(Raw::KeyPathComponent).getKind()
|
||||
|
||||
37
swift/ql/lib/codeql/swift/generated/ParentChild.qll
generated
37
swift/ql/lib/codeql/swift/generated/ParentChild.qll
generated
@@ -261,6 +261,19 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfUsingDecl(UsingDecl e, int index, string partialPredicateCall) {
|
||||
exists(int n, int nMember |
|
||||
n = 0 and
|
||||
nMember = n + 1 + max(int i | i = -1 or exists(e.getMember(i)) | i) and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = e.getMember(index - n) and
|
||||
partialPredicateCall = "Member(" + (index - n).toString() + ")"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfEnumElementDecl(
|
||||
EnumElementDecl e, int index, string partialPredicateCall
|
||||
) {
|
||||
@@ -2235,6 +2248,18 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfUnsafeExpr(UnsafeExpr e, int index, string partialPredicateCall) {
|
||||
exists(int n, int nSubExpr |
|
||||
n = 0 and
|
||||
nSubExpr = n + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
index = n and result = e.getImmediateSubExpr() and partialPredicateCall = "SubExpr()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfBooleanLiteralExpr(
|
||||
BooleanLiteralExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
@@ -3078,6 +3103,12 @@ private module Impl {
|
||||
none()
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfInlineArrayType(
|
||||
InlineArrayType e, int index, string partialPredicateCall
|
||||
) {
|
||||
none()
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfOpaqueTypeArchetypeType(
|
||||
OpaqueTypeArchetypeType e, int index, string partialPredicateCall
|
||||
) {
|
||||
@@ -3210,6 +3241,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfTopLevelCodeDecl(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfUsingDecl(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfEnumElementDecl(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfInfixOperatorDecl(e, index, partialAccessor)
|
||||
@@ -3470,6 +3503,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfUnsafeCastExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfUnsafeExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfBooleanLiteralExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfConditionalCheckedCastExpr(e, index, partialAccessor)
|
||||
@@ -3646,6 +3681,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfDictionaryType(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfInlineArrayType(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfOpaqueTypeArchetypeType(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfPackArchetypeType(e, index, partialAccessor)
|
||||
|
||||
75
swift/ql/lib/codeql/swift/generated/Raw.qll
generated
75
swift/ql/lib/codeql/swift/generated/Raw.qll
generated
@@ -226,15 +226,13 @@ module Raw {
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*
|
||||
* TODO: Swift 6.2 update with UnresolvedApply and Apply
|
||||
* This is 4 for method or initializer application, 5 for members, 6 for array and dictionary
|
||||
* subscripts, 7 for optional forcing (`!`), 8 for optional chaining (`?`), 9 for implicit
|
||||
* optional wrapping, 10 for `self`, and 11 for tuple element indexing.
|
||||
*
|
||||
* This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
|
||||
* (`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
|
||||
* and 11 for tuple element indexing.
|
||||
*
|
||||
* The following values should not appear: 0 for invalid components, 2 for unresolved
|
||||
* properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
|
||||
* implicit IDE code completion data.
|
||||
* The following values should not appear: 0 for invalid components, 1 for unresolved
|
||||
* method or initializer applications, 2 for unresolved members, 3 for unresolved subscripts,
|
||||
* 12 for #keyPath dictionary keys, and 13 for implicit IDE code completion data.
|
||||
*/
|
||||
int getKind() { key_path_components(this, result, _) }
|
||||
|
||||
@@ -522,6 +520,23 @@ module Raw {
|
||||
BraceStmt getBody() { top_level_code_decls(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class UsingDecl extends @using_decl, Decl {
|
||||
override string toString() { result = "UsingDecl" }
|
||||
|
||||
/**
|
||||
* Holds if this using declaration is main actor.
|
||||
*/
|
||||
predicate isMainActor() { using_decl_is_main_actor(this) }
|
||||
|
||||
/**
|
||||
* Holds if this using declaration is nonisolated.
|
||||
*/
|
||||
predicate isNonisolated() { using_decl_is_nonisolated(this) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -876,6 +891,26 @@ module Raw {
|
||||
* Holds if this accessor is an `unsafeMutableAddress` mutable addressor.
|
||||
*/
|
||||
predicate isUnsafeMutableAddress() { accessor_is_unsafe_mutable_address(this) }
|
||||
|
||||
/**
|
||||
* Holds if this accessor is a distributed getter.
|
||||
*/
|
||||
predicate isDistributedGet() { accessor_is_distributed_get(this) }
|
||||
|
||||
/**
|
||||
* Holds if this accessor is a `read` coroutine, yielding a borrowed value of the property.
|
||||
*/
|
||||
predicate isRead2() { accessor_is_read2(this) }
|
||||
|
||||
/**
|
||||
* Holds if this accessor is a `modify` coroutine, yielding an inout value of the property.
|
||||
*/
|
||||
predicate isModify2() { accessor_is_modify2(this) }
|
||||
|
||||
/**
|
||||
* Holds if this accessor is an `init` accessor.
|
||||
*/
|
||||
predicate isInit() { accessor_is_init(this) }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2499,6 +2534,13 @@ module Raw {
|
||||
override string toString() { result = "UnsafeCastExpr" }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class UnsafeExpr extends @unsafe_expr, IdentityExpr {
|
||||
override string toString() { result = "UnsafeExpr" }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -3747,6 +3789,23 @@ module Raw {
|
||||
Type getValueType() { dictionary_types(this, _, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class InlineArrayType extends @inline_array_type, SyntaxSugarType {
|
||||
override string toString() { result = "InlineArrayType" }
|
||||
|
||||
/**
|
||||
* Gets the count type of this inline array type.
|
||||
*/
|
||||
Type getCountType() { inline_array_types(this, result, _) }
|
||||
|
||||
/**
|
||||
* Gets the element type of this inline array type.
|
||||
*/
|
||||
Type getElementType() { inline_array_types(this, _, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
67
swift/ql/lib/codeql/swift/generated/Synth.qll
generated
67
swift/ql/lib/codeql/swift/generated/Synth.qll
generated
@@ -182,6 +182,10 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TTypeAliasDecl(Raw::TypeAliasDecl id) { constructTypeAliasDecl(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TUsingDecl(Raw::UsingDecl id) { constructUsingDecl(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -718,6 +722,10 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TUnsafeCastExpr(Raw::UnsafeCastExpr id) { constructUnsafeCastExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TUnsafeExpr(Raw::UnsafeExpr id) { constructUnsafeExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -1002,6 +1010,10 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TInOutType(Raw::InOutType id) { constructInOutType(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TInlineArrayType(Raw::InlineArrayType id) { constructInlineArrayType(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -1167,7 +1179,7 @@ module Synth {
|
||||
class TDecl =
|
||||
TCapturedDecl or TEnumCaseDecl or TExtensionDecl or TIfConfigDecl or TImportDecl or
|
||||
TMissingMemberDecl or TOperatorDecl or TPatternBindingDecl or TPoundDiagnosticDecl or
|
||||
TPrecedenceGroupDecl or TTopLevelCodeDecl or TValueDecl;
|
||||
TPrecedenceGroupDecl or TTopLevelCodeDecl or TUsingDecl or TValueDecl;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -1277,7 +1289,8 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class TIdentityExpr =
|
||||
TAwaitExpr or TBorrowExpr or TDotSelfExpr or TParenExpr or TUnresolvedMemberChainResultExpr;
|
||||
TAwaitExpr or TBorrowExpr or TDotSelfExpr or TParenExpr or TUnresolvedMemberChainResultExpr or
|
||||
TUnsafeExpr;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -1421,7 +1434,7 @@ module Synth {
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class TSyntaxSugarType = TDictionaryType or TUnarySyntaxSugarType;
|
||||
class TSyntaxSugarType = TDictionaryType or TInlineArrayType or TUnarySyntaxSugarType;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -1710,6 +1723,12 @@ module Synth {
|
||||
*/
|
||||
TTypeAliasDecl convertTypeAliasDeclFromRaw(Raw::Element e) { result = TTypeAliasDecl(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TUsingDecl`, if possible.
|
||||
*/
|
||||
TUsingDecl convertUsingDeclFromRaw(Raw::Element e) { result = TUsingDecl(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TAbiSafeConversionExpr`, if possible.
|
||||
@@ -2570,6 +2589,12 @@ module Synth {
|
||||
*/
|
||||
TUnsafeCastExpr convertUnsafeCastExprFromRaw(Raw::Element e) { result = TUnsafeCastExpr(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TUnsafeExpr`, if possible.
|
||||
*/
|
||||
TUnsafeExpr convertUnsafeExprFromRaw(Raw::Element e) { result = TUnsafeExpr(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TVarargExpansionExpr`, if possible.
|
||||
@@ -3018,6 +3043,12 @@ module Synth {
|
||||
*/
|
||||
TInOutType convertInOutTypeFromRaw(Raw::Element e) { result = TInOutType(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TInlineArrayType`, if possible.
|
||||
*/
|
||||
TInlineArrayType convertInlineArrayTypeFromRaw(Raw::Element e) { result = TInlineArrayType(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TIntegerType`, if possible.
|
||||
@@ -3369,6 +3400,8 @@ module Synth {
|
||||
or
|
||||
result = convertTopLevelCodeDeclFromRaw(e)
|
||||
or
|
||||
result = convertUsingDeclFromRaw(e)
|
||||
or
|
||||
result = convertValueDeclFromRaw(e)
|
||||
}
|
||||
|
||||
@@ -3706,6 +3739,8 @@ module Synth {
|
||||
result = convertParenExprFromRaw(e)
|
||||
or
|
||||
result = convertUnresolvedMemberChainResultExprFromRaw(e)
|
||||
or
|
||||
result = convertUnsafeExprFromRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4097,6 +4132,8 @@ module Synth {
|
||||
TSyntaxSugarType convertSyntaxSugarTypeFromRaw(Raw::Element e) {
|
||||
result = convertDictionaryTypeFromRaw(e)
|
||||
or
|
||||
result = convertInlineArrayTypeFromRaw(e)
|
||||
or
|
||||
result = convertUnarySyntaxSugarTypeFromRaw(e)
|
||||
}
|
||||
|
||||
@@ -4434,6 +4471,12 @@ module Synth {
|
||||
*/
|
||||
Raw::Element convertTypeAliasDeclToRaw(TTypeAliasDecl e) { e = TTypeAliasDecl(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TUsingDecl` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertUsingDeclToRaw(TUsingDecl e) { e = TUsingDecl(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TAbiSafeConversionExpr` to a raw DB element, if possible.
|
||||
@@ -5292,6 +5335,12 @@ module Synth {
|
||||
*/
|
||||
Raw::Element convertUnsafeCastExprToRaw(TUnsafeCastExpr e) { e = TUnsafeCastExpr(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TUnsafeExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertUnsafeExprToRaw(TUnsafeExpr e) { e = TUnsafeExpr(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TVarargExpansionExpr` to a raw DB element, if possible.
|
||||
@@ -5740,6 +5789,12 @@ module Synth {
|
||||
*/
|
||||
Raw::Element convertInOutTypeToRaw(TInOutType e) { e = TInOutType(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TInlineArrayType` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertInlineArrayTypeToRaw(TInlineArrayType e) { e = TInlineArrayType(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TIntegerType` to a raw DB element, if possible.
|
||||
@@ -6091,6 +6146,8 @@ module Synth {
|
||||
or
|
||||
result = convertTopLevelCodeDeclToRaw(e)
|
||||
or
|
||||
result = convertUsingDeclToRaw(e)
|
||||
or
|
||||
result = convertValueDeclToRaw(e)
|
||||
}
|
||||
|
||||
@@ -6428,6 +6485,8 @@ module Synth {
|
||||
result = convertParenExprToRaw(e)
|
||||
or
|
||||
result = convertUnresolvedMemberChainResultExprToRaw(e)
|
||||
or
|
||||
result = convertUnsafeExprToRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6819,6 +6878,8 @@ module Synth {
|
||||
Raw::Element convertSyntaxSugarTypeToRaw(TSyntaxSugarType e) {
|
||||
result = convertDictionaryTypeToRaw(e)
|
||||
or
|
||||
result = convertInlineArrayTypeToRaw(e)
|
||||
or
|
||||
result = convertUnarySyntaxSugarTypeToRaw(e)
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ import codeql.swift.elements.decl.internal.StructDeclConstructor
|
||||
import codeql.swift.elements.decl.internal.SubscriptDeclConstructor
|
||||
import codeql.swift.elements.decl.internal.TopLevelCodeDeclConstructor
|
||||
import codeql.swift.elements.decl.internal.TypeAliasDeclConstructor
|
||||
import codeql.swift.elements.decl.internal.UsingDeclConstructor
|
||||
import codeql.swift.elements.expr.internal.AbiSafeConversionExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ActorIsolationErasureExprConstructor
|
||||
import codeql.swift.elements.expr.internal.AnyHashableErasureExprConstructor
|
||||
@@ -163,6 +164,7 @@ import codeql.swift.elements.expr.internal.UnresolvedPatternExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnresolvedSpecializeExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnresolvedTypeConversionExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnsafeCastExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnsafeExprConstructor
|
||||
import codeql.swift.elements.expr.internal.VarargExpansionExprConstructor
|
||||
import codeql.swift.elements.pattern.internal.AnyPatternConstructor
|
||||
import codeql.swift.elements.pattern.internal.BindingPatternConstructor
|
||||
@@ -230,6 +232,7 @@ import codeql.swift.elements.type.internal.FunctionTypeConstructor
|
||||
import codeql.swift.elements.type.internal.GenericFunctionTypeConstructor
|
||||
import codeql.swift.elements.type.internal.GenericTypeParamTypeConstructor
|
||||
import codeql.swift.elements.type.internal.InOutTypeConstructor
|
||||
import codeql.swift.elements.type.internal.InlineArrayTypeConstructor
|
||||
import codeql.swift.elements.type.internal.IntegerTypeConstructor
|
||||
import codeql.swift.elements.type.internal.LValueTypeConstructor
|
||||
import codeql.swift.elements.type.internal.MetatypeTypeConstructor
|
||||
|
||||
@@ -63,5 +63,27 @@ module Generated {
|
||||
predicate isUnsafeMutableAddress() {
|
||||
Synth::convertAccessorToRaw(this).(Raw::Accessor).isUnsafeMutableAddress()
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this accessor is a distributed getter.
|
||||
*/
|
||||
predicate isDistributedGet() {
|
||||
Synth::convertAccessorToRaw(this).(Raw::Accessor).isDistributedGet()
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this accessor is a `read` coroutine, yielding a borrowed value of the property.
|
||||
*/
|
||||
predicate isRead2() { Synth::convertAccessorToRaw(this).(Raw::Accessor).isRead2() }
|
||||
|
||||
/**
|
||||
* Holds if this accessor is a `modify` coroutine, yielding an inout value of the property.
|
||||
*/
|
||||
predicate isModify2() { Synth::convertAccessorToRaw(this).(Raw::Accessor).isModify2() }
|
||||
|
||||
/**
|
||||
* Holds if this accessor is an `init` accessor.
|
||||
*/
|
||||
predicate isInit() { Synth::convertAccessorToRaw(this).(Raw::Accessor).isInit() }
|
||||
}
|
||||
}
|
||||
|
||||
35
swift/ql/lib/codeql/swift/generated/decl/UsingDecl.qll
generated
Normal file
35
swift/ql/lib/codeql/swift/generated/decl/UsingDecl.qll
generated
Normal file
@@ -0,0 +1,35 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `UsingDecl`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Synth
|
||||
private import codeql.swift.generated.Raw
|
||||
import codeql.swift.elements.decl.internal.DeclImpl::Impl as DeclImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `UsingDecl` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* INTERNAL: Do not reference the `Generated::UsingDecl` class directly.
|
||||
* Use the subclass `UsingDecl`, where the following predicates are available.
|
||||
*/
|
||||
class UsingDecl extends Synth::TUsingDecl, DeclImpl::Decl {
|
||||
override string getAPrimaryQlClass() { result = "UsingDecl" }
|
||||
|
||||
/**
|
||||
* Holds if this using declaration is main actor.
|
||||
*/
|
||||
predicate isMainActor() { Synth::convertUsingDeclToRaw(this).(Raw::UsingDecl).isMainActor() }
|
||||
|
||||
/**
|
||||
* Holds if this using declaration is nonisolated.
|
||||
*/
|
||||
predicate isNonisolated() {
|
||||
Synth::convertUsingDeclToRaw(this).(Raw::UsingDecl).isNonisolated()
|
||||
}
|
||||
}
|
||||
}
|
||||
23
swift/ql/lib/codeql/swift/generated/expr/UnsafeExpr.qll
generated
Normal file
23
swift/ql/lib/codeql/swift/generated/expr/UnsafeExpr.qll
generated
Normal file
@@ -0,0 +1,23 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `UnsafeExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Synth
|
||||
private import codeql.swift.generated.Raw
|
||||
import codeql.swift.elements.expr.internal.IdentityExprImpl::Impl as IdentityExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `UnsafeExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* INTERNAL: Do not reference the `Generated::UnsafeExpr` class directly.
|
||||
* Use the subclass `UnsafeExpr`, where the following predicates are available.
|
||||
*/
|
||||
class UnsafeExpr extends Synth::TUnsafeExpr, IdentityExprImpl::IdentityExpr {
|
||||
override string getAPrimaryQlClass() { result = "UnsafeExpr" }
|
||||
}
|
||||
}
|
||||
70
swift/ql/lib/codeql/swift/generated/type/InlineArrayType.qll
generated
Normal file
70
swift/ql/lib/codeql/swift/generated/type/InlineArrayType.qll
generated
Normal file
@@ -0,0 +1,70 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `InlineArrayType`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Synth
|
||||
private import codeql.swift.generated.Raw
|
||||
import codeql.swift.elements.type.internal.SyntaxSugarTypeImpl::Impl as SyntaxSugarTypeImpl
|
||||
import codeql.swift.elements.type.Type
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `InlineArrayType` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* INTERNAL: Do not reference the `Generated::InlineArrayType` class directly.
|
||||
* Use the subclass `InlineArrayType`, where the following predicates are available.
|
||||
*/
|
||||
class InlineArrayType extends Synth::TInlineArrayType, SyntaxSugarTypeImpl::SyntaxSugarType {
|
||||
override string getAPrimaryQlClass() { result = "InlineArrayType" }
|
||||
|
||||
/**
|
||||
* Gets the count type of this inline array type.
|
||||
*
|
||||
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
|
||||
* behavior of both the `Immediate` and non-`Immediate` versions.
|
||||
*/
|
||||
Type getImmediateCountType() {
|
||||
result =
|
||||
Synth::convertTypeFromRaw(Synth::convertInlineArrayTypeToRaw(this)
|
||||
.(Raw::InlineArrayType)
|
||||
.getCountType())
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the count type of this inline array type.
|
||||
*/
|
||||
final Type getCountType() {
|
||||
exists(Type immediate |
|
||||
immediate = this.getImmediateCountType() and
|
||||
if exists(this.getResolveStep()) then result = immediate else result = immediate.resolve()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the element type of this inline array type.
|
||||
*
|
||||
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
|
||||
* behavior of both the `Immediate` and non-`Immediate` versions.
|
||||
*/
|
||||
Type getImmediateElementType() {
|
||||
result =
|
||||
Synth::convertTypeFromRaw(Synth::convertInlineArrayTypeToRaw(this)
|
||||
.(Raw::InlineArrayType)
|
||||
.getElementType())
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the element type of this inline array type.
|
||||
*/
|
||||
final Type getElementType() {
|
||||
exists(Type immediate |
|
||||
immediate = this.getImmediateElementType() and
|
||||
if exists(this.getResolveStep()) then result = immediate else result = immediate.resolve()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
47
swift/ql/lib/swift.dbscheme
generated
47
swift/ql/lib/swift.dbscheme
generated
@@ -273,6 +273,7 @@ unspecified_element_children(
|
||||
| @pound_diagnostic_decl
|
||||
| @precedence_group_decl
|
||||
| @top_level_code_decl
|
||||
| @using_decl
|
||||
| @value_decl
|
||||
;
|
||||
|
||||
@@ -425,6 +426,20 @@ top_level_code_decls( //dir=decl
|
||||
int body: @brace_stmt_or_none ref
|
||||
);
|
||||
|
||||
using_decls( //dir=decl
|
||||
unique int id: @using_decl
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
using_decl_is_main_actor( //dir=decl
|
||||
int id: @using_decl ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
using_decl_is_nonisolated( //dir=decl
|
||||
int id: @using_decl ref
|
||||
);
|
||||
|
||||
@value_decl =
|
||||
@abstract_storage_decl
|
||||
| @enum_element_decl
|
||||
@@ -683,6 +698,26 @@ accessor_is_unsafe_mutable_address( //dir=decl
|
||||
int id: @accessor ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
accessor_is_distributed_get( //dir=decl
|
||||
int id: @accessor ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
accessor_is_read2( //dir=decl
|
||||
int id: @accessor ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
accessor_is_modify2( //dir=decl
|
||||
int id: @accessor ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
accessor_is_init( //dir=decl
|
||||
int id: @accessor ref
|
||||
);
|
||||
|
||||
associated_type_decls( //dir=decl
|
||||
unique int id: @associated_type_decl
|
||||
);
|
||||
@@ -1024,6 +1059,7 @@ force_value_exprs( //dir=expr
|
||||
| @dot_self_expr
|
||||
| @paren_expr
|
||||
| @unresolved_member_chain_result_expr
|
||||
| @unsafe_expr
|
||||
;
|
||||
|
||||
#keyset[id]
|
||||
@@ -1673,6 +1709,10 @@ unsafe_cast_exprs( //dir=expr
|
||||
unique int id: @unsafe_cast_expr
|
||||
);
|
||||
|
||||
unsafe_exprs( //dir=expr
|
||||
unique int id: @unsafe_expr
|
||||
);
|
||||
|
||||
boolean_literal_exprs( //dir=expr
|
||||
unique int id: @boolean_literal_expr,
|
||||
boolean value: boolean ref
|
||||
@@ -2480,6 +2520,7 @@ paren_types( //dir=type
|
||||
|
||||
@syntax_sugar_type =
|
||||
@dictionary_type
|
||||
| @inline_array_type
|
||||
| @unary_syntax_sugar_type
|
||||
;
|
||||
|
||||
@@ -2537,6 +2578,12 @@ dictionary_types( //dir=type
|
||||
int value_type: @type_or_none ref
|
||||
);
|
||||
|
||||
inline_array_types( //dir=type
|
||||
unique int id: @inline_array_type,
|
||||
int count_type: @type_or_none ref,
|
||||
int element_type: @type_or_none ref
|
||||
);
|
||||
|
||||
@local_archetype_type =
|
||||
@element_archetype_type
|
||||
| @existential_archetype_type
|
||||
|
||||
@@ -9,5 +9,10 @@ class TypeOrNone extends @type_or_none {
|
||||
from KeyPathComponent id, int kind, int new_kind, TypeOrNone component_type
|
||||
where
|
||||
key_path_components(id, kind, component_type) and
|
||||
if kind < 3 then new_kind = kind else new_kind = kind + 2
|
||||
if kind = 0
|
||||
then new_kind = kind
|
||||
else
|
||||
if kind = 1 or kind = 2
|
||||
then new_kind = kind + 1
|
||||
else new_kind = kind + 2
|
||||
select id, new_kind, component_type
|
||||
|
||||
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: Support AST elements new in Swift 6.2
|
||||
compatibility: full
|
||||
@@ -86,7 +86,7 @@ struct HasPropertyAndObserver {
|
||||
}
|
||||
}
|
||||
|
||||
// A field can be marked as read-only by dirctly implementing
|
||||
// A field can be marked as read-only by directly implementing
|
||||
// the getter between the braces.
|
||||
var readOnlyField1: Int {
|
||||
return 0
|
||||
|
||||
@@ -1,43 +1,57 @@
|
||||
instances
|
||||
| accessors.swift:2:9:2:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:2:9:2:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:2:9:2:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:3:9:3:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:4:9:4:28 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:5:9:5:42 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:7:9:7:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:7:9:7:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:7:9:7:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:8:9:8:29 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:11:9:11:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:11:9:11:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:11:9:11:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:12:9:12:19 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:15:9:15:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:15:9:15:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:15:9:15:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:16:9:16:28 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:19:9:19:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:19:9:19:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:19:9:19:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:20:9:20:18 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:23:9:23:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:23:9:23:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:23:9:23:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:24:9:24:19 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:26:9:26:18 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:29:9:29:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:29:9:29:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:30:9:32:9 | _read | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | yes | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:33:9:35:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:38:9:38:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:38:9:38:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:38:9:38:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:39:9:41:9 | unsafeAddress | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> UnsafePointer<Int> | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | yes | isUnsafeMutableAddress: | no |
|
||||
| accessors.swift:42:9:44:9 | unsafeMutableAddress | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> UnsafeMutablePointer<Int> | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | yes |
|
||||
| accessors2.swift:2:9:2:9 | get | getModule: | file://:0:0:0:0 | accessors2 | getInterfaceType: | (Foo2) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors2.swift:2:9:2:9 | modify | getModule: | file://:0:0:0:0 | accessors2 | getInterfaceType: | (inout Foo2) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | yes | isInit: | no |
|
||||
| accessors2.swift:2:9:2:9 | set | getModule: | file://:0:0:0:0 | accessors2 | getInterfaceType: | (inout Foo2) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors2.swift:3:9:3:9 | set | getModule: | file://:0:0:0:0 | accessors2 | getInterfaceType: | (inout Foo2) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors2.swift:4:9:6:9 | read | getModule: | file://:0:0:0:0 | accessors2 | getInterfaceType: | (Foo2) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | yes | isModify2: | no | isInit: | no |
|
||||
| accessors2.swift:7:9:9:9 | modify | getModule: | file://:0:0:0:0 | accessors2 | getInterfaceType: | (inout Foo2) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | yes | isInit: | no |
|
||||
| accessors.swift:2:9:2:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:2:9:2:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:2:9:2:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:3:9:3:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:4:9:4:28 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:5:9:5:42 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:7:9:7:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:7:9:7:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:7:9:7:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:8:9:8:29 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:11:9:11:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:11:9:11:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:11:9:11:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:12:9:12:19 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:15:9:15:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:15:9:15:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:15:9:15:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:16:9:16:28 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:19:9:19:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:19:9:19:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:19:9:19:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:20:9:20:18 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:23:9:23:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:23:9:23:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:23:9:23:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:24:9:24:19 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:26:9:26:18 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:29:9:29:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:29:9:29:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:30:9:32:9 | _read | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | yes | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:33:9:35:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:38:9:38:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:38:9:38:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:38:9:38:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:39:9:41:9 | unsafeAddress | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> UnsafePointer<Int> | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | yes | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:42:9:44:9 | unsafeMutableAddress | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> UnsafeMutablePointer<Int> | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | yes | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
| accessors.swift:48:9:48:16 | init | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | yes |
|
||||
| accessors.swift:50:9:50:18 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | isDistributedGet: | no | isRead2: | no | isModify2: | no | isInit: | no |
|
||||
getGenericTypeParam
|
||||
getMember
|
||||
getName
|
||||
| accessors2.swift:2:9:2:9 | get | (unnamed function decl) |
|
||||
| accessors2.swift:2:9:2:9 | modify | (unnamed function decl) |
|
||||
| accessors2.swift:2:9:2:9 | set | (unnamed function decl) |
|
||||
| accessors2.swift:3:9:3:9 | set | (unnamed function decl) |
|
||||
| accessors2.swift:4:9:6:9 | read | (unnamed function decl) |
|
||||
| accessors2.swift:7:9:9:9 | modify | (unnamed function decl) |
|
||||
| accessors.swift:2:9:2:9 | _modify | (unnamed function decl) |
|
||||
| accessors.swift:2:9:2:9 | get | (unnamed function decl) |
|
||||
| accessors.swift:2:9:2:9 | set | (unnamed function decl) |
|
||||
@@ -74,7 +88,15 @@ getName
|
||||
| accessors.swift:38:9:38:9 | set | (unnamed function decl) |
|
||||
| accessors.swift:39:9:41:9 | unsafeAddress | (unnamed function decl) |
|
||||
| accessors.swift:42:9:44:9 | unsafeMutableAddress | (unnamed function decl) |
|
||||
| accessors.swift:48:9:48:16 | init | (unnamed function decl) |
|
||||
| accessors.swift:50:9:50:18 | get | (unnamed function decl) |
|
||||
getSelfParam
|
||||
| accessors2.swift:2:9:2:9 | get | accessors2.swift:2:9:2:9 | self |
|
||||
| accessors2.swift:2:9:2:9 | modify | accessors2.swift:2:9:2:9 | self |
|
||||
| accessors2.swift:2:9:2:9 | set | accessors2.swift:2:9:2:9 | self |
|
||||
| accessors2.swift:3:9:3:9 | set | accessors2.swift:3:9:3:9 | self |
|
||||
| accessors2.swift:4:9:6:9 | read | accessors2.swift:4:9:4:9 | self |
|
||||
| accessors2.swift:7:9:9:9 | modify | accessors2.swift:7:9:7:9 | self |
|
||||
| accessors.swift:2:9:2:9 | _modify | accessors.swift:2:9:2:9 | self |
|
||||
| accessors.swift:2:9:2:9 | get | accessors.swift:2:9:2:9 | self |
|
||||
| accessors.swift:2:9:2:9 | set | accessors.swift:2:9:2:9 | self |
|
||||
@@ -111,7 +133,11 @@ getSelfParam
|
||||
| accessors.swift:38:9:38:9 | set | accessors.swift:38:9:38:9 | self |
|
||||
| accessors.swift:39:9:41:9 | unsafeAddress | accessors.swift:39:9:39:9 | self |
|
||||
| accessors.swift:42:9:44:9 | unsafeMutableAddress | accessors.swift:42:9:42:9 | self |
|
||||
| accessors.swift:48:9:48:16 | init | accessors.swift:48:9:48:9 | self |
|
||||
| accessors.swift:50:9:50:18 | get | accessors.swift:50:9:50:9 | self |
|
||||
getParam
|
||||
| accessors2.swift:2:9:2:9 | set | 0 | accessors2.swift:2:9:2:9 | value |
|
||||
| accessors2.swift:3:9:3:9 | set | 0 | accessors2.swift:3:9:3:9 | value |
|
||||
| accessors.swift:2:9:2:9 | set | 0 | accessors.swift:2:9:2:9 | value |
|
||||
| accessors.swift:5:9:5:42 | set | 0 | accessors.swift:5:13:5:13 | newValue |
|
||||
| accessors.swift:7:9:7:9 | set | 0 | accessors.swift:7:9:7:9 | value |
|
||||
@@ -125,7 +151,14 @@ getParam
|
||||
| accessors.swift:24:9:24:19 | willSet | 0 | accessors.swift:24:9:24:9 | newValue |
|
||||
| accessors.swift:29:9:29:9 | set | 0 | accessors.swift:29:9:29:9 | value |
|
||||
| accessors.swift:38:9:38:9 | set | 0 | accessors.swift:38:9:38:9 | value |
|
||||
| accessors.swift:48:9:48:16 | init | 0 | accessors.swift:48:9:48:9 | newValue |
|
||||
getBody
|
||||
| accessors2.swift:2:9:2:9 | get | accessors2.swift:2:9:2:9 | { ... } |
|
||||
| accessors2.swift:2:9:2:9 | modify | accessors2.swift:2:9:2:9 | { ... } |
|
||||
| accessors2.swift:2:9:2:9 | set | accessors2.swift:2:9:2:9 | { ... } |
|
||||
| accessors2.swift:3:9:3:9 | set | accessors2.swift:3:9:3:9 | { ... } |
|
||||
| accessors2.swift:4:9:6:9 | read | accessors2.swift:4:14:6:9 | { ... } |
|
||||
| accessors2.swift:7:9:9:9 | modify | accessors2.swift:7:16:9:9 | { ... } |
|
||||
| accessors.swift:2:9:2:9 | _modify | accessors.swift:2:9:2:9 | { ... } |
|
||||
| accessors.swift:2:9:2:9 | get | accessors.swift:2:9:2:9 | { ... } |
|
||||
| accessors.swift:2:9:2:9 | set | accessors.swift:2:9:2:9 | { ... } |
|
||||
@@ -162,4 +195,6 @@ getBody
|
||||
| accessors.swift:38:9:38:9 | set | accessors.swift:38:9:38:9 | { ... } |
|
||||
| accessors.swift:39:9:41:9 | unsafeAddress | accessors.swift:39:23:41:9 | { ... } |
|
||||
| accessors.swift:42:9:44:9 | unsafeMutableAddress | accessors.swift:42:30:44:9 | { ... } |
|
||||
| accessors.swift:48:9:48:16 | init | accessors.swift:48:14:48:16 | { ... } |
|
||||
| accessors.swift:50:9:50:18 | get | accessors.swift:50:13:50:18 | { ... } |
|
||||
getCapture
|
||||
|
||||
@@ -8,7 +8,9 @@ query predicate instances(
|
||||
string isSetter, string isWillSet__label, string isWillSet, string isDidSet__label,
|
||||
string isDidSet, string isRead__label, string isRead, string isModify__label, string isModify,
|
||||
string isUnsafeAddress__label, string isUnsafeAddress, string isUnsafeMutableAddress__label,
|
||||
string isUnsafeMutableAddress
|
||||
string isUnsafeMutableAddress, string isDistributedGet__label, string isDistributedGet,
|
||||
string isRead2__label, string isRead2, string isModify2__label, string isModify2,
|
||||
string isInit__label, string isInit
|
||||
) {
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
@@ -31,9 +33,19 @@ query predicate instances(
|
||||
isUnsafeAddress__label = "isUnsafeAddress:" and
|
||||
(if x.isUnsafeAddress() then isUnsafeAddress = "yes" else isUnsafeAddress = "no") and
|
||||
isUnsafeMutableAddress__label = "isUnsafeMutableAddress:" and
|
||||
if x.isUnsafeMutableAddress()
|
||||
then isUnsafeMutableAddress = "yes"
|
||||
else isUnsafeMutableAddress = "no"
|
||||
(
|
||||
if x.isUnsafeMutableAddress()
|
||||
then isUnsafeMutableAddress = "yes"
|
||||
else isUnsafeMutableAddress = "no"
|
||||
) and
|
||||
isDistributedGet__label = "isDistributedGet:" and
|
||||
(if x.isDistributedGet() then isDistributedGet = "yes" else isDistributedGet = "no") and
|
||||
isRead2__label = "isRead2:" and
|
||||
(if x.isRead2() then isRead2 = "yes" else isRead2 = "no") and
|
||||
isModify2__label = "isModify2:" and
|
||||
(if x.isModify2() then isModify2 = "yes" else isModify2 = "no") and
|
||||
isInit__label = "isInit:" and
|
||||
if x.isInit() then isInit = "yes" else isInit = "no"
|
||||
}
|
||||
|
||||
query predicate getGenericTypeParam(Accessor x, int index, GenericTypeParamDecl getGenericTypeParam) {
|
||||
|
||||
@@ -43,4 +43,10 @@ struct Foo {
|
||||
return UnsafeMutablePointer<Int>(bitPattern: 0)!
|
||||
}
|
||||
}
|
||||
|
||||
var hasInit: Int {
|
||||
init { }
|
||||
|
||||
get { 42 }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
struct Foo2 {
|
||||
var x = 11
|
||||
var borrowedProp: Int {
|
||||
read {
|
||||
yield x
|
||||
}
|
||||
modify {
|
||||
yield &x
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//codeql-extractor-options: -enable-experimental-feature CoroutineAccessors
|
||||
4
swift/ql/test/extractor-tests/generated/decl/UsingDecl/MISSING_SOURCE.txt
generated
Normal file
4
swift/ql/test/extractor-tests/generated/decl/UsingDecl/MISSING_SOURCE.txt
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
|
||||
After a source file is added in this directory and codegen/codegen.py is run again, test queries
|
||||
will appear and this file will be deleted
|
||||
@@ -8,6 +8,8 @@ instances
|
||||
| identity_expressions.swift:15:5:15:21 | await ... | AwaitExpr | getSubExpr: | identity_expressions.swift:15:11:15:21 | call to process() |
|
||||
| identity_expressions.swift:15:11:15:19 | (...) | ParenExpr | getSubExpr: | identity_expressions.swift:15:12:15:12 | process() |
|
||||
| identity_expressions.swift:18:9:18:17 | BorrowExpr | BorrowExpr | getSubExpr: | identity_expressions.swift:18:17:18:17 | x |
|
||||
| identity_expressions.swift:23:33:23:40 | UnsafeExpr | UnsafeExpr | getSubExpr: | identity_expressions.swift:23:40:23:40 | y |
|
||||
| identity_expressions.swift:24:13:24:20 | UnsafeExpr | UnsafeExpr | getSubExpr: | identity_expressions.swift:24:20:24:20 | x |
|
||||
getType
|
||||
| identity_expressions.swift:5:9:5:14 | .self | A |
|
||||
| identity_expressions.swift:5:9:5:21 | .self | @lvalue Int |
|
||||
@@ -18,3 +20,5 @@ getType
|
||||
| identity_expressions.swift:15:5:15:21 | await ... | () |
|
||||
| identity_expressions.swift:15:11:15:19 | (...) | () async -> () |
|
||||
| identity_expressions.swift:18:9:18:17 | BorrowExpr | Int |
|
||||
| identity_expressions.swift:23:33:23:40 | UnsafeExpr | UnsafeType |
|
||||
| identity_expressions.swift:24:13:24:20 | UnsafeExpr | UnsafeType |
|
||||
|
||||
@@ -16,3 +16,10 @@ Task.init {
|
||||
}
|
||||
let x = 42
|
||||
let _ = _borrow x
|
||||
|
||||
struct UnsafeType {}
|
||||
|
||||
func unsafeFunc(_ y: UnsafeType) {
|
||||
@unsafe let x: UnsafeType = unsafe y
|
||||
let _ = unsafe x
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
| [42 of Int] | getName: | [42 of Int] | getCanonicalType: | InlineArray<42, Int> | getCountType: | 42 | getElementType: | Int |
|
||||
20
swift/ql/test/extractor-tests/generated/type/InlineArrayType/InlineArrayType.ql
generated
Normal file
20
swift/ql/test/extractor-tests/generated/type/InlineArrayType/InlineArrayType.ql
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
import codeql.swift.elements
|
||||
import TestUtils
|
||||
|
||||
query predicate instances(
|
||||
InlineArrayType x, string getName__label, string getName, string getCanonicalType__label,
|
||||
Type getCanonicalType, string getCountType__label, Type getCountType,
|
||||
string getElementType__label, Type getElementType
|
||||
) {
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
getName__label = "getName:" and
|
||||
getName = x.getName() and
|
||||
getCanonicalType__label = "getCanonicalType:" and
|
||||
getCanonicalType = x.getCanonicalType() and
|
||||
getCountType__label = "getCountType:" and
|
||||
getCountType = x.getCountType() and
|
||||
getElementType__label = "getElementType:" and
|
||||
getElementType = x.getElementType()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
struct Foo {
|
||||
var x: [42 of Int]
|
||||
}
|
||||
|
||||
//codeql-extractor-options: -disable-availability-checking
|
||||
@@ -4571,7 +4571,7 @@ declarations.swift:
|
||||
# 81| Type = Int
|
||||
# 81| getParam(5): [ParamDecl] hasBoth
|
||||
# 81| Type = Int
|
||||
# 89| [Comment] // A field can be marked as read-only by dirctly implementing
|
||||
# 89| [Comment] // A field can be marked as read-only by directly implementing
|
||||
# 89|
|
||||
# 90| [Comment] // the getter between the braces.
|
||||
# 90|
|
||||
|
||||
@@ -86,7 +86,7 @@ struct HasPropertyAndObserver {
|
||||
}
|
||||
}
|
||||
|
||||
// A field can be marked as read-only by dirctly implementing
|
||||
// A field can be marked as read-only by directly implementing
|
||||
// the getter between the braces.
|
||||
var readOnlyField1: Int {
|
||||
return 0
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
| file://:0:0:0:0 | KeyPathComponent | getKind: | 9 | | | | | optional wrapping | | |
|
||||
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 6 | | subscript | | | | | |
|
||||
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 6 | | subscript | | | | | |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 7 | | | optional forcing | | | | |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 10 | | | | | | self | |
|
||||
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 8 | | | | optional chaining | | | |
|
||||
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 8 | | | | optional chaining | | | |
|
||||
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 5 | property | | | | | | |
|
||||
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 10 | | | | | | self | |
|
||||
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 11 | | | | | | | tuple indexing |
|
||||
| file://:0:0:0:0 | KeyPathComponent | getKind: | 9 | | | | | | optional wrapping | | |
|
||||
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 5 | | property | | | | | | |
|
||||
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 6 | | | subscript | | | | | |
|
||||
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 6 | | | subscript | | | | | |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 7 | | | | optional forcing | | | | |
|
||||
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 10 | | | | | | | self | |
|
||||
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 5 | | property | | | | | | |
|
||||
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 8 | | | | | optional chaining | | | |
|
||||
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 5 | | property | | | | | | |
|
||||
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 5 | | property | | | | | | |
|
||||
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 8 | | | | | optional chaining | | | |
|
||||
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 5 | | property | | | | | | |
|
||||
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 10 | | | | | | | self | |
|
||||
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 11 | | | | | | | | tuple indexing |
|
||||
|
||||
@@ -2,11 +2,12 @@ import codeql.swift.elements
|
||||
import TestUtils
|
||||
|
||||
from
|
||||
KeyPathComponent x, string property, string subscript, string opt_forcing, string opt_chaining,
|
||||
string opt_wrapping, string self, string tuple_indexing
|
||||
KeyPathComponent x, string apply, string property, string subscript, string opt_forcing,
|
||||
string opt_chaining, string opt_wrapping, string self, string tuple_indexing
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
(if x.isApply() then apply = "apply" else apply = "") and
|
||||
(if x.isProperty() then property = "property" else property = "") and
|
||||
(if x.isSubscript() then subscript = "subscript" else subscript = "") and
|
||||
(if x.isOptionalForcing() then opt_forcing = "optional forcing" else opt_forcing = "") and
|
||||
@@ -14,5 +15,5 @@ where
|
||||
(if x.isOptionalWrapping() then opt_wrapping = "optional wrapping" else opt_wrapping = "") and
|
||||
(if x.isSelf() then self = "self" else self = "") and
|
||||
if x.isTupleIndexing() then tuple_indexing = "tuple indexing" else tuple_indexing = ""
|
||||
select x, "getKind:", x.getKind(), property, subscript, opt_forcing, opt_chaining, opt_wrapping,
|
||||
self, tuple_indexing
|
||||
select x, "getKind:", x.getKind(), apply, property, subscript, opt_forcing, opt_chaining,
|
||||
opt_wrapping, self, tuple_indexing
|
||||
|
||||
@@ -117,6 +117,10 @@ class GenericContext(Element):
|
||||
class EnumCaseDecl(Decl):
|
||||
elements: list["EnumElementDecl"]
|
||||
|
||||
class UsingDecl(Decl):
|
||||
is_main_actor: predicate
|
||||
is_nonisolated: predicate
|
||||
|
||||
class ExtensionDecl(GenericContext, Decl):
|
||||
extended_type_decl: "NominalTypeDecl"
|
||||
protocols: list["ProtocolDecl"]
|
||||
@@ -315,6 +319,10 @@ class Accessor(AccessorOrNamedFunction):
|
||||
is_modify: predicate | doc('this accessor is a `_modify` coroutine, yielding an inout value of the property')
|
||||
is_unsafe_address: predicate | doc('this accessor is an `unsafeAddress` immutable addressor')
|
||||
is_unsafe_mutable_address: predicate | doc('this accessor is an `unsafeMutableAddress` mutable addressor')
|
||||
is_distributed_get: predicate | doc('this accessor is a distributed getter')
|
||||
is_read2: predicate | doc('this accessor is a `read` coroutine, yielding a borrowed value of the property')
|
||||
is_modify2: predicate | doc('this accessor is a `modify` coroutine, yielding an inout value of the property')
|
||||
is_init: predicate | doc('this accessor is an `init` accessor')
|
||||
|
||||
class AssociatedTypeDecl(AbstractTypeParamDecl):
|
||||
pass
|
||||
@@ -486,15 +494,13 @@ class KeyPathComponent(AstNode):
|
||||
kind: int | doc("kind of key path component") | desc("""
|
||||
INTERNAL: Do not use.
|
||||
|
||||
TODO: Swift 6.2 update with UnresolvedApply and Apply
|
||||
This is 4 for method or initializer application, 5 for members, 6 for array and dictionary
|
||||
subscripts, 7 for optional forcing (`!`), 8 for optional chaining (`?`), 9 for implicit
|
||||
optional wrapping, 10 for `self`, and 11 for tuple element indexing.
|
||||
|
||||
This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
|
||||
(`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
|
||||
and 11 for tuple element indexing.
|
||||
|
||||
The following values should not appear: 0 for invalid components, 2 for unresolved
|
||||
properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
|
||||
implicit IDE code completion data.
|
||||
The following values should not appear: 0 for invalid components, 1 for unresolved
|
||||
method or initializer applications, 2 for unresolved members, 3 for unresolved subscripts,
|
||||
12 for #keyPath dictionary keys, and 13 for implicit IDE code completion data.
|
||||
""")
|
||||
subscript_arguments : list[Argument] | child | doc(
|
||||
"arguments to an array or dictionary subscript expression")
|
||||
@@ -630,6 +636,9 @@ class AutoClosureExpr(ClosureExpr):
|
||||
class AwaitExpr(IdentityExpr):
|
||||
pass
|
||||
|
||||
class UnsafeExpr(IdentityExpr):
|
||||
pass
|
||||
|
||||
class BinaryExpr(ApplyExpr):
|
||||
pass
|
||||
|
||||
@@ -1183,6 +1192,10 @@ class BuiltinIntegerLiteralType(AnyBuiltinIntegerType):
|
||||
class BuiltinIntegerType(AnyBuiltinIntegerType):
|
||||
width: optional[int]
|
||||
|
||||
class InlineArrayType(SyntaxSugarType):
|
||||
count_type: Type
|
||||
element_type: Type
|
||||
|
||||
class DictionaryType(SyntaxSugarType):
|
||||
key_type: Type
|
||||
value_type: Type
|
||||
|
||||
Reference in New Issue
Block a user