mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge branch 'main' into post-release-prep/codeql-cli-2.21.1
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
class Element extends @element {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
predicate removedClass(Element e, string name, Element child) {
|
||||
current_context_isolation_exprs(e, child) and name = "CurrentContextIsolationExpr"
|
||||
or
|
||||
extract_function_isolation_exprs(e, child) and name = "ExtractFunctionIsolationExpr"
|
||||
or
|
||||
(
|
||||
actor_isolation_erasure_exprs(e) and name = "ActorIsolationErasureExpr"
|
||||
or
|
||||
unreachable_exprs(e) and name = "UnreachableExpr"
|
||||
) and
|
||||
implicit_conversion_exprs(e, child)
|
||||
}
|
||||
|
||||
query predicate new_unspecified_elements(Element e, string property, string error) {
|
||||
unspecified_elements(e, property, error)
|
||||
or
|
||||
exists(string name |
|
||||
removedClass(e, name, _) and
|
||||
property = "" and
|
||||
error = name + " nodes removed during database downgrade. Please update your CodeQL code."
|
||||
)
|
||||
}
|
||||
|
||||
query predicate new_unspecified_element_children(Element e, int index, Element child) {
|
||||
unspecified_element_children(e, index, child)
|
||||
or
|
||||
removedClass(e, _, child) and index = 0
|
||||
}
|
||||
|
||||
query predicate new_implicit_conversion_exprs(Element e, Element child) {
|
||||
implicit_conversion_exprs(e, child) and not removedClass(e, _, _)
|
||||
}
|
||||
|
||||
query predicate new_expr_types(Element e, Element type) {
|
||||
expr_types(e, type) and not removedClass(e, _, _)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
description: Remove `ExtracFunctionIsolationExpr`, `CurrentContextIsolationExpr`, `ActorIsolationErasureExpr` and `UnreachableExpr`.
|
||||
compatibility: backwards
|
||||
|
||||
current_context_isolation_exprs.rel: delete
|
||||
extract_function_isolation_exprs.rel: delete
|
||||
actor_isolation_erasure_exprs.rel: delete
|
||||
unreachable_exprs.rel: delete
|
||||
unspecified_elements.rel: run downgrade.ql new_unspecified_elements
|
||||
unspecified_element_children.rel: run downgrade.ql new_unspecified_element_children
|
||||
implicit_conversion_exprs.rel: run downgrade.ql new_implicit_conversion_exprs
|
||||
expr_types.rel: run downgrade.ql new_expr_types
|
||||
@@ -175,8 +175,8 @@ MAP(swift::Expr, ExprTag)
|
||||
MAP(swift::LinearFunctionExtractOriginalExpr, LinearFunctionExtractOriginalExprTag)
|
||||
MAP(swift::LinearToDifferentiableFunctionExpr, LinearToDifferentiableFunctionExprTag)
|
||||
MAP(swift::ABISafeConversionExpr, AbiSafeConversionExprTag) // different acronym convention
|
||||
MAP(swift::ActorIsolationErasureExpr, void) // TODO swift 6.0
|
||||
MAP(swift::UnreachableExpr, void) // TODO swift 6.0
|
||||
MAP(swift::ActorIsolationErasureExpr, ActorIsolationErasureExprTag)
|
||||
MAP(swift::UnreachableExpr, UnreachableExprTag)
|
||||
MAP(swift::ExplicitCastExpr, ExplicitCastExprTag)
|
||||
MAP(swift::CheckedCastExpr, CheckedCastExprTag)
|
||||
MAP(swift::ForcedCheckedCastExpr, ForcedCheckedCastExprTag)
|
||||
@@ -202,8 +202,8 @@ MAP(swift::Expr, ExprTag)
|
||||
MAP(swift::ConsumeExpr, ConsumeExprTag)
|
||||
MAP(swift::MaterializePackExpr, MaterializePackExprTag)
|
||||
MAP(swift::SingleValueStmtExpr, SingleValueStmtExprTag)
|
||||
MAP(swift::ExtractFunctionIsolationExpr, void) // TODO swift 6.0
|
||||
MAP(swift::CurrentContextIsolationExpr, void) // TODO swift 6.0
|
||||
MAP(swift::ExtractFunctionIsolationExpr, ExtractFunctionIsolationExprTag)
|
||||
MAP(swift::CurrentContextIsolationExpr, CurrentContextIsolationExprTag)
|
||||
MAP(swift::Decl, DeclTag)
|
||||
MAP(swift::ValueDecl, ValueDeclTag)
|
||||
MAP(swift::TypeDecl, TypeDeclTag)
|
||||
@@ -335,7 +335,7 @@ MAP(swift::TypeBase, TypeTag)
|
||||
MAP(swift::PackExpansionType, PackExpansionTypeTag)
|
||||
MAP(swift::PackElementType, PackElementTypeTag)
|
||||
MAP(swift::TypeVariableType, void) // created during type checking and only used for constraint checking
|
||||
MAP(swift::ErrorUnionType, void) // TODO swift 6.0
|
||||
MAP(swift::ErrorUnionType, void) // created during type checking and only used for constraint checking
|
||||
MAP(swift::SugarType, SugarTypeTag)
|
||||
MAP(swift::ParenType, ParenTypeTag)
|
||||
MAP(swift::TypeAliasType, TypeAliasTypeTag)
|
||||
|
||||
@@ -671,4 +671,18 @@ codeql::MaterializePackExpr ExprTranslator::translateMaterializePackExpr(
|
||||
return entry;
|
||||
}
|
||||
|
||||
codeql::ExtractFunctionIsolationExpr ExprTranslator::translateExtractFunctionIsolationExpr(
|
||||
const swift::ExtractFunctionIsolationExpr& expr) {
|
||||
auto entry = createExprEntry(expr);
|
||||
entry.function_expr = dispatcher.fetchLabel(expr.getFunctionExpr());
|
||||
return entry;
|
||||
}
|
||||
|
||||
codeql::CurrentContextIsolationExpr ExprTranslator::translateCurrentContextIsolationExpr(
|
||||
const swift::CurrentContextIsolationExpr& expr) {
|
||||
auto entry = createExprEntry(expr);
|
||||
entry.actor = dispatcher.fetchLabel(expr.getActor());
|
||||
return entry;
|
||||
}
|
||||
|
||||
} // namespace codeql
|
||||
|
||||
@@ -125,6 +125,10 @@ class ExprTranslator : public AstTranslatorBase<ExprTranslator> {
|
||||
codeql::CopyExpr translateCopyExpr(const swift::CopyExpr& expr);
|
||||
codeql::ConsumeExpr translateConsumeExpr(const swift::ConsumeExpr& expr);
|
||||
codeql::MaterializePackExpr translateMaterializePackExpr(const swift::MaterializePackExpr& expr);
|
||||
codeql::ExtractFunctionIsolationExpr translateExtractFunctionIsolationExpr(
|
||||
const swift::ExtractFunctionIsolationExpr& expr);
|
||||
codeql::CurrentContextIsolationExpr translateCurrentContextIsolationExpr(
|
||||
const swift::CurrentContextIsolationExpr& expr);
|
||||
|
||||
private:
|
||||
void fillClosureExpr(const swift::AbstractClosureExpr& expr, codeql::ClosureExpr& entry);
|
||||
|
||||
28
swift/ql/.generated.list
generated
28
swift/ql/.generated.list
generated
@@ -111,6 +111,7 @@ lib/codeql/swift/elements/decl/internal/SubscriptDeclConstructor.qll 67882596f38
|
||||
lib/codeql/swift/elements/decl/internal/TopLevelCodeDeclConstructor.qll 3924b6e5bee007fd62ae4b2352e38ae20292dbdab65fd1724ca9cd698bfc88f4 28ac8627c75cd787e6dca1a8bfed4c36edbfd13cdad19a08905a49d56b815ad7
|
||||
lib/codeql/swift/elements/decl/internal/TypeAliasDeclConstructor.qll 1dc3d7ef11adf5fb9b4be1c824b8a49393137071584ed44224a2f47b3a0b8a4a 2e1e8222b851376b0d7843a93fb6affeac7f8ee52867623b1e2fa99c1ac37dbb
|
||||
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
|
||||
lib/codeql/swift/elements/expr/AnyTryExpr.qll 1edad5f25c3e36412e4d93b3a5f6d1886670c353837c7bd9477351136ea4d743 58f5a8d11b5b5aea41cc5c513e2f594bc418e979f27aa0a44ddc3340aba50f95
|
||||
lib/codeql/swift/elements/expr/AppliedPropertyWrapperExpr.qll 83c08f24e715393c8e9a9434ab53556f38965a750ee1c8b145df03435e8bf41c ad70842a93f26d70b1a9400039c4446b75302a3005e3b44905cefd44c57c46af
|
||||
@@ -143,6 +144,7 @@ lib/codeql/swift/elements/expr/ConsumeExpr.qll cf1551b82e4dd28555778f4092a90f917
|
||||
lib/codeql/swift/elements/expr/CopyExpr.qll ff680438de3b2105d4fd69f48879eaa954436e63809b045f766d50454436f88a 1e0781d35da6d31bdd66110e3ce4d5dce46cf7b9e4b285ed5f544c8d40945639
|
||||
lib/codeql/swift/elements/expr/CovariantFunctionConversionExpr.qll 4acc70bae3a6d31798a505be6604e1bee00770b7d385ea44550d4c0e5db35477 d6f852d2d11a78ea7c188379ad474db8d77494e3a3621dca1b7d963e083374d3
|
||||
lib/codeql/swift/elements/expr/CovariantReturnConversionExpr.qll d6856a3986eb1421c0676d046432657a52e4c77775fd7c437090cfa8ade3ee29 b8229608a404e5f310a329568a26994eca0361f0653aefdb495351fbefaa5a97
|
||||
lib/codeql/swift/elements/expr/CurrentContextIsolationExpr.qll 1500722bc7ae42c524d1b1cf578befcea69bea5c7a24280af07c911dbdb31e8c 567366f4d3642e183dff1d8bfad3bea433fd6ea37b841faaaa25c21ca0654289
|
||||
lib/codeql/swift/elements/expr/DeclRefExpr.qll 4d7eb8f70aa18d35cde805a310b836d702c8c9da55e9676f8db3338dc57e8034 c6136ccf37e8128640d9df423713b7646309e51c3eda5c6d2807fdb0cc0733e2
|
||||
lib/codeql/swift/elements/expr/DefaultArgumentExpr.qll d655cc4c69db37dc20c477e72df9bb53e18dcc65ffefe61a1bca1854bc006210 a8af422bfdcf56ac37a322d707252ed34b08acf58608065ff3bd214137583b13
|
||||
lib/codeql/swift/elements/expr/DerivedToBaseExpr.qll d42b72fe5c4a36830c9c7b6c929992fb18dabeedda448159822770256593f274 fc6240a71dbd554f8bcc86c2ad0b05f2112578223e9a180beeb0223bf9cc76be
|
||||
@@ -164,6 +166,7 @@ lib/codeql/swift/elements/expr/ExistentialMetatypeToObjectExpr.qll d594531b0f9ce
|
||||
lib/codeql/swift/elements/expr/ExplicitCastExpr.qll 2298ed1952b7d6454d6da53f79a5460987fea4c30317187799fd425d0a013e4f bc4007c1521fbaa9811d6a893a2eea9901f3b1bff2e89a201d416c067e5b2e32
|
||||
lib/codeql/swift/elements/expr/ExplicitClosureExpr.qll bdfa54ebd6bf8bb872cad5a04f57a78c63f9a92ab282d845bf654a45da0cad97 1071c526a7d263151ce9de155d43245dddce33d168b6520f49c96908e91fb256
|
||||
lib/codeql/swift/elements/expr/Expr.qll ae02fbaaf676b1418a047da363a4a61174ba5aba08b229b4f6ba5b3fb96c1edd ff9c4d4d274cceeb178d85a469791833b60a89b06dc4df4678932d6ea7a799ee
|
||||
lib/codeql/swift/elements/expr/ExtractFunctionIsolationExpr.qll 3b557d7e0c8d340e30ff22b22a1f7eb5a7ccb3e278835f1968627c5174cb530a dc25ac7455be2c622e588855a572c49b31e3cdf8900fc83ee79ff40a5e1c4687
|
||||
lib/codeql/swift/elements/expr/FloatLiteralExpr.qll f80be9eea21297f891761284da66c690706b188aadf824641a27446c1b914789 5c6a0ea847a688a33acb6e12713b9d9f33218148e6a51e80b57b3e0e4543ffae
|
||||
lib/codeql/swift/elements/expr/ForceTryExpr.qll 087b6e8ee24d6956cd63adf3e82d89e37d0482c7ba19c2b69af557d1962fdd62 233e166748af3d0f1efb265cd6b15c9960df841fabd6a8eb54744b53d897b35f
|
||||
lib/codeql/swift/elements/expr/ForceValueExpr.qll 397cfd523b3791684482c55a130629d10fd3d993ffe21e8e2d6e7b0295881e54 4a3ecd15296c661d9ebcccaa75f742fdb10056614e0f0ac6085571951b580d6a
|
||||
@@ -229,6 +232,7 @@ lib/codeql/swift/elements/expr/TupleExpr.qll 11efe0f2737b561a392bbd684c7c1cc2e29
|
||||
lib/codeql/swift/elements/expr/TypeExpr.qll c3f7272b77aadd8a4a0e5c7e3876bba6bba45343415c8ce96de26e1e898d11c0 91cd440b768e4d9aa60a165ddb62ecdcad85eb4a676ab0d60ca8777e753bffc7
|
||||
lib/codeql/swift/elements/expr/UnderlyingToOpaqueExpr.qll f319daff97d13a5cacf2efcd1f2b77e58ec9b9a30413ddb30cc0333197cbef9f 9c6a97a66a452a6167b26f48b0f31a42e2c528fcd30e76c9f4dd146f6609b5d3
|
||||
lib/codeql/swift/elements/expr/UnevaluatedInstanceExpr.qll 7eca15f753e81d99a275ca1d29986d5209d8ffea4034746945227fedc1b74c38 714c9a7a09f525187f53a4c9599a141a32ec6071c405c2a425dc2cfb6f2457e6
|
||||
lib/codeql/swift/elements/expr/UnreachableExpr.qll 930822d66d99422603725161f55fec7b861ef33aa8fe57afbdbea2a68a764fcb e8005f5ac66a97e614f3792e8053b0fb6d6bb1f99bc1d0f7d0d0b41e703efe9c
|
||||
lib/codeql/swift/elements/expr/UnresolvedDeclRefExpr.qll 356dacb2b2ece20366a2d4b809210aeedcec31b8362a204854a77a192a01c0e1 7705b39752be30ab6bff12ccc690ed3b0fd843978721558e18f5f57e65f1f688
|
||||
lib/codeql/swift/elements/expr/UnresolvedDotExpr.qll 97c05188380cb890049db519d70168c3ca69c356fd15efd1ec52555519518a68 01455fb6e2c57941b209d844b65a0e6778d2d8d3db6081fb96c375c528574c41
|
||||
lib/codeql/swift/elements/expr/UnresolvedMemberChainResultExpr.qll 2a5747bdd60c30b9b32552ef48a1ba94bfa4c593896d7e1ba1992403680d10af c92cfd85209a0314b99a2f8549c73eb878ab251453330298da72aa9d2208e7ac
|
||||
@@ -239,6 +243,8 @@ lib/codeql/swift/elements/expr/UnresolvedTypeConversionExpr.qll e259a187d70ea6b6
|
||||
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
|
||||
lib/codeql/swift/elements/expr/internal/ActorIsolationErasureExprConstructor.qll da71e5e88434f620484b792075c4966758721b46a20834c296ae77be587a8952 aafac69f37c3fd8b7d0973ca616bba30833b00d64639c3d6b7fb2e86d212406d
|
||||
lib/codeql/swift/elements/expr/internal/ActorIsolationErasureExprImpl.qll e9b2498761c33cd765566978dbb789637e04549bdb967a1948cb6518435bfa7b 3d7b115e8d40fe1ab1fe7375493d991e51b4689b8565dde4beb6181ce7ea44ba
|
||||
lib/codeql/swift/elements/expr/internal/AnyHashableErasureExprConstructor.qll a1a1b5b5cb85202756826d5858b336fa2c06859020084695f6182dff999993ed bc9aab20cb809516512ddca305e2d107c2b2d2f5850620fe53af021145bde247
|
||||
lib/codeql/swift/elements/expr/internal/AnyHashableErasureExprImpl.qll c1a0516ad5176f00347f7a5187f3c521746066235eb3f3bdd6f1ec068180d9f1 cb0d36379fff2483e30e54e75d8b63dc92669e8a129c8fcb24495cfad6456cfc
|
||||
lib/codeql/swift/elements/expr/internal/AnyTryExprImpl.qll 8225177728e36e4cdab514d060052b7174e99146ddfeb1a0cacbaab5bcd7f7a4 074ee2100466303ee268fbe50a3c4d4f93d920b24e17e1a2c60c9f7d3e7b46c2
|
||||
@@ -284,6 +290,8 @@ lib/codeql/swift/elements/expr/internal/CovariantFunctionConversionExprConstruct
|
||||
lib/codeql/swift/elements/expr/internal/CovariantFunctionConversionExprImpl.qll 499b77c2820d42739843665a7574e47e630d3afd125cb4cbb4952d7fe6fde867 fe7d197f25786e329235756a85a90faec82273e097896224bd64f8fb4a804bd9
|
||||
lib/codeql/swift/elements/expr/internal/CovariantReturnConversionExprConstructor.qll 5328580363441c1d76c8ba2654448207f581bc9af4b612b78c2522dceb1accea 687f9b1a9c57f0364893df2812472de0d32e5faed37d34ca429fcea2f9fa2857
|
||||
lib/codeql/swift/elements/expr/internal/CovariantReturnConversionExprImpl.qll 750189e344195f715d09e93e772d5cf3a611a6d1895b7e4a88db4abfe0a5dc8a 8f646de70cb489f46bcc295e4b4a3bd7b8f03e3691c444c1f80b34453b65274c
|
||||
lib/codeql/swift/elements/expr/internal/CurrentContextIsolationExprConstructor.qll 153c80058a025e57375acb36938a44aa0b959772e2864e83e4fb48e9aacf63d2 bea25c65c5a16be09765ab7fe9db37190c18f778878a16cbec92c47f9d25159d
|
||||
lib/codeql/swift/elements/expr/internal/CurrentContextIsolationExprImpl.qll 56b1efc50878f99474c7e5dc5525d7ba98f857112b5fe29926feb2f112d4416c efde63d7e72635f8027b04990eb40bf494fc14215e6ab08316c73b6caa0e49fb
|
||||
lib/codeql/swift/elements/expr/internal/DeclRefExprConstructor.qll 70bd400520a0c5f29494c320184468d36075cf24feb1f6393fc430b47a2cd336 0d3419d85b0a62cc3c8f0f0cb3a4e9a09d250f2e8b99fb11b96e18f584f817a7
|
||||
lib/codeql/swift/elements/expr/internal/DefaultArgumentExprConstructor.qll 31f4def20cb3b60b48eae9b24022f853dc490c2282368fbd8f89e2c689963f86 45dd0dc08a1c4729178b80c4027ad98cba5258ea31e11f0936a8fa9bde8d3b3b
|
||||
lib/codeql/swift/elements/expr/internal/DerivedToBaseExprConstructor.qll d258b88fff4f115e9b4c7ef4cb26623787732cf0d7cf9b59da273d8ebcdb9460 a0a3615be242c3b52624423d685bea3b1f57ebedb2dba51059acc33e2da49844
|
||||
@@ -311,6 +319,8 @@ lib/codeql/swift/elements/expr/internal/ErrorExprImpl.qll 819ddf5500b362c2b48ae9
|
||||
lib/codeql/swift/elements/expr/internal/ExistentialMetatypeToObjectExprConstructor.qll 338043a69b96c85913ac5ae02efb7fa363bb97ef33f1caab4253f1146f4a0e2b 0e66776ca92ebc6ab5b3cbc2b4e7fca382436279dacd5bf9f742b6e0c2150ab0
|
||||
lib/codeql/swift/elements/expr/internal/ExistentialMetatypeToObjectExprImpl.qll 50104bc5721fbd13e1b22639b1a8e1114c0691297c808926c73f5257e55fd4f6 38b634dc13cdbabe0f7195e2a399c7370522b7fc8a56a3a9c53e8928b0742100
|
||||
lib/codeql/swift/elements/expr/internal/ExplicitClosureExprConstructor.qll fe430a5f87fdb10a4354f699437150bda543ae7b2d09879e50c0498239417a4b f8ea635fe9ab01d48a52f135079a34689a648a4c279bddaf8def56ed014868b7
|
||||
lib/codeql/swift/elements/expr/internal/ExtractFunctionIsolationExprConstructor.qll 5f940fa3982695f409225cc81dd89140aa35d396ba93ae88a370167e3e1ebdc2 b6c3085b5d7fed62660b57578537fb9ad7bde1a564b832e1eee7845a813e76be
|
||||
lib/codeql/swift/elements/expr/internal/ExtractFunctionIsolationExprImpl.qll edaad600821c5534b3b2c1a642c9d36b2c1ac406d97334ab7c1e4d934f188614 02e36137fcd5b64d1a89950a01ed129dc28034cf64310d333c06bc581ac9472e
|
||||
lib/codeql/swift/elements/expr/internal/FloatLiteralExprConstructor.qll b6a507af69777dc3e333e1346a3f93b4398551608f6789de562c2b57f1f5bb67 fe2eb2aacb3d4c3d2fa5476199512d5e1ce6aca6d2605dc94445e127ee2f3b08
|
||||
lib/codeql/swift/elements/expr/internal/ForceTryExprConstructor.qll 159e084ab5e6fdbcd45b0ec0d4915121e8f425d764e8787df053e8a0b8fb6137 ebd9c1eb6c5029eef2ee6bb307e15f1eaf2e5db1fa97565cd04386b584b56674
|
||||
lib/codeql/swift/elements/expr/internal/ForceValueExprConstructor.qll 1c85f4d1d06f46f8c992ca13e32de8bc2c682d04a550ccec026ea301307ce2ef a89cf5fdd2063318244d42e73ddbe0e235bd76dcf35e54ace58f098d217e94d7
|
||||
@@ -401,6 +411,8 @@ lib/codeql/swift/elements/expr/internal/UnderlyingToOpaqueExprConstructor.qll 8b
|
||||
lib/codeql/swift/elements/expr/internal/UnderlyingToOpaqueExprImpl.qll cf2637b44a96fce2d8e618469692305181490a28f3b2698b6f9db2d58e7c474d 9b062defb7c19e217bea6e5bd65ccf28e1ff25fb1e784405eb92406806a3349c
|
||||
lib/codeql/swift/elements/expr/internal/UnevaluatedInstanceExprConstructor.qll 4560f4737cb47512b8348fd2a37599227df4a05bfad84873f6666d121a524e0a b49bfdfa550330bab087c5a6b7a3885fd22360e557adf984ce7a35534d882510
|
||||
lib/codeql/swift/elements/expr/internal/UnevaluatedInstanceExprImpl.qll 35107b79b01c1304167ce211e081991a2a8e05e9831da7d6523363d59a9dbb7a bc4811a0b40380b1a065f64dbd4b4f756e80cb11ee3b5c4f6ce035c5629db852
|
||||
lib/codeql/swift/elements/expr/internal/UnreachableExprConstructor.qll 53ff660f143f073f2675c37e2a471b79b82864051a3f5305faf33cd642904d3e 35d37b022f6c6f0b1d6483a2698c2e08f0bd545fd573edbf642815ad7d34bafd
|
||||
lib/codeql/swift/elements/expr/internal/UnreachableExprImpl.qll 3c305339fb8eef3b521638164290d630fc166106006a634c7ccec2198a4cb035 7ff8f246f567689305a44b04e990f31cb696ad2533dbb8c40f1cf82e3e8100ff
|
||||
lib/codeql/swift/elements/expr/internal/UnresolvedDeclRefExprConstructor.qll 344072439e0d95d1148d361ff764c17eaa47e5c0be82a3320cd9ab3868ac415f 25553a602da130b30e69ae9844e9be9da73ee579ba74c3bb84a9aa8e24801b46
|
||||
lib/codeql/swift/elements/expr/internal/UnresolvedDotExprConstructor.qll 2945ae07a65a7262e97cb28d35b9c3a9dfee662f2af54a8d9aba5f0c49216190 297485aa44da7ce69c7e33bc3ffde66bee79615fa947159b76e6ed73d1886b25
|
||||
lib/codeql/swift/elements/expr/internal/UnresolvedMemberChainResultExprConstructor.qll 1086b09aa950efd4e8ed1ce4723f6a6e6b43bbc147085375f589654f2dc04008 8adf6b2f415b69b8eb235c7e76eb5f0e5320939a0904d0b6823b28293eaa3b57
|
||||
@@ -692,7 +704,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 8a9719dd149f539a01c4c8cbe93a15f221cc1dee388a500adada8facd6a92f57 8a9719dd149f539a01c4c8cbe93a15f221cc1dee388a500adada8facd6a92f57
|
||||
lib/codeql/swift/elements.qll 9648ab501b413dc327513d9ed1d6e620a9eab6096e1130dc7e78cd6a2b6b549b 9648ab501b413dc327513d9ed1d6e620a9eab6096e1130dc7e78cd6a2b6b549b
|
||||
lib/codeql/swift/generated/AstNode.qll 6fb80e9b230a1e3ae8193af40744f253d5cc81dc4239156924e5ab606c491efc e5c28418e9a38bde08f323a3986a199620189fc4a8a4dc8f670610a5d3d65b99
|
||||
lib/codeql/swift/generated/AvailabilityInfo.qll e3a5274c43e72ff124b6988fd8be0c83a41b89337e11104150dd0ca7f51d8a11 889563791ca8d9758dbbccf64a0731c4bdbf721cad32bc6cd723f1072b6aa1de
|
||||
lib/codeql/swift/generated/AvailabilitySpec.qll bc64d5c690c4d18800f0a48cc76a6a9ee4f832041343666da2d8df2aae04ed7e d03bf874293ac0ab09c025f75c0f392473d47bebe3223143adcc13882a366119
|
||||
@@ -709,12 +721,12 @@ lib/codeql/swift/generated/Locatable.qll 1d37fa20de71c0b9986bfd7a7c0cb82ab7bf3fd
|
||||
lib/codeql/swift/generated/Location.qll 5e20316c3e480ddfe632b7e88e016c19f10a67df1f6ae9c8f128755a6907d6f5 5a0af2d070bcb2ed53d6d0282bf9c60dc64c2dce89c21fdd485e9c7893c1c8fa
|
||||
lib/codeql/swift/generated/MacroRole.qll 0d8fa6b0b6e2045d9097a87d53888cae2ea5371b2fa7d140341cf206f575b556 ea3b8a7c0a88851809f9a5a5aa80b0d2da3c4779bb29044cdba2b60246a2722c
|
||||
lib/codeql/swift/generated/OtherAvailabilitySpec.qll d9feaa2a71acff3184ca389045b0a49d09156210df0e034923d715b432ad594b 046737621a8bcf69bf805afb0cff476bd15259f12f0d77fce3206dd01b31518f
|
||||
lib/codeql/swift/generated/ParentChild.qll bafa2e366c0df25d6c26c4e2e2b84f3e363524d7abcf0f6e31e42879f2bc664a 616160f5664f77346992c2ac39e3229abdf186fe707066d4895ceddd148749a9
|
||||
lib/codeql/swift/generated/ParentChild.qll 7c9537f74a4c5a02622ce28c3de4b0ce02a7027d2e9aea9a860ece6a1e2ec340 49c1993b2a96df66903bffde78d63d8f4c68b2d604c419b20d88b63406366156
|
||||
lib/codeql/swift/generated/PlatformVersionAvailabilitySpec.qll dc17b49a90a18a8f7607adf2433bc8f0c194fa3e803aa3822f809d4d4fbd6793 be48ea9f8ae17354c8508aaed24337a9e57ce01f288fece3dcecd99776cabcec
|
||||
lib/codeql/swift/generated/PureSynthConstructors.qll bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4 bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4
|
||||
lib/codeql/swift/generated/Raw.qll 4f2ddadd2ced9728aaf4595ccf85cd147468d7ad0a57a21a6cbfd04e3834b386 9653595693da55953d7743fbecce33d16910e3b6737c654311f1e34d27ad7f0b
|
||||
lib/codeql/swift/generated/Synth.qll 31e318c6e156848c85a2a2664695b48b5e93c57c9bb22fa29d027069907b3ab0 8655ffcf772f55284b93f1d7f8e1b3d497a9744d5f2e0c17bc322c1fdf8bdba8
|
||||
lib/codeql/swift/generated/SynthConstructors.qll 3e53c7853096020219c01dae85681fe80b34938d198a0ff359a209dda41c5ed7 3e53c7853096020219c01dae85681fe80b34938d198a0ff359a209dda41c5ed7
|
||||
lib/codeql/swift/generated/Raw.qll 522f8500ce46d62fca22730ade5fa4716452adece25ffc36c50582b653f2fe6f 4d870e0695fff541c1a14eadc8ba51960a264ba2e6e53d0ccc32b34c7fd2cadd
|
||||
lib/codeql/swift/generated/Synth.qll a14dddab40979df82d30b2d73407fe0058a803ed6e1a882cd9a6ae5ffd240526 0879d2476a42123b46eee216d4ea03523e0c04fe0b68d9a68e0046253edb1bc9
|
||||
lib/codeql/swift/generated/SynthConstructors.qll f64121911e082aa15478eb8779025cee96e97503724c02aff31741e65a894a4b f64121911e082aa15478eb8779025cee96e97503724c02aff31741e65a894a4b
|
||||
lib/codeql/swift/generated/UnknownFile.qll 247ddf2ebb49ce5ed4bf7bf91a969ddff37de6c78d43d8affccaf7eb586e06f2 452b29f0465ef45e978ef8b647b75e5a2a1e53f2a568fc003bc8f52f73b3fa4d
|
||||
lib/codeql/swift/generated/UnknownLocation.qll d871000b4f53ffca4f67ea23ca5626e5dcce125d62a4d4b9969e08cc974af6fc b05971d7774e60790362fb810fb7086314f40a2de747b8cb1bc823ec6494a4dd
|
||||
lib/codeql/swift/generated/UnspecifiedElement.qll d9ad4ba1ffff90cc465e8ba0dea8c4e8ba67dce5529b53b63ab6dc8e13c85e67 025218e1fee8ee382b63ad38009dfec73dc604d2ba80b9ad956c7c96eeed7022
|
||||
@@ -762,6 +774,7 @@ lib/codeql/swift/generated/decl/TypeDecl.qll 92f74709cce7e9f0f713598d3b20b730475
|
||||
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
|
||||
lib/codeql/swift/generated/expr/ActorIsolationErasureExpr.qll 0ebade7950363d63a3d0e86877174e763522ba5119253ec6b9dbf6506ab7ab6d a5a94ef22d198b7325c8dda3ca380c600f4f0147534fc1b12e57fd19e4e63961
|
||||
lib/codeql/swift/generated/expr/AnyHashableErasureExpr.qll e9040afb7bf3d2d79fe931aa98f565bf1b8ad4ba56a9f2ee579e61afa7c50719 1e6e4fa2519522a117b7ca05c060f060376974a4148cbad38bb238ac432509c6
|
||||
lib/codeql/swift/generated/expr/AnyTryExpr.qll 32b5df81d686959183af42c0ba30976360f3062bd6279b88d8578ac010740b24 b8a78d4e06d7160b83b31bbd033e4697f607bd6ea294f2e0dbbe96a0c665014d
|
||||
lib/codeql/swift/generated/expr/AppliedPropertyWrapperExpr.qll a272cddf6e161406a886a779939a88b4536eace5579ac6930f1b5f7c234c6525 1c93e30d1850fb3be09cc250f4e645b8c36878c7ea3d028bc06a3255f764605d
|
||||
@@ -794,6 +807,7 @@ lib/codeql/swift/generated/expr/ConsumeExpr.qll 86c90b17fb5fded8852088703418132f
|
||||
lib/codeql/swift/generated/expr/CopyExpr.qll 026c323ebb0ac57814041a73b6c5933501902f744f6d2e971dbc2b39bb987be3 be20d88f5d6f8771a1d0d0af6316ccfd51994dcfaee2a2ee47cb7ef132f8e6b7
|
||||
lib/codeql/swift/generated/expr/CovariantFunctionConversionExpr.qll 53f906b1ff6c3994829881098d070a92df2ee86242f7636401acfa4c8a0a1e9c 98a5f7949f02f5fc2aee38e2eed2feef677b6f2daa2d244fe790baca347a9db3
|
||||
lib/codeql/swift/generated/expr/CovariantReturnConversionExpr.qll 68bf0f1a97f6a1bd2a99c60fa09d930cbd427679bbe0f41ae4394b1ad4ba126d c1063eb981345c73b871292218b40308ee5c12babc80b5d63b337eb67628d7a9
|
||||
lib/codeql/swift/generated/expr/CurrentContextIsolationExpr.qll d5d82951e4aff875c5229daec9f18a3261fb236e326234eadccd7ee5c87a83e0 c76f2fa71e422cbe2dfa39588d1dcaa4e50266fc3102a446fb76386f198601ee
|
||||
lib/codeql/swift/generated/expr/DeclRefExpr.qll 9a696dc79181a2ebe76e2ad47edc27baac49a9c8ed38e164e5c8c61a81c23865 adcde2929271268d08550848d8c04911aec790af10609e387ea07e80bee0de6f
|
||||
lib/codeql/swift/generated/expr/DefaultArgumentExpr.qll a9bd89e69f35b04932a89be8099cdb0a4ce65df579d3b88d4cf6f5c328b9f327 16d22db992c2fae4abec569e10be32526883610eea7f90f19c73297168fa63fb
|
||||
lib/codeql/swift/generated/expr/DerivedToBaseExpr.qll 2b744875e4d12988992222cec5e5c16d65b98dca45a375c436ac5811dff4c19f 536407ce6e380d80bf8fd9d16498a773fba828cf7fa2d43f88a7ec38312f953f
|
||||
@@ -816,6 +830,7 @@ lib/codeql/swift/generated/expr/ExistentialMetatypeToObjectExpr.qll f6eb63b5887d
|
||||
lib/codeql/swift/generated/expr/ExplicitCastExpr.qll 2830522bd17122c26a2392405b2c160ff29ebe8cb0aa8d21498a2b0f05ce9858 bc96f19c0bcb36e78c7f7c48c7d01dbdefaa20564a020e7baf2fc9d8abe734c2
|
||||
lib/codeql/swift/generated/expr/ExplicitClosureExpr.qll e6fa08fad995b2cafb9d76482cc836e6a0fa24d1e055e848bf2df5acedd12a94 79730347c91ab01c480116c7feba97dafafc030c910e6664519fbc122201cf5b
|
||||
lib/codeql/swift/generated/expr/Expr.qll 29581d27469f6abd06bb1c29cce142e8287f3a6eb7cb251fd14e832e6a6a4e6a 957d3f470d91e757b2921af49651b7c1a1eb111e74ff9ea12577d5df38714c64
|
||||
lib/codeql/swift/generated/expr/ExtractFunctionIsolationExpr.qll 87e5b3d76a64297787c4e9c63e5278f75f94df64acf6dce2cd12af52f071b90b 185ff557ef4f3efaccc696705282df74dda577063197cc8bc20bc8968993a1ff
|
||||
lib/codeql/swift/generated/expr/FloatLiteralExpr.qll fb226de33de8ede0c3048aa5735f83feafa912d165a793e06e50d0d87165989c 0fb88029e576f444a9623b49294a5fb713bb0f38850e136378107dafcefb98a2
|
||||
lib/codeql/swift/generated/expr/ForceTryExpr.qll da482d8440c5245dd4ea347e0d6c14cfb455f426055bb4e4c23cacae511a3a52 9c2ec46370708434337802dc62a07f24382cb3ea4499eafcf45ba8b503cbebf9
|
||||
lib/codeql/swift/generated/expr/ForceValueExpr.qll 3660da045afe79bf7815519134278851a8852ca4a159cf54a2d4f2d413864471 4e7416dc69fb917f6cd304d992a6d0e4e7cd1b4ce16201c86cf3a53a58892635
|
||||
@@ -883,6 +898,7 @@ lib/codeql/swift/generated/expr/TupleExpr.qll 860dde65c440ffa74648c663126194182c
|
||||
lib/codeql/swift/generated/expr/TypeExpr.qll 1f38f463b11b9f10878dab7266f05f455a0802e6d7464d81d4c05855d41adc64 b3c3f6b61b466be86a8cc0cea18d85b7a23b1f8dcf876ef2a050ef69778df32b
|
||||
lib/codeql/swift/generated/expr/UnderlyingToOpaqueExpr.qll 3d68175d73056e6f5afea5040ad2f9a8447adf078c490bb06769008857ee2ca7 f0ec8f0bf7271289b8be32038e60c2b1053d6563354c8bced53a42fef6292152
|
||||
lib/codeql/swift/generated/expr/UnevaluatedInstanceExpr.qll bac438970bc12eef2ace318b97d37ef58ab7a9c2c43c3f4515780f65cdc5de70 11810cdd753c744f3ee274fce889d272c3c94b6087c124cdd09e99188eb3f926
|
||||
lib/codeql/swift/generated/expr/UnreachableExpr.qll ab17ea1f01eb1b22b1012b57582b170936244c98f42374e0e21b9d468db9249c 93a2a3685a9f8d4eab06cf700bc6465915e29b49249a14fe6aa68d1af96c86ca
|
||||
lib/codeql/swift/generated/expr/UnresolvedDeclRefExpr.qll b6a72b3052829ac56f16b72baa7fc62926e8dde781ab9fa29b2cb7d87b5e287d df8fe19e9487c3ae83a19f38d98fd365add5b010ccab2f8699e4a2b841bb00a0
|
||||
lib/codeql/swift/generated/expr/UnresolvedDotExpr.qll 78a6d4cf27b3b6012b9880cae52604c49e7300d1b02e9f7a9157705078423d7a 79ca200646616ddb17fb72112469985b18718cba676e3bd94d8bcb234627ea93
|
||||
lib/codeql/swift/generated/expr/UnresolvedMemberChainResultExpr.qll 8277a5c54c868441217beab4b5f7f4bb937098611ce1e1fb098ad39f17660970 15996c1c571579db3e2ea861fa850294d916dde6ba437cabc6f18d18bcc6b785
|
||||
@@ -1144,6 +1160,8 @@ test/extractor-tests/generated/expr/DynamicTypeExpr/MISSING_SOURCE.txt 35fb32ea5
|
||||
test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql 426837e6acd80fd5c4f79f756919c99df132f6666aae9d07274c4b95711123bd 451393b79359a46070db84d8d35ad3c7f14cc20eddd3df2a70126575d2200297
|
||||
test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.ql 9deff1a2a2271c2dbe44b2aeef42f9adadd73b0e09eb6d71c68ac5bd8d315447 bdc07aec1fa2ced3f8b4c2dcede0354b8943488acf13e559f882f01161172318
|
||||
test/extractor-tests/generated/expr/ExplicitClosureExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql 7c4666a86e962726a505e76c57196483c6eb5259463a1cbdb6239f5ccbb33a13 2b5acd61e85a46b1c565104ba6f58b58813ffeba3548dacd776f72db552d5d65
|
||||
test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.ql 487c727c721ff925861b265d9a4f78029f04dba3b94e064529d89c7ee55ac343 3bfdadc09b8672b9030f43c2f0cab6395af803e79ddc17089c43c3da93d69979
|
||||
test/extractor-tests/generated/expr/FloatLiteralExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/expr/ForceTryExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
test/extractor-tests/generated/expr/ForceValueExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
|
||||
|
||||
18
swift/ql/.gitattributes
generated
vendored
18
swift/ql/.gitattributes
generated
vendored
@@ -113,6 +113,7 @@
|
||||
/lib/codeql/swift/elements/decl/internal/TopLevelCodeDeclConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/decl/internal/TypeAliasDeclConstructor.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
|
||||
/lib/codeql/swift/elements/expr/AnyTryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/AppliedPropertyWrapperExpr.qll linguist-generated
|
||||
@@ -145,6 +146,7 @@
|
||||
/lib/codeql/swift/elements/expr/CopyExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CovariantFunctionConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CovariantReturnConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/CurrentContextIsolationExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DeclRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DefaultArgumentExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/DerivedToBaseExpr.qll linguist-generated
|
||||
@@ -166,6 +168,7 @@
|
||||
/lib/codeql/swift/elements/expr/ExplicitCastExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ExplicitClosureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/Expr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ExtractFunctionIsolationExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/FloatLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForceTryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/ForceValueExpr.qll linguist-generated
|
||||
@@ -231,6 +234,7 @@
|
||||
/lib/codeql/swift/elements/expr/TypeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnderlyingToOpaqueExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnevaluatedInstanceExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnreachableExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedDeclRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedDotExpr.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/UnresolvedMemberChainResultExpr.qll linguist-generated
|
||||
@@ -241,6 +245,8 @@
|
||||
/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
|
||||
/lib/codeql/swift/elements/expr/internal/ActorIsolationErasureExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/ActorIsolationErasureExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/AnyHashableErasureExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/AnyHashableErasureExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/AnyTryExprImpl.qll linguist-generated
|
||||
@@ -286,6 +292,8 @@
|
||||
/lib/codeql/swift/elements/expr/internal/CovariantFunctionConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/CovariantReturnConversionExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/CovariantReturnConversionExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/CurrentContextIsolationExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/CurrentContextIsolationExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/DeclRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/DefaultArgumentExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/DerivedToBaseExprConstructor.qll linguist-generated
|
||||
@@ -313,6 +321,8 @@
|
||||
/lib/codeql/swift/elements/expr/internal/ExistentialMetatypeToObjectExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/ExistentialMetatypeToObjectExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/ExplicitClosureExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/ExtractFunctionIsolationExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/ExtractFunctionIsolationExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/FloatLiteralExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/ForceTryExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/ForceValueExprConstructor.qll linguist-generated
|
||||
@@ -403,6 +413,8 @@
|
||||
/lib/codeql/swift/elements/expr/internal/UnderlyingToOpaqueExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnevaluatedInstanceExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnevaluatedInstanceExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnreachableExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnreachableExprImpl.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnresolvedDeclRefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnresolvedDotExprConstructor.qll linguist-generated
|
||||
/lib/codeql/swift/elements/expr/internal/UnresolvedMemberChainResultExprConstructor.qll linguist-generated
|
||||
@@ -764,6 +776,7 @@
|
||||
/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
|
||||
/lib/codeql/swift/generated/expr/ActorIsolationErasureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/AnyHashableErasureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/AnyTryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/AppliedPropertyWrapperExpr.qll linguist-generated
|
||||
@@ -796,6 +809,7 @@
|
||||
/lib/codeql/swift/generated/expr/CopyExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/CovariantFunctionConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/CovariantReturnConversionExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/CurrentContextIsolationExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/DeclRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/DefaultArgumentExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/DerivedToBaseExpr.qll linguist-generated
|
||||
@@ -818,6 +832,7 @@
|
||||
/lib/codeql/swift/generated/expr/ExplicitCastExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/ExplicitClosureExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/Expr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/ExtractFunctionIsolationExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/FloatLiteralExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/ForceTryExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/ForceValueExpr.qll linguist-generated
|
||||
@@ -885,6 +900,7 @@
|
||||
/lib/codeql/swift/generated/expr/TypeExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnderlyingToOpaqueExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnevaluatedInstanceExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnreachableExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnresolvedDeclRefExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnresolvedDotExpr.qll linguist-generated
|
||||
/lib/codeql/swift/generated/expr/UnresolvedMemberChainResultExpr.qll linguist-generated
|
||||
@@ -1146,6 +1162,8 @@
|
||||
/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.ql linguist-generated
|
||||
/test/extractor-tests/generated/expr/ExplicitClosureExpr/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.ql linguist-generated
|
||||
/test/extractor-tests/generated/expr/FloatLiteralExpr/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/expr/ForceTryExpr/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/expr/ForceValueExpr/MISSING_SOURCE.txt linguist-generated
|
||||
|
||||
6
swift/ql/lib/change-notes/2025-04-14-new-entities.md
Normal file
6
swift/ql/lib/change-notes/2025-04-14-new-entities.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Added AST nodes `ActorIsolationErasureExpr`, `CurrentContextIsolationExpr`,
|
||||
`ExtracFunctionIsolationExpr` and `UnreachableExpr` that correspond to new nodes
|
||||
added by Swift 6.0.
|
||||
@@ -1866,6 +1866,24 @@ module Exprs {
|
||||
}
|
||||
}
|
||||
|
||||
private class ExtractFunctionIsolationTree extends AstStandardPostOrderTree {
|
||||
override ExtractFunctionIsolationExpr ast;
|
||||
|
||||
final override ControlFlowElement getChildNode(int i) {
|
||||
i = 0 and
|
||||
result.asAstNode() = ast.getFunctionExpr().getFullyConverted()
|
||||
}
|
||||
}
|
||||
|
||||
private class CurrentContextIsolationTree extends AstStandardPostOrderTree {
|
||||
override CurrentContextIsolationExpr ast;
|
||||
|
||||
final override ControlFlowElement getChildNode(int i) {
|
||||
i = 0 and
|
||||
result.asAstNode() = ast.getActor().getFullyConverted()
|
||||
}
|
||||
}
|
||||
|
||||
module Conversions {
|
||||
class ConversionOrIdentity =
|
||||
Synth::TIdentityExpr or Synth::TExplicitCastExpr or Synth::TImplicitConversionExpr or
|
||||
|
||||
4
swift/ql/lib/codeql/swift/elements.qll
generated
4
swift/ql/lib/codeql/swift/elements.qll
generated
@@ -66,6 +66,7 @@ import codeql.swift.elements.decl.TypeDecl
|
||||
import codeql.swift.elements.decl.ValueDecl
|
||||
import codeql.swift.elements.decl.VarDecl
|
||||
import codeql.swift.elements.expr.AbiSafeConversionExpr
|
||||
import codeql.swift.elements.expr.ActorIsolationErasureExpr
|
||||
import codeql.swift.elements.expr.AnyHashableErasureExpr
|
||||
import codeql.swift.elements.expr.AnyTryExpr
|
||||
import codeql.swift.elements.expr.AppliedPropertyWrapperExpr
|
||||
@@ -98,6 +99,7 @@ import codeql.swift.elements.expr.ConsumeExpr
|
||||
import codeql.swift.elements.expr.CopyExpr
|
||||
import codeql.swift.elements.expr.CovariantFunctionConversionExpr
|
||||
import codeql.swift.elements.expr.CovariantReturnConversionExpr
|
||||
import codeql.swift.elements.expr.CurrentContextIsolationExpr
|
||||
import codeql.swift.elements.expr.DeclRefExpr
|
||||
import codeql.swift.elements.expr.DefaultArgumentExpr
|
||||
import codeql.swift.elements.expr.DerivedToBaseExpr
|
||||
@@ -119,6 +121,7 @@ import codeql.swift.elements.expr.ExistentialMetatypeToObjectExpr
|
||||
import codeql.swift.elements.expr.ExplicitCastExpr
|
||||
import codeql.swift.elements.expr.ExplicitClosureExpr
|
||||
import codeql.swift.elements.expr.Expr
|
||||
import codeql.swift.elements.expr.ExtractFunctionIsolationExpr
|
||||
import codeql.swift.elements.expr.FloatLiteralExpr
|
||||
import codeql.swift.elements.expr.ForceTryExpr
|
||||
import codeql.swift.elements.expr.ForceValueExpr
|
||||
@@ -184,6 +187,7 @@ import codeql.swift.elements.expr.TupleExpr
|
||||
import codeql.swift.elements.expr.TypeExpr
|
||||
import codeql.swift.elements.expr.UnderlyingToOpaqueExpr
|
||||
import codeql.swift.elements.expr.UnevaluatedInstanceExpr
|
||||
import codeql.swift.elements.expr.UnreachableExpr
|
||||
import codeql.swift.elements.expr.UnresolvedDeclRefExpr
|
||||
import codeql.swift.elements.expr.UnresolvedDotExpr
|
||||
import codeql.swift.elements.expr.UnresolvedMemberChainResultExpr
|
||||
|
||||
13
swift/ql/lib/codeql/swift/elements/expr/ActorIsolationErasureExpr.qll
generated
Normal file
13
swift/ql/lib/codeql/swift/elements/expr/ActorIsolationErasureExpr.qll
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `ActorIsolationErasureExpr`.
|
||||
*/
|
||||
|
||||
private import internal.ActorIsolationErasureExprImpl
|
||||
import codeql.swift.elements.expr.ImplicitConversionExpr
|
||||
|
||||
/**
|
||||
* A conversion that erases the actor isolation of an expression with `@isolated(any)` function
|
||||
* type.
|
||||
*/
|
||||
final class ActorIsolationErasureExpr = Impl::ActorIsolationErasureExpr;
|
||||
14
swift/ql/lib/codeql/swift/elements/expr/CurrentContextIsolationExpr.qll
generated
Normal file
14
swift/ql/lib/codeql/swift/elements/expr/CurrentContextIsolationExpr.qll
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `CurrentContextIsolationExpr`.
|
||||
*/
|
||||
|
||||
private import internal.CurrentContextIsolationExprImpl
|
||||
import codeql.swift.elements.expr.Expr
|
||||
|
||||
/**
|
||||
* An expression that extracts the actor isolation of the current context, of type `(any Actor)?`.
|
||||
* This is synthesized by the type checker and does not have any way to be expressed explicitly in
|
||||
* the source.
|
||||
*/
|
||||
final class CurrentContextIsolationExpr = Impl::CurrentContextIsolationExpr;
|
||||
20
swift/ql/lib/codeql/swift/elements/expr/ExtractFunctionIsolationExpr.qll
generated
Normal file
20
swift/ql/lib/codeql/swift/elements/expr/ExtractFunctionIsolationExpr.qll
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `ExtractFunctionIsolationExpr`.
|
||||
*/
|
||||
|
||||
private import internal.ExtractFunctionIsolationExprImpl
|
||||
import codeql.swift.elements.expr.Expr
|
||||
|
||||
/**
|
||||
* An expression that extracts the function isolation of an expression with `@isolated(any)`
|
||||
* function type.
|
||||
*
|
||||
* For example:
|
||||
* ```
|
||||
* func foo(x: @isolated(any) () -> ()) {
|
||||
* let isolation = x.isolation
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ExtractFunctionIsolationExpr = Impl::ExtractFunctionIsolationExpr;
|
||||
12
swift/ql/lib/codeql/swift/elements/expr/UnreachableExpr.qll
generated
Normal file
12
swift/ql/lib/codeql/swift/elements/expr/UnreachableExpr.qll
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the public class `UnreachableExpr`.
|
||||
*/
|
||||
|
||||
private import internal.UnreachableExprImpl
|
||||
import codeql.swift.elements.expr.ImplicitConversionExpr
|
||||
|
||||
/**
|
||||
* A conversion from the uninhabited type to any other type. It's never evaluated.
|
||||
*/
|
||||
final class UnreachableExpr = Impl::UnreachableExpr;
|
||||
14
swift/ql/lib/codeql/swift/elements/expr/internal/ActorIsolationErasureExprConstructor.qll
generated
Normal file
14
swift/ql/lib/codeql/swift/elements/expr/internal/ActorIsolationErasureExprConstructor.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
|
||||
* `ActorIsolationErasureExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `ActorIsolationErasureExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructActorIsolationErasureExpr(Raw::ActorIsolationErasureExpr id) { any() }
|
||||
20
swift/ql/lib/codeql/swift/elements/expr/internal/ActorIsolationErasureExprImpl.qll
generated
Normal file
20
swift/ql/lib/codeql/swift/elements/expr/internal/ActorIsolationErasureExprImpl.qll
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
// 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 `ActorIsolationErasureExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.expr.ActorIsolationErasureExpr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ActorIsolationErasureExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* A conversion that erases the actor isolation of an expression with `@isolated(any)` function
|
||||
* type.
|
||||
*/
|
||||
class ActorIsolationErasureExpr extends Generated::ActorIsolationErasureExpr { }
|
||||
}
|
||||
14
swift/ql/lib/codeql/swift/elements/expr/internal/CurrentContextIsolationExprConstructor.qll
generated
Normal file
14
swift/ql/lib/codeql/swift/elements/expr/internal/CurrentContextIsolationExprConstructor.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
|
||||
* `CurrentContextIsolationExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `CurrentContextIsolationExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructCurrentContextIsolationExpr(Raw::CurrentContextIsolationExpr id) { any() }
|
||||
21
swift/ql/lib/codeql/swift/elements/expr/internal/CurrentContextIsolationExprImpl.qll
generated
Normal file
21
swift/ql/lib/codeql/swift/elements/expr/internal/CurrentContextIsolationExprImpl.qll
generated
Normal file
@@ -0,0 +1,21 @@
|
||||
// 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 `CurrentContextIsolationExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.expr.CurrentContextIsolationExpr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `CurrentContextIsolationExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* An expression that extracts the actor isolation of the current context, of type `(any Actor)?`.
|
||||
* This is synthesized by the type checker and does not have any way to be expressed explicitly in
|
||||
* the source.
|
||||
*/
|
||||
class CurrentContextIsolationExpr extends Generated::CurrentContextIsolationExpr { }
|
||||
}
|
||||
14
swift/ql/lib/codeql/swift/elements/expr/internal/ExtractFunctionIsolationExprConstructor.qll
generated
Normal file
14
swift/ql/lib/codeql/swift/elements/expr/internal/ExtractFunctionIsolationExprConstructor.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
|
||||
* `ExtractFunctionIsolationExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `ExtractFunctionIsolationExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructExtractFunctionIsolationExpr(Raw::ExtractFunctionIsolationExpr id) { any() }
|
||||
27
swift/ql/lib/codeql/swift/elements/expr/internal/ExtractFunctionIsolationExprImpl.qll
generated
Normal file
27
swift/ql/lib/codeql/swift/elements/expr/internal/ExtractFunctionIsolationExprImpl.qll
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
// 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 `ExtractFunctionIsolationExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.expr.ExtractFunctionIsolationExpr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ExtractFunctionIsolationExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* An expression that extracts the function isolation of an expression with `@isolated(any)`
|
||||
* function type.
|
||||
*
|
||||
* For example:
|
||||
* ```
|
||||
* func foo(x: @isolated(any) () -> ()) {
|
||||
* let isolation = x.isolation
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class ExtractFunctionIsolationExpr extends Generated::ExtractFunctionIsolationExpr { }
|
||||
}
|
||||
14
swift/ql/lib/codeql/swift/elements/expr/internal/UnreachableExprConstructor.qll
generated
Normal file
14
swift/ql/lib/codeql/swift/elements/expr/internal/UnreachableExprConstructor.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
|
||||
* `UnreachableExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `UnreachableExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructUnreachableExpr(Raw::UnreachableExpr id) { any() }
|
||||
19
swift/ql/lib/codeql/swift/elements/expr/internal/UnreachableExprImpl.qll
generated
Normal file
19
swift/ql/lib/codeql/swift/elements/expr/internal/UnreachableExprImpl.qll
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `UnreachableExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.expr.UnreachableExpr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `UnreachableExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* A conversion from the uninhabited type to any other type. It's never evaluated.
|
||||
*/
|
||||
class UnreachableExpr extends Generated::UnreachableExpr { }
|
||||
}
|
||||
77
swift/ql/lib/codeql/swift/generated/ParentChild.qll
generated
77
swift/ql/lib/codeql/swift/generated/ParentChild.qll
generated
@@ -1267,6 +1267,21 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfCurrentContextIsolationExpr(
|
||||
CurrentContextIsolationExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bExpr, int n |
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
n = bExpr and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfExpr(e, index - b, partialPredicateCall)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfDeclRefExpr(
|
||||
DeclRefExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
@@ -1406,6 +1421,26 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfExtractFunctionIsolationExpr(
|
||||
ExtractFunctionIsolationExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bExpr, int n, int nFunctionExpr |
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
n = bExpr and
|
||||
nFunctionExpr = n + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
index = n and
|
||||
result = e.getImmediateFunctionExpr() and
|
||||
partialPredicateCall = "FunctionExpr()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfForceValueExpr(
|
||||
ForceValueExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
@@ -2113,6 +2148,23 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfActorIsolationErasureExpr(
|
||||
ActorIsolationErasureExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bImplicitConversionExpr, int n |
|
||||
b = 0 and
|
||||
bImplicitConversionExpr =
|
||||
b + 1 +
|
||||
max(int i | i = -1 or exists(getImmediateChildOfImplicitConversionExpr(e, i, _)) | i) and
|
||||
n = bImplicitConversionExpr and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfImplicitConversionExpr(e, index - b, partialPredicateCall)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfAnyHashableErasureExpr(
|
||||
AnyHashableErasureExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
@@ -3056,6 +3108,23 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfUnreachableExpr(
|
||||
UnreachableExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bImplicitConversionExpr, int n |
|
||||
b = 0 and
|
||||
bImplicitConversionExpr =
|
||||
b + 1 +
|
||||
max(int i | i = -1 or exists(getImmediateChildOfImplicitConversionExpr(e, i, _)) | i) and
|
||||
n = bImplicitConversionExpr and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfImplicitConversionExpr(e, index - b, partialPredicateCall)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfUnresolvedMemberChainResultExpr(
|
||||
UnresolvedMemberChainResultExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
@@ -5224,6 +5293,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfCopyExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfCurrentContextIsolationExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfDeclRefExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfDefaultArgumentExpr(e, index, partialAccessor)
|
||||
@@ -5238,6 +5309,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfErrorExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfExtractFunctionIsolationExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfForceValueExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfIfExpr(e, index, partialAccessor)
|
||||
@@ -5306,6 +5379,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfAbiSafeConversionExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfActorIsolationErasureExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfAnyHashableErasureExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfArchetypeToSuperExpr(e, index, partialAccessor)
|
||||
@@ -5412,6 +5487,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfUnevaluatedInstanceExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfUnreachableExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfUnresolvedMemberChainResultExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfUnresolvedTypeConversionExpr(e, index, partialAccessor)
|
||||
|
||||
53
swift/ql/lib/codeql/swift/generated/Raw.qll
generated
53
swift/ql/lib/codeql/swift/generated/Raw.qll
generated
@@ -1215,6 +1215,21 @@ module Raw {
|
||||
Expr getSubExpr() { copy_exprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* An expression that extracts the actor isolation of the current context, of type `(any Actor)?`.
|
||||
* This is synthesized by the type checker and does not have any way to be expressed explicitly in
|
||||
* the source.
|
||||
*/
|
||||
class CurrentContextIsolationExpr extends @current_context_isolation_expr, Expr {
|
||||
override string toString() { result = "CurrentContextIsolationExpr" }
|
||||
|
||||
/**
|
||||
* Gets the actor of this current context isolation expression.
|
||||
*/
|
||||
Expr getActor() { current_context_isolation_exprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -1346,6 +1361,27 @@ module Raw {
|
||||
Expr getSubExpr() { explicit_cast_exprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* An expression that extracts the function isolation of an expression with `@isolated(any)`
|
||||
* function type.
|
||||
*
|
||||
* For example:
|
||||
* ```
|
||||
* func foo(x: @isolated(any) () -> ()) {
|
||||
* let isolation = x.isolation
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class ExtractFunctionIsolationExpr extends @extract_function_isolation_expr, Expr {
|
||||
override string toString() { result = "ExtractFunctionIsolationExpr" }
|
||||
|
||||
/**
|
||||
* Gets the function expression of this extract function isolation expression.
|
||||
*/
|
||||
Expr getFunctionExpr() { extract_function_isolation_exprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -1901,6 +1937,15 @@ module Raw {
|
||||
override string toString() { result = "AbiSafeConversionExpr" }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A conversion that erases the actor isolation of an expression with `@isolated(any)` function
|
||||
* type.
|
||||
*/
|
||||
class ActorIsolationErasureExpr extends @actor_isolation_erasure_expr, ImplicitConversionExpr {
|
||||
override string toString() { result = "ActorIsolationErasureExpr" }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -2417,6 +2462,14 @@ module Raw {
|
||||
override string toString() { result = "UnevaluatedInstanceExpr" }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A conversion from the uninhabited type to any other type. It's never evaluated.
|
||||
*/
|
||||
class UnreachableExpr extends @unreachable_expr, ImplicitConversionExpr {
|
||||
override string toString() { result = "UnreachableExpr" }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
123
swift/ql/lib/codeql/swift/generated/Synth.qll
generated
123
swift/ql/lib/codeql/swift/generated/Synth.qll
generated
@@ -192,6 +192,12 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TAbiSafeConversionExpr(Raw::AbiSafeConversionExpr id) { constructAbiSafeConversionExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TActorIsolationErasureExpr(Raw::ActorIsolationErasureExpr id) {
|
||||
constructActorIsolationErasureExpr(id)
|
||||
} or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -310,6 +316,12 @@ module Synth {
|
||||
TCovariantReturnConversionExpr(Raw::CovariantReturnConversionExpr id) {
|
||||
constructCovariantReturnConversionExpr(id)
|
||||
} or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TCurrentContextIsolationExpr(Raw::CurrentContextIsolationExpr id) {
|
||||
constructCurrentContextIsolationExpr(id)
|
||||
} or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -394,6 +406,12 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TExplicitClosureExpr(Raw::ExplicitClosureExpr id) { constructExplicitClosureExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TExtractFunctionIsolationExpr(Raw::ExtractFunctionIsolationExpr id) {
|
||||
constructExtractFunctionIsolationExpr(id)
|
||||
} or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -660,6 +678,10 @@ module Synth {
|
||||
TUnevaluatedInstanceExpr(Raw::UnevaluatedInstanceExpr id) {
|
||||
constructUnevaluatedInstanceExpr(id)
|
||||
} or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TUnreachableExpr(Raw::UnreachableExpr id) { constructUnreachableExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -1230,15 +1252,15 @@ module Synth {
|
||||
class TExpr =
|
||||
TAnyTryExpr or TAppliedPropertyWrapperExpr or TApplyExpr or TAssignExpr or TBindOptionalExpr or
|
||||
TCaptureListExpr or TClosureExpr or TCollectionExpr or TConsumeExpr or TCopyExpr or
|
||||
TDeclRefExpr or TDefaultArgumentExpr or TDiscardAssignmentExpr or
|
||||
TDotSyntaxBaseIgnoredExpr or TDynamicTypeExpr or TEnumIsCaseExpr or TErrorExpr or
|
||||
TExplicitCastExpr or TForceValueExpr or TIdentityExpr or TIfExpr or
|
||||
TImplicitConversionExpr or TInOutExpr or TKeyPathApplicationExpr or TKeyPathDotExpr or
|
||||
TKeyPathExpr or TLazyInitializationExpr or TLiteralExpr or TLookupExpr or
|
||||
TMakeTemporarilyEscapableExpr or TMaterializePackExpr or TObjCSelectorExpr or TOneWayExpr or
|
||||
TOpaqueValueExpr or TOpenExistentialExpr or TOptionalEvaluationExpr or
|
||||
TOtherInitializerRefExpr or TOverloadedDeclRefExpr or TPackElementExpr or
|
||||
TPackExpansionExpr or TPropertyWrapperValuePlaceholderExpr or
|
||||
TCurrentContextIsolationExpr or TDeclRefExpr or TDefaultArgumentExpr or
|
||||
TDiscardAssignmentExpr or TDotSyntaxBaseIgnoredExpr or TDynamicTypeExpr or
|
||||
TEnumIsCaseExpr or TErrorExpr or TExplicitCastExpr or TExtractFunctionIsolationExpr or
|
||||
TForceValueExpr or TIdentityExpr or TIfExpr or TImplicitConversionExpr or TInOutExpr or
|
||||
TKeyPathApplicationExpr or TKeyPathDotExpr or TKeyPathExpr or TLazyInitializationExpr or
|
||||
TLiteralExpr or TLookupExpr or TMakeTemporarilyEscapableExpr or TMaterializePackExpr or
|
||||
TObjCSelectorExpr or TOneWayExpr or TOpaqueValueExpr or TOpenExistentialExpr or
|
||||
TOptionalEvaluationExpr or TOtherInitializerRefExpr or TOverloadedDeclRefExpr or
|
||||
TPackElementExpr or TPackExpansionExpr or TPropertyWrapperValuePlaceholderExpr or
|
||||
TRebindSelfInInitializerExpr or TSequenceExpr or TSingleValueStmtExpr or TSuperRefExpr or
|
||||
TTapExpr or TTupleElementExpr or TTupleExpr or TTypeExpr or TUnresolvedDeclRefExpr or
|
||||
TUnresolvedDotExpr or TUnresolvedMemberExpr or TUnresolvedPatternExpr or
|
||||
@@ -1254,8 +1276,8 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class TImplicitConversionExpr =
|
||||
TAbiSafeConversionExpr or TAnyHashableErasureExpr or TArchetypeToSuperExpr or
|
||||
TArrayToPointerExpr or TBridgeFromObjCExpr or TBridgeToObjCExpr or
|
||||
TAbiSafeConversionExpr or TActorIsolationErasureExpr or TAnyHashableErasureExpr or
|
||||
TArchetypeToSuperExpr or TArrayToPointerExpr or TBridgeFromObjCExpr or TBridgeToObjCExpr or
|
||||
TClassMetatypeToObjectExpr or TCollectionUpcastConversionExpr or
|
||||
TConditionalBridgeFromObjCExpr or TCovariantFunctionConversionExpr or
|
||||
TCovariantReturnConversionExpr or TDerivedToBaseExpr or TDestructureTupleExpr or
|
||||
@@ -1265,7 +1287,8 @@ module Synth {
|
||||
TLinearFunctionExpr or TLinearFunctionExtractOriginalExpr or
|
||||
TLinearToDifferentiableFunctionExpr or TLoadExpr or TMetatypeConversionExpr or
|
||||
TPointerToPointerExpr or TProtocolMetatypeToObjectExpr or TStringToPointerExpr or
|
||||
TUnderlyingToOpaqueExpr or TUnevaluatedInstanceExpr or TUnresolvedTypeConversionExpr;
|
||||
TUnderlyingToOpaqueExpr or TUnevaluatedInstanceExpr or TUnreachableExpr or
|
||||
TUnresolvedTypeConversionExpr;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -1698,6 +1721,14 @@ module Synth {
|
||||
result = TAbiSafeConversionExpr(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TActorIsolationErasureExpr`, if possible.
|
||||
*/
|
||||
TActorIsolationErasureExpr convertActorIsolationErasureExprFromRaw(Raw::Element e) {
|
||||
result = TActorIsolationErasureExpr(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TAnyHashableErasureExpr`, if possible.
|
||||
@@ -1878,6 +1909,14 @@ module Synth {
|
||||
result = TCovariantReturnConversionExpr(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TCurrentContextIsolationExpr`, if possible.
|
||||
*/
|
||||
TCurrentContextIsolationExpr convertCurrentContextIsolationExprFromRaw(Raw::Element e) {
|
||||
result = TCurrentContextIsolationExpr(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TDeclRefExpr`, if possible.
|
||||
@@ -2018,6 +2057,14 @@ module Synth {
|
||||
result = TExplicitClosureExpr(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TExtractFunctionIsolationExpr`, if possible.
|
||||
*/
|
||||
TExtractFunctionIsolationExpr convertExtractFunctionIsolationExprFromRaw(Raw::Element e) {
|
||||
result = TExtractFunctionIsolationExpr(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TFloatLiteralExpr`, if possible.
|
||||
@@ -2452,6 +2499,12 @@ module Synth {
|
||||
result = TUnevaluatedInstanceExpr(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TUnreachableExpr`, if possible.
|
||||
*/
|
||||
TUnreachableExpr convertUnreachableExprFromRaw(Raw::Element e) { result = TUnreachableExpr(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TUnresolvedDeclRefExpr`, if possible.
|
||||
@@ -3529,6 +3582,8 @@ module Synth {
|
||||
or
|
||||
result = convertCopyExprFromRaw(e)
|
||||
or
|
||||
result = convertCurrentContextIsolationExprFromRaw(e)
|
||||
or
|
||||
result = convertDeclRefExprFromRaw(e)
|
||||
or
|
||||
result = convertDefaultArgumentExprFromRaw(e)
|
||||
@@ -3545,6 +3600,8 @@ module Synth {
|
||||
or
|
||||
result = convertExplicitCastExprFromRaw(e)
|
||||
or
|
||||
result = convertExtractFunctionIsolationExprFromRaw(e)
|
||||
or
|
||||
result = convertForceValueExprFromRaw(e)
|
||||
or
|
||||
result = convertIdentityExprFromRaw(e)
|
||||
@@ -3643,6 +3700,8 @@ module Synth {
|
||||
TImplicitConversionExpr convertImplicitConversionExprFromRaw(Raw::Element e) {
|
||||
result = convertAbiSafeConversionExprFromRaw(e)
|
||||
or
|
||||
result = convertActorIsolationErasureExprFromRaw(e)
|
||||
or
|
||||
result = convertAnyHashableErasureExprFromRaw(e)
|
||||
or
|
||||
result = convertArchetypeToSuperExprFromRaw(e)
|
||||
@@ -3703,6 +3762,8 @@ module Synth {
|
||||
or
|
||||
result = convertUnevaluatedInstanceExprFromRaw(e)
|
||||
or
|
||||
result = convertUnreachableExprFromRaw(e)
|
||||
or
|
||||
result = convertUnresolvedTypeConversionExprFromRaw(e)
|
||||
}
|
||||
|
||||
@@ -4370,6 +4431,14 @@ module Synth {
|
||||
e = TAbiSafeConversionExpr(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TActorIsolationErasureExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertActorIsolationErasureExprToRaw(TActorIsolationErasureExpr e) {
|
||||
e = TActorIsolationErasureExpr(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TAnyHashableErasureExpr` to a raw DB element, if possible.
|
||||
@@ -4550,6 +4619,14 @@ module Synth {
|
||||
e = TCovariantReturnConversionExpr(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TCurrentContextIsolationExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertCurrentContextIsolationExprToRaw(TCurrentContextIsolationExpr e) {
|
||||
e = TCurrentContextIsolationExpr(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TDeclRefExpr` to a raw DB element, if possible.
|
||||
@@ -4690,6 +4767,14 @@ module Synth {
|
||||
e = TExplicitClosureExpr(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TExtractFunctionIsolationExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertExtractFunctionIsolationExprToRaw(TExtractFunctionIsolationExpr e) {
|
||||
e = TExtractFunctionIsolationExpr(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TFloatLiteralExpr` to a raw DB element, if possible.
|
||||
@@ -5122,6 +5207,12 @@ module Synth {
|
||||
e = TUnevaluatedInstanceExpr(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TUnreachableExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertUnreachableExprToRaw(TUnreachableExpr e) { e = TUnreachableExpr(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TUnresolvedDeclRefExpr` to a raw DB element, if possible.
|
||||
@@ -6199,6 +6290,8 @@ module Synth {
|
||||
or
|
||||
result = convertCopyExprToRaw(e)
|
||||
or
|
||||
result = convertCurrentContextIsolationExprToRaw(e)
|
||||
or
|
||||
result = convertDeclRefExprToRaw(e)
|
||||
or
|
||||
result = convertDefaultArgumentExprToRaw(e)
|
||||
@@ -6215,6 +6308,8 @@ module Synth {
|
||||
or
|
||||
result = convertExplicitCastExprToRaw(e)
|
||||
or
|
||||
result = convertExtractFunctionIsolationExprToRaw(e)
|
||||
or
|
||||
result = convertForceValueExprToRaw(e)
|
||||
or
|
||||
result = convertIdentityExprToRaw(e)
|
||||
@@ -6313,6 +6408,8 @@ module Synth {
|
||||
Raw::Element convertImplicitConversionExprToRaw(TImplicitConversionExpr e) {
|
||||
result = convertAbiSafeConversionExprToRaw(e)
|
||||
or
|
||||
result = convertActorIsolationErasureExprToRaw(e)
|
||||
or
|
||||
result = convertAnyHashableErasureExprToRaw(e)
|
||||
or
|
||||
result = convertArchetypeToSuperExprToRaw(e)
|
||||
@@ -6373,6 +6470,8 @@ module Synth {
|
||||
or
|
||||
result = convertUnevaluatedInstanceExprToRaw(e)
|
||||
or
|
||||
result = convertUnreachableExprToRaw(e)
|
||||
or
|
||||
result = convertUnresolvedTypeConversionExprToRaw(e)
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ 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.expr.internal.AbiSafeConversionExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ActorIsolationErasureExprConstructor
|
||||
import codeql.swift.elements.expr.internal.AnyHashableErasureExprConstructor
|
||||
import codeql.swift.elements.expr.internal.AppliedPropertyWrapperExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ArchetypeToSuperExprConstructor
|
||||
@@ -71,6 +72,7 @@ import codeql.swift.elements.expr.internal.ConsumeExprConstructor
|
||||
import codeql.swift.elements.expr.internal.CopyExprConstructor
|
||||
import codeql.swift.elements.expr.internal.CovariantFunctionConversionExprConstructor
|
||||
import codeql.swift.elements.expr.internal.CovariantReturnConversionExprConstructor
|
||||
import codeql.swift.elements.expr.internal.CurrentContextIsolationExprConstructor
|
||||
import codeql.swift.elements.expr.internal.DeclRefExprConstructor
|
||||
import codeql.swift.elements.expr.internal.DefaultArgumentExprConstructor
|
||||
import codeql.swift.elements.expr.internal.DerivedToBaseExprConstructor
|
||||
@@ -90,6 +92,7 @@ import codeql.swift.elements.expr.internal.ErasureExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ErrorExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ExistentialMetatypeToObjectExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ExplicitClosureExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ExtractFunctionIsolationExprConstructor
|
||||
import codeql.swift.elements.expr.internal.FloatLiteralExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ForceTryExprConstructor
|
||||
import codeql.swift.elements.expr.internal.ForceValueExprConstructor
|
||||
@@ -151,6 +154,7 @@ import codeql.swift.elements.expr.internal.TupleExprConstructor
|
||||
import codeql.swift.elements.expr.internal.TypeExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnderlyingToOpaqueExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnevaluatedInstanceExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnreachableExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnresolvedDeclRefExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnresolvedDotExprConstructor
|
||||
import codeql.swift.elements.expr.internal.UnresolvedMemberChainResultExprConstructor
|
||||
|
||||
27
swift/ql/lib/codeql/swift/generated/expr/ActorIsolationErasureExpr.qll
generated
Normal file
27
swift/ql/lib/codeql/swift/generated/expr/ActorIsolationErasureExpr.qll
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `ActorIsolationErasureExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Synth
|
||||
private import codeql.swift.generated.Raw
|
||||
import codeql.swift.elements.expr.internal.ImplicitConversionExprImpl::Impl as ImplicitConversionExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `ActorIsolationErasureExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A conversion that erases the actor isolation of an expression with `@isolated(any)` function
|
||||
* type.
|
||||
* INTERNAL: Do not reference the `Generated::ActorIsolationErasureExpr` class directly.
|
||||
* Use the subclass `ActorIsolationErasureExpr`, where the following predicates are available.
|
||||
*/
|
||||
class ActorIsolationErasureExpr extends Synth::TActorIsolationErasureExpr,
|
||||
ImplicitConversionExprImpl::ImplicitConversionExpr
|
||||
{
|
||||
override string getAPrimaryQlClass() { result = "ActorIsolationErasureExpr" }
|
||||
}
|
||||
}
|
||||
50
swift/ql/lib/codeql/swift/generated/expr/CurrentContextIsolationExpr.qll
generated
Normal file
50
swift/ql/lib/codeql/swift/generated/expr/CurrentContextIsolationExpr.qll
generated
Normal file
@@ -0,0 +1,50 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `CurrentContextIsolationExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Synth
|
||||
private import codeql.swift.generated.Raw
|
||||
import codeql.swift.elements.expr.Expr
|
||||
import codeql.swift.elements.expr.internal.ExprImpl::Impl as ExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `CurrentContextIsolationExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* An expression that extracts the actor isolation of the current context, of type `(any Actor)?`.
|
||||
* This is synthesized by the type checker and does not have any way to be expressed explicitly in
|
||||
* the source.
|
||||
* INTERNAL: Do not reference the `Generated::CurrentContextIsolationExpr` class directly.
|
||||
* Use the subclass `CurrentContextIsolationExpr`, where the following predicates are available.
|
||||
*/
|
||||
class CurrentContextIsolationExpr extends Synth::TCurrentContextIsolationExpr, ExprImpl::Expr {
|
||||
override string getAPrimaryQlClass() { result = "CurrentContextIsolationExpr" }
|
||||
|
||||
/**
|
||||
* Gets the actor of this current context isolation expression.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
Expr getImmediateActor() {
|
||||
result =
|
||||
Synth::convertExprFromRaw(Synth::convertCurrentContextIsolationExprToRaw(this)
|
||||
.(Raw::CurrentContextIsolationExpr)
|
||||
.getActor())
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the actor of this current context isolation expression.
|
||||
*/
|
||||
final Expr getActor() {
|
||||
exists(Expr immediate |
|
||||
immediate = this.getImmediateActor() and
|
||||
if exists(this.getResolveStep()) then result = immediate else result = immediate.resolve()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
56
swift/ql/lib/codeql/swift/generated/expr/ExtractFunctionIsolationExpr.qll
generated
Normal file
56
swift/ql/lib/codeql/swift/generated/expr/ExtractFunctionIsolationExpr.qll
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `ExtractFunctionIsolationExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Synth
|
||||
private import codeql.swift.generated.Raw
|
||||
import codeql.swift.elements.expr.Expr
|
||||
import codeql.swift.elements.expr.internal.ExprImpl::Impl as ExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `ExtractFunctionIsolationExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* An expression that extracts the function isolation of an expression with `@isolated(any)`
|
||||
* function type.
|
||||
*
|
||||
* For example:
|
||||
* ```
|
||||
* func foo(x: @isolated(any) () -> ()) {
|
||||
* let isolation = x.isolation
|
||||
* }
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::ExtractFunctionIsolationExpr` class directly.
|
||||
* Use the subclass `ExtractFunctionIsolationExpr`, where the following predicates are available.
|
||||
*/
|
||||
class ExtractFunctionIsolationExpr extends Synth::TExtractFunctionIsolationExpr, ExprImpl::Expr {
|
||||
override string getAPrimaryQlClass() { result = "ExtractFunctionIsolationExpr" }
|
||||
|
||||
/**
|
||||
* Gets the function expression of this extract function isolation expression.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
Expr getImmediateFunctionExpr() {
|
||||
result =
|
||||
Synth::convertExprFromRaw(Synth::convertExtractFunctionIsolationExprToRaw(this)
|
||||
.(Raw::ExtractFunctionIsolationExpr)
|
||||
.getFunctionExpr())
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the function expression of this extract function isolation expression.
|
||||
*/
|
||||
final Expr getFunctionExpr() {
|
||||
exists(Expr immediate |
|
||||
immediate = this.getImmediateFunctionExpr() and
|
||||
if exists(this.getResolveStep()) then result = immediate else result = immediate.resolve()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
26
swift/ql/lib/codeql/swift/generated/expr/UnreachableExpr.qll
generated
Normal file
26
swift/ql/lib/codeql/swift/generated/expr/UnreachableExpr.qll
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `UnreachableExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.swift.generated.Synth
|
||||
private import codeql.swift.generated.Raw
|
||||
import codeql.swift.elements.expr.internal.ImplicitConversionExprImpl::Impl as ImplicitConversionExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `UnreachableExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A conversion from the uninhabited type to any other type. It's never evaluated.
|
||||
* INTERNAL: Do not reference the `Generated::UnreachableExpr` class directly.
|
||||
* Use the subclass `UnreachableExpr`, where the following predicates are available.
|
||||
*/
|
||||
class UnreachableExpr extends Synth::TUnreachableExpr,
|
||||
ImplicitConversionExprImpl::ImplicitConversionExpr
|
||||
{
|
||||
override string getAPrimaryQlClass() { result = "UnreachableExpr" }
|
||||
}
|
||||
}
|
||||
22
swift/ql/lib/swift.dbscheme
generated
22
swift/ql/lib/swift.dbscheme
generated
@@ -778,6 +778,7 @@ arguments( //dir=expr
|
||||
| @collection_expr
|
||||
| @consume_expr
|
||||
| @copy_expr
|
||||
| @current_context_isolation_expr
|
||||
| @decl_ref_expr
|
||||
| @default_argument_expr
|
||||
| @discard_assignment_expr
|
||||
@@ -786,6 +787,7 @@ arguments( //dir=expr
|
||||
| @enum_is_case_expr
|
||||
| @error_expr
|
||||
| @explicit_cast_expr
|
||||
| @extract_function_isolation_expr
|
||||
| @force_value_expr
|
||||
| @identity_expr
|
||||
| @if_expr
|
||||
@@ -914,6 +916,11 @@ copy_exprs( //dir=expr
|
||||
int sub_expr: @expr_or_none ref
|
||||
);
|
||||
|
||||
current_context_isolation_exprs( //dir=expr
|
||||
unique int id: @current_context_isolation_expr,
|
||||
int actor: @expr_or_none ref
|
||||
);
|
||||
|
||||
decl_ref_exprs( //dir=expr
|
||||
unique int id: @decl_ref_expr,
|
||||
int decl: @decl_or_none ref
|
||||
@@ -994,6 +1001,11 @@ explicit_cast_exprs( //dir=expr
|
||||
int sub_expr: @expr_or_none ref
|
||||
);
|
||||
|
||||
extract_function_isolation_exprs( //dir=expr
|
||||
unique int id: @extract_function_isolation_expr,
|
||||
int function_expr: @expr_or_none ref
|
||||
);
|
||||
|
||||
force_value_exprs( //dir=expr
|
||||
unique int id: @force_value_expr,
|
||||
int sub_expr: @expr_or_none ref
|
||||
@@ -1022,6 +1034,7 @@ if_exprs( //dir=expr
|
||||
|
||||
@implicit_conversion_expr =
|
||||
@abi_safe_conversion_expr
|
||||
| @actor_isolation_erasure_expr
|
||||
| @any_hashable_erasure_expr
|
||||
| @archetype_to_super_expr
|
||||
| @array_to_pointer_expr
|
||||
@@ -1052,6 +1065,7 @@ if_exprs( //dir=expr
|
||||
| @string_to_pointer_expr
|
||||
| @underlying_to_opaque_expr
|
||||
| @unevaluated_instance_expr
|
||||
| @unreachable_expr
|
||||
| @unresolved_type_conversion_expr
|
||||
;
|
||||
|
||||
@@ -1306,6 +1320,10 @@ abi_safe_conversion_exprs( //dir=expr
|
||||
unique int id: @abi_safe_conversion_expr
|
||||
);
|
||||
|
||||
actor_isolation_erasure_exprs( //dir=expr
|
||||
unique int id: @actor_isolation_erasure_expr
|
||||
);
|
||||
|
||||
any_hashable_erasure_exprs( //dir=expr
|
||||
unique int id: @any_hashable_erasure_expr
|
||||
);
|
||||
@@ -1626,6 +1644,10 @@ unevaluated_instance_exprs( //dir=expr
|
||||
unique int id: @unevaluated_instance_expr
|
||||
);
|
||||
|
||||
unreachable_exprs( //dir=expr
|
||||
unique int id: @unreachable_expr
|
||||
);
|
||||
|
||||
unresolved_member_chain_result_exprs( //dir=expr
|
||||
unique int id: @unresolved_member_chain_result_expr
|
||||
);
|
||||
|
||||
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: Add `ExtracFunctionIsolationExpr`, `CurrentContextIsolationExpr`, `ActorIsolationErasureExpr` and `UnreachableExpr`.
|
||||
compatibility: full
|
||||
@@ -0,0 +1 @@
|
||||
| extract_function_isolation.swift:2:21:2:23 | ExtractFunctionIsolationExpr | hasType: | yes | getFunctionExpr: | extract_function_isolation.swift:2:21:2:21 | x |
|
||||
@@ -0,0 +1,11 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
import codeql.swift.elements
|
||||
import TestUtils
|
||||
|
||||
from ExtractFunctionIsolationExpr x, string hasType, Expr getFunctionExpr
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
(if x.hasType() then hasType = "yes" else hasType = "no") and
|
||||
getFunctionExpr = x.getFunctionExpr()
|
||||
select x, "hasType:", hasType, "getFunctionExpr:", getFunctionExpr
|
||||
@@ -0,0 +1 @@
|
||||
| extract_function_isolation.swift:2:21:2:23 | ExtractFunctionIsolationExpr | (any Actor)? |
|
||||
@@ -0,0 +1,7 @@
|
||||
// generated by codegen/codegen.py, do not edit
|
||||
import codeql.swift.elements
|
||||
import TestUtils
|
||||
|
||||
from ExtractFunctionIsolationExpr x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getType()
|
||||
@@ -0,0 +1,3 @@
|
||||
func foo(x: @isolated(any) () -> ()) {
|
||||
let isolation = x.isolation
|
||||
}
|
||||
@@ -1425,3 +1425,41 @@ class DiscardStmt(Stmt):
|
||||
```
|
||||
"""
|
||||
sub_expr: Expr | child
|
||||
|
||||
|
||||
class ExtractFunctionIsolationExpr(Expr):
|
||||
"""
|
||||
An expression that extracts the function isolation of an expression with `@isolated(any)`
|
||||
function type.
|
||||
|
||||
For example:
|
||||
```
|
||||
func foo(x: @isolated(any) () -> ()) {
|
||||
let isolation = x.isolation
|
||||
}
|
||||
```
|
||||
"""
|
||||
function_expr: Expr | child
|
||||
|
||||
|
||||
@qltest.skip
|
||||
class CurrentContextIsolationExpr(Expr):
|
||||
"""
|
||||
An expression that extracts the actor isolation of the current context, of type `(any Actor)?`.
|
||||
This is synthesized by the type checker and does not have any way to be expressed explicitly in
|
||||
the source.
|
||||
"""
|
||||
actor: Expr
|
||||
|
||||
|
||||
class ActorIsolationErasureExpr(ImplicitConversionExpr):
|
||||
"""
|
||||
A conversion that erases the actor isolation of an expression with `@isolated(any)` function
|
||||
type.
|
||||
"""
|
||||
|
||||
|
||||
class UnreachableExpr(ImplicitConversionExpr):
|
||||
"""
|
||||
A conversion from the uninhabited type to any other type. It's never evaluated.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user