diff --git a/swift/codegen/generators/qlgen.py b/swift/codegen/generators/qlgen.py index 8a5138cb7d5..b473ad6dde6 100755 --- a/swift/codegen/generators/qlgen.py +++ b/swift/codegen/generators/qlgen.py @@ -60,6 +60,7 @@ abbreviations = { "param": "parameter", "int": "integer", "var": "variable", + "ref": "reference", } abbreviations.update({f"{k}s": f"{v}s" for k, v in abbreviations.items()}) diff --git a/swift/ql/.generated.list b/swift/ql/.generated.list index 72c12e3e237..c8952015f35 100644 --- a/swift/ql/.generated.list +++ b/swift/ql/.generated.list @@ -457,7 +457,7 @@ ql/lib/codeql/swift/generated/expr/ConditionalCheckedCastExpr.qll 92a999dd1dcc1f ql/lib/codeql/swift/generated/expr/ConstructorRefCallExpr.qll d0662d960b78c3cf7e81cf5b619aa9e2a906d35c094ae32702da96720354fe4f d0662d960b78c3cf7e81cf5b619aa9e2a906d35c094ae32702da96720354fe4f ql/lib/codeql/swift/generated/expr/CovariantFunctionConversionExpr.qll b749118590163eafbd538e71e4c903668451f52ae0dabbb13e504e7b1fefa9e1 d3af8e3beb6e395f537348d875978dfae119243dc3495c48a7c83b056aff2f6c ql/lib/codeql/swift/generated/expr/CovariantReturnConversionExpr.qll f1b409f0bf54b149deb1a40fbe337579a0f6eb2498ef176ef5f64bc53e94e2fe a32992597057657c7bbf13c809db67844b834668e8d2804adabcf6187d81c244 -ql/lib/codeql/swift/generated/expr/DeclRefExpr.qll 454d351282678580791ddb567193518822d9b44fa1f94f53a99c279a984c1b1f e75a7fbcc39c3d62b9f5929777240f78e227bef0a3f5ab819b9f860537339889 +ql/lib/codeql/swift/generated/expr/DeclRefExpr.qll eee2d4468f965e8e6a6727a3e04158de7f88731d2a2384a33e72e88b9e46a59a 54a91a444e5a0325cd69e70f5a58b8f7aa20aaa3d9b1451b97f491c109a1cd74 ql/lib/codeql/swift/generated/expr/DefaultArgumentExpr.qll b38015d25ef840298a284b3f4e20cd444987474545544dc451dd5e12c3783f20 afc581e2127983faae125fd58b24d346bfee34d9a474e6d499e4606b672fe5f0 ql/lib/codeql/swift/generated/expr/DerivedToBaseExpr.qll 5f371b5b82262efb416af1a54073079dcf857f7a744010294f79a631c76c0e68 5f371b5b82262efb416af1a54073079dcf857f7a744010294f79a631c76c0e68 ql/lib/codeql/swift/generated/expr/DestructureTupleExpr.qll 1214d25d0fa6a7c2f183d9b12c97c679e9b92420ca1970d802ea1fe84b42ccc8 1214d25d0fa6a7c2f183d9b12c97c679e9b92420ca1970d802ea1fe84b42ccc8 @@ -505,7 +505,7 @@ ql/lib/codeql/swift/generated/expr/LoadExpr.qll 90b9ba4c96c26c476c3692b1200c3107 ql/lib/codeql/swift/generated/expr/LookupExpr.qll 4b8c4f710e3cbdeb684a07c105f48915782e5de002da87f693ae1e07f3b67031 eceb13729282b77a44317c39f9206d9c1467bc93633b7bac5ada97ea13a773fe ql/lib/codeql/swift/generated/expr/MagicIdentifierLiteralExpr.qll 16f0050128caf916506b1f7372dc225a12809a60b5b00f108705fcdfce3344a8 c064778526a5854bdf8cdbf4b64ad680b60df9fe71ec7a2d9aa6c36a7c4e5b31 ql/lib/codeql/swift/generated/expr/MakeTemporarilyEscapableExpr.qll d23bd9ea3b13869d7a7f7eef3c3d1c3c156d384b72c65867a0b955bc517da775 f2fd167ac40f01c092b2b443af1557c92dac32074506f2195d32f60b0e0547d8 -ql/lib/codeql/swift/generated/expr/MemberRefExpr.qll 0ece9ffbfd4b15722aa3870014a46afdbf1b1382972fb366d741fafb5473e3de fcb57bd65a94ed4214730339c4ed2b167ec22a3dc9017399596f9b26bdeb95cd +ql/lib/codeql/swift/generated/expr/MemberRefExpr.qll e7db805b904d9b5d1e2bc2c171656e9da58f02a585127c45f52f7f8e691dc2e5 b44b5208e0b72060527a6fdb24b17b208f2263d78690d13548fba937fe0db3cd ql/lib/codeql/swift/generated/expr/MetatypeConversionExpr.qll 714ecbc8ac51fdaaa4075388f20fe5063ead9264ca20c4ab8864c48364ef4b42 714ecbc8ac51fdaaa4075388f20fe5063ead9264ca20c4ab8864c48364ef4b42 ql/lib/codeql/swift/generated/expr/MethodLookupExpr.qll 357bc9ab24830ab60c1456c836e8449ce30ee67fe04e2f2e9437b3211b3b9757 687a3b3e6aeab2d4185f59fc001b3a69e83d96023b0589330a13eeefe3502a80 ql/lib/codeql/swift/generated/expr/NilLiteralExpr.qll 6f44106bc5396c87681676fc3e1239fe052d1a481d0a854afa8b66369668b058 6f44106bc5396c87681676fc3e1239fe052d1a481d0a854afa8b66369668b058 @@ -517,8 +517,8 @@ ql/lib/codeql/swift/generated/expr/OpaqueValueExpr.qll 354f23d00d5ea2e734fd19213 ql/lib/codeql/swift/generated/expr/OpenExistentialExpr.qll 55cfe105f217a4bdb15d1392705030f1d7dec8c082cafa875301f81440ec0b7b 168389014cddb8fd738e2e84ddd22983e5c620c3c843de51976171038d95adc0 ql/lib/codeql/swift/generated/expr/OptionalEvaluationExpr.qll 000b00afe1dcdec43f756f699fd3e38212884eab14bf90e3c276d4ca9cb444a6 177bd4bfbb44e9f5aeaaf283b6537f3146900c1376854607827d224a81456f59 ql/lib/codeql/swift/generated/expr/OptionalTryExpr.qll f0c8dff90faee4fbf07772efda53afe1acc1fd148c16ee4d85a1502a36178e71 f0c8dff90faee4fbf07772efda53afe1acc1fd148c16ee4d85a1502a36178e71 -ql/lib/codeql/swift/generated/expr/OtherConstructorDeclRefExpr.qll b40c18df25bdb08f159eb34d685d2e27fbba2c5e518b7d8b236f9913d76029cb 30f743385b8a47c36ec54c2c13b42fc6937568aa3cace5f075b51c02a64ca506 -ql/lib/codeql/swift/generated/expr/OverloadedDeclRefExpr.qll 3748583ec8eca5251002f09b0e9f0e6dea8d12ab3caad9a5d959a25f93b0642b 93190bcadc2d6d4d5890db633b20b5968367f003a612a17ee489003fbda2c3d6 +ql/lib/codeql/swift/generated/expr/OtherConstructorDeclRefExpr.qll c77bf23292e9c8a151ef6baf667a06a2b6a57d05b0bd0a09177522ce5b8c7c33 011d84d72d82ad318697f8af035807a87af5745d5ec9c1ad32a0af9531f8c79e +ql/lib/codeql/swift/generated/expr/OverloadedDeclRefExpr.qll 355f2c3c8f23345198ebfffba24e5b465ebdf6cd1ae44290bd211536377a6256 9436286072c690dff1229cddf6837d50704e8d4f1c710803495580cab37a0a1b ql/lib/codeql/swift/generated/expr/ParenExpr.qll f3fb35017423ee7360cab737249c01623cafc5affe8845f3898697d3bd2ef9d7 f3fb35017423ee7360cab737249c01623cafc5affe8845f3898697d3bd2ef9d7 ql/lib/codeql/swift/generated/expr/PointerToPointerExpr.qll 7d6fa806bba09804705f9cef5be66e09cbbbbda9a4c5eae75d4380f1527bb1bd 7d6fa806bba09804705f9cef5be66e09cbbbbda9a4c5eae75d4380f1527bb1bd ql/lib/codeql/swift/generated/expr/PostfixUnaryExpr.qll d1094c42aa03158bf89bace09b0a92b3056d560ebf69ddbf286accce7940d3ab d1094c42aa03158bf89bace09b0a92b3056d560ebf69ddbf286accce7940d3ab @@ -532,7 +532,7 @@ ql/lib/codeql/swift/generated/expr/SequenceExpr.qll 45f976cbc3ce6b3278955a76a55c ql/lib/codeql/swift/generated/expr/StringLiteralExpr.qll f420c5cd51a223b6f98177147967266e0094a5718ba2d57ae2d3acbb64bbb4b6 30d6dab2a93fd95e652a700902c4d106fecfce13880c2ece565de29f2504bedf ql/lib/codeql/swift/generated/expr/StringToPointerExpr.qll ef69b570aa90697d438f5787a86797955b4b2f985960b5859a7bd13b9ecb9cd3 ef69b570aa90697d438f5787a86797955b4b2f985960b5859a7bd13b9ecb9cd3 ql/lib/codeql/swift/generated/expr/SubscriptExpr.qll 6d8717acbdbb0d53a6dedd98809e17baa42c88e62fab3b6d4da9d1ce477d15c3 6d568c6adb2b676b1945aa3c0964b26e825c9464156f296f3ec0d5b7ece90521 -ql/lib/codeql/swift/generated/expr/SuperRefExpr.qll 3cc44a550ecab7d11b591082a3ad1ac88207d55cd694942ce44a90c576517482 d1712eed916f83d3e1b21c6af944ef56df2b82d163b9b3cb8dc793d48305fa6c +ql/lib/codeql/swift/generated/expr/SuperRefExpr.qll 60de86a46f238dc32ec1ed06a543917147b7a4b9184da99fce153e7fc6a43b7c 798ca560ed9511775b8fad0c772bbcd8a29bebc65996dec1252716087dc110a0 ql/lib/codeql/swift/generated/expr/TapExpr.qll 0a2cbaaec596fa5aabb7acc3cab23bbf1bb1173ea4f240634698d5a89686d014 2267243198f67bb879d639f566e9729cfa9e3a3e205ffe6ff3782b7017a8bf7f ql/lib/codeql/swift/generated/expr/TryExpr.qll e6619905d9b2e06708c3bf41dace8c4e6332903f7111b3a59609d2bb7a6483ee e6619905d9b2e06708c3bf41dace8c4e6332903f7111b3a59609d2bb7a6483ee ql/lib/codeql/swift/generated/expr/TupleElementExpr.qll 764371c3b6189f21dcdc8d87f9e6f6ba24e3f2ef0b8c35b8ce8c3b7d4feb7370 25f4f2b747b3887edd82d5eb3fa9ba1b45e7921d2745bfee06300db22a35c291 @@ -540,7 +540,7 @@ ql/lib/codeql/swift/generated/expr/TupleExpr.qll f271bdfca86c65d93851f8467a3ebbb ql/lib/codeql/swift/generated/expr/TypeExpr.qll 132096079d0da05ac0e06616e4165c32c5f7e3bc338e37930bb81f4d26d7caea edd58d31ce921a8f7d09c49de3683d5170dfed636184bafc862bbfd78c474ca6 ql/lib/codeql/swift/generated/expr/UnderlyingToOpaqueExpr.qll 13d6c7a16ec0c4c92d12e052437dfa84274394ee8a4ca9b2c9e59514564dc683 13d6c7a16ec0c4c92d12e052437dfa84274394ee8a4ca9b2c9e59514564dc683 ql/lib/codeql/swift/generated/expr/UnevaluatedInstanceExpr.qll 21dedc617838eed25a8d3a011296fda78f99aee0e8ae2c06789484da6886cfea 21dedc617838eed25a8d3a011296fda78f99aee0e8ae2c06789484da6886cfea -ql/lib/codeql/swift/generated/expr/UnresolvedDeclRefExpr.qll 3469931227ad5ea0c09226e866f2820bfed3636caa2250a1241c2d396e39e7cb b6a7934e17ac4799409724d1438582a372c6e8395cb142aaf101c66b04cc8cf7 +ql/lib/codeql/swift/generated/expr/UnresolvedDeclRefExpr.qll ec9c06fd24029fb2a35faa579cb5d4504900a605a54fdfc60ee5a9799d80c7c9 f1d258cc03d19099089f63734c54ac5aa98c72cf7c04664b49a03f879555e893 ql/lib/codeql/swift/generated/expr/UnresolvedDotExpr.qll d6bf4bf1a3c4732f2ca3feef34e8482fc6707ac387a2d6f75cb5dde2e742cc38 d58048081b4c2ed582749b03ae8158d9aa0786f1f0bf2988f2339fee2d42e13b ql/lib/codeql/swift/generated/expr/UnresolvedMemberChainResultExpr.qll ce900badb9484eb2202c4df5ab11de7a3765e8e5eefaa9639779500942790ef1 8ac96bb5d41e4808300838c0f6b8cd23b6bb9bb1ca777994d11840dc7a343ba3 ql/lib/codeql/swift/generated/expr/UnresolvedMemberExpr.qll 6604f7eea32c151322c446c58e91ff68f3cfbf0fc040ccee046669bcc59fb42d c7738e6b909cb621ac109235ba13ede67a10b32894fd1a5114b16d48d6e9b606 diff --git a/swift/ql/lib/codeql/swift/generated/expr/DeclRefExpr.qll b/swift/ql/lib/codeql/swift/generated/expr/DeclRefExpr.qll index 1c95bbb9555..9a429e870fe 100644 --- a/swift/ql/lib/codeql/swift/generated/expr/DeclRefExpr.qll +++ b/swift/ql/lib/codeql/swift/generated/expr/DeclRefExpr.qll @@ -10,7 +10,7 @@ module Generated { override string getAPrimaryQlClass() { result = "DeclRefExpr" } /** - * Gets the declaration of this declaration ref expression. + * Gets the declaration of this declaration reference 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. @@ -21,12 +21,12 @@ module Generated { } /** - * Gets the declaration of this declaration ref expression. + * Gets the declaration of this declaration reference expression. */ final Decl getDecl() { result = getImmediateDecl().resolve() } /** - * Gets the `index`th replacement type of this declaration ref expression (0-based). + * Gets the `index`th replacement type of this declaration reference expression (0-based). * * 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. @@ -39,47 +39,47 @@ module Generated { } /** - * Gets the `index`th replacement type of this declaration ref expression (0-based). + * Gets the `index`th replacement type of this declaration reference expression (0-based). */ final Type getReplacementType(int index) { result = getImmediateReplacementType(index).resolve() } /** - * Gets any of the replacement types of this declaration ref expression. + * Gets any of the replacement types of this declaration reference expression. */ final Type getAReplacementType() { result = getReplacementType(_) } /** - * Gets the number of replacement types of this declaration ref expression. + * Gets the number of replacement types of this declaration reference expression. */ final int getNumberOfReplacementTypes() { result = count(int i | exists(getReplacementType(i))) } /** - * Holds if this declaration ref expression has direct to storage semantics. + * Holds if this declaration reference expression has direct to storage semantics. */ predicate hasDirectToStorageSemantics() { Synth::convertDeclRefExprToRaw(this).(Raw::DeclRefExpr).hasDirectToStorageSemantics() } /** - * Holds if this declaration ref expression has direct to implementation semantics. + * Holds if this declaration reference expression has direct to implementation semantics. */ predicate hasDirectToImplementationSemantics() { Synth::convertDeclRefExprToRaw(this).(Raw::DeclRefExpr).hasDirectToImplementationSemantics() } /** - * Holds if this declaration ref expression has ordinary semantics. + * Holds if this declaration reference expression has ordinary semantics. */ predicate hasOrdinarySemantics() { Synth::convertDeclRefExprToRaw(this).(Raw::DeclRefExpr).hasOrdinarySemantics() } /** - * Holds if this declaration ref expression has distributed thunk semantics. + * Holds if this declaration reference expression has distributed thunk semantics. */ predicate hasDistributedThunkSemantics() { Synth::convertDeclRefExprToRaw(this).(Raw::DeclRefExpr).hasDistributedThunkSemantics() diff --git a/swift/ql/lib/codeql/swift/generated/expr/MemberRefExpr.qll b/swift/ql/lib/codeql/swift/generated/expr/MemberRefExpr.qll index 4f12da0b1fa..442033f24b1 100644 --- a/swift/ql/lib/codeql/swift/generated/expr/MemberRefExpr.qll +++ b/swift/ql/lib/codeql/swift/generated/expr/MemberRefExpr.qll @@ -8,14 +8,14 @@ module Generated { override string getAPrimaryQlClass() { result = "MemberRefExpr" } /** - * Holds if this member ref expression has direct to storage semantics. + * Holds if this member reference expression has direct to storage semantics. */ predicate hasDirectToStorageSemantics() { Synth::convertMemberRefExprToRaw(this).(Raw::MemberRefExpr).hasDirectToStorageSemantics() } /** - * Holds if this member ref expression has direct to implementation semantics. + * Holds if this member reference expression has direct to implementation semantics. */ predicate hasDirectToImplementationSemantics() { Synth::convertMemberRefExprToRaw(this) @@ -24,14 +24,14 @@ module Generated { } /** - * Holds if this member ref expression has ordinary semantics. + * Holds if this member reference expression has ordinary semantics. */ predicate hasOrdinarySemantics() { Synth::convertMemberRefExprToRaw(this).(Raw::MemberRefExpr).hasOrdinarySemantics() } /** - * Holds if this member ref expression has distributed thunk semantics. + * Holds if this member reference expression has distributed thunk semantics. */ predicate hasDistributedThunkSemantics() { Synth::convertMemberRefExprToRaw(this).(Raw::MemberRefExpr).hasDistributedThunkSemantics() diff --git a/swift/ql/lib/codeql/swift/generated/expr/OtherConstructorDeclRefExpr.qll b/swift/ql/lib/codeql/swift/generated/expr/OtherConstructorDeclRefExpr.qll index fd21b9cbba4..88daccbcebd 100644 --- a/swift/ql/lib/codeql/swift/generated/expr/OtherConstructorDeclRefExpr.qll +++ b/swift/ql/lib/codeql/swift/generated/expr/OtherConstructorDeclRefExpr.qll @@ -9,7 +9,7 @@ module Generated { override string getAPrimaryQlClass() { result = "OtherConstructorDeclRefExpr" } /** - * Gets the constructor declaration of this other constructor declaration ref expression. + * Gets the constructor declaration of this other constructor declaration reference 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. @@ -22,7 +22,7 @@ module Generated { } /** - * Gets the constructor declaration of this other constructor declaration ref expression. + * Gets the constructor declaration of this other constructor declaration reference expression. */ final ConstructorDecl getConstructorDecl() { result = getImmediateConstructorDecl().resolve() } } diff --git a/swift/ql/lib/codeql/swift/generated/expr/OverloadedDeclRefExpr.qll b/swift/ql/lib/codeql/swift/generated/expr/OverloadedDeclRefExpr.qll index 02010bf0af2..6edacb1eeef 100644 --- a/swift/ql/lib/codeql/swift/generated/expr/OverloadedDeclRefExpr.qll +++ b/swift/ql/lib/codeql/swift/generated/expr/OverloadedDeclRefExpr.qll @@ -14,7 +14,7 @@ module Generated { override string getAPrimaryQlClass() { result = "OverloadedDeclRefExpr" } /** - * Gets the `index`th possible declaration of this overloaded declaration ref expression (0-based). + * Gets the `index`th possible declaration of this overloaded declaration reference expression (0-based). * * 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. @@ -27,19 +27,19 @@ module Generated { } /** - * Gets the `index`th possible declaration of this overloaded declaration ref expression (0-based). + * Gets the `index`th possible declaration of this overloaded declaration reference expression (0-based). */ final ValueDecl getPossibleDeclaration(int index) { result = getImmediatePossibleDeclaration(index).resolve() } /** - * Gets any of the possible declarations of this overloaded declaration ref expression. + * Gets any of the possible declarations of this overloaded declaration reference expression. */ final ValueDecl getAPossibleDeclaration() { result = getPossibleDeclaration(_) } /** - * Gets the number of possible declarations of this overloaded declaration ref expression. + * Gets the number of possible declarations of this overloaded declaration reference expression. */ final int getNumberOfPossibleDeclarations() { result = count(int i | exists(getPossibleDeclaration(i))) diff --git a/swift/ql/lib/codeql/swift/generated/expr/SuperRefExpr.qll b/swift/ql/lib/codeql/swift/generated/expr/SuperRefExpr.qll index 3496e6800ac..2ee8351e3fb 100644 --- a/swift/ql/lib/codeql/swift/generated/expr/SuperRefExpr.qll +++ b/swift/ql/lib/codeql/swift/generated/expr/SuperRefExpr.qll @@ -9,7 +9,7 @@ module Generated { override string getAPrimaryQlClass() { result = "SuperRefExpr" } /** - * Gets the self of this super ref expression. + * Gets the self of this super reference 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. @@ -22,7 +22,7 @@ module Generated { } /** - * Gets the self of this super ref expression. + * Gets the self of this super reference expression. */ final VarDecl getSelf() { result = getImmediateSelf().resolve() } } diff --git a/swift/ql/lib/codeql/swift/generated/expr/UnresolvedDeclRefExpr.qll b/swift/ql/lib/codeql/swift/generated/expr/UnresolvedDeclRefExpr.qll index 44714ddc239..c821cc3b76c 100644 --- a/swift/ql/lib/codeql/swift/generated/expr/UnresolvedDeclRefExpr.qll +++ b/swift/ql/lib/codeql/swift/generated/expr/UnresolvedDeclRefExpr.qll @@ -9,7 +9,7 @@ module Generated { override string getAPrimaryQlClass() { result = "UnresolvedDeclRefExpr" } /** - * Gets the name of this unresolved declaration ref expression, if it exists. + * Gets the name of this unresolved declaration reference expression, if it exists. */ string getName() { result = Synth::convertUnresolvedDeclRefExprToRaw(this).(Raw::UnresolvedDeclRefExpr).getName()