Compare commits

..

1 Commits

Author SHA1 Message Date
Dave Bartolomeo
e0a6391cca Revert "Go: Make models-as-data source models for variadic parameters work" 2025-01-07 13:30:29 -05:00
545 changed files with 13570 additions and 48807 deletions

254
Cargo.lock generated
View File

@@ -92,9 +92,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.95"
version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
[[package]]
name = "argfile"
@@ -116,14 +116,11 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
name = "ast-generator"
version = "0.1.0"
dependencies = [
"anyhow",
"either",
"itertools 0.14.0",
"mustache",
"itertools 0.12.1",
"proc-macro2",
"quote",
"ra_ap_stdx",
"serde",
"ungrammar",
]
@@ -171,9 +168,9 @@ dependencies = [
[[package]]
name = "bstr"
version = "1.11.3"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0"
checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8"
dependencies = [
"memchr",
"serde",
@@ -187,9 +184,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "bytemuck"
version = "1.21.0"
version = "1.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a"
[[package]]
name = "byteorder"
@@ -231,9 +228,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.7"
version = "1.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7"
checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e"
dependencies = [
"shlex",
]
@@ -318,9 +315,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.24"
version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9560b07a799281c7e0958b9296854d6fafd4c5f31444a7e5bb1ad6dde5ccf1bd"
checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84"
dependencies = [
"clap_builder",
"clap_derive",
@@ -328,9 +325,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.24"
version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "874e0dd3eb68bf99058751ac9712f622e61e6f393a94f7128fa26e3f02f5c7cd"
checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838"
dependencies = [
"anstream",
"anstyle",
@@ -340,9 +337,9 @@ dependencies = [
[[package]]
name = "clap_derive"
version = "4.5.24"
version = "4.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c"
checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -414,8 +411,8 @@ dependencies = [
"dunce",
"figment",
"glob",
"itertools 0.14.0",
"log 0.4.22",
"itertools 0.13.0",
"log",
"num-traits",
"ra_ap_base_db",
"ra_ap_cfg",
@@ -588,7 +585,7 @@ version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5"
dependencies = [
"log 0.4.22",
"log",
]
[[package]]
@@ -746,9 +743,9 @@ dependencies = [
[[package]]
name = "glob"
version = "0.3.2"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "globset"
@@ -758,7 +755,7 @@ checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19"
dependencies = [
"aho-corasick",
"bstr",
"log 0.4.22",
"log",
"regex-automata 0.4.9",
"regex-syntax 0.8.5",
]
@@ -925,9 +922,9 @@ dependencies = [
[[package]]
name = "itertools"
version = "0.14.0"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
"either",
]
@@ -1023,15 +1020,6 @@ dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.22",
]
[[package]]
name = "log"
version = "0.4.22"
@@ -1084,7 +1072,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"log 0.4.22",
"log",
"wasi",
"windows-sys 0.48.0",
]
@@ -1098,16 +1086,6 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "mustache"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51956ef1c5d20a1384524d91e616fb44dfc7d8f249bf696d49c97dd3289ecab5"
dependencies = [
"log 0.3.9",
"serde",
]
[[package]]
name = "nohash-hasher"
version = "0.2.0"
@@ -1127,7 +1105,7 @@ dependencies = [
"inotify",
"kqueue",
"libc",
"log 0.4.22",
"log",
"mio",
"walkdir",
"windows-sys 0.48.0",
@@ -1272,9 +1250,9 @@ dependencies = [
[[package]]
name = "pin-project-lite"
version = "0.2.16"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
[[package]]
name = "powerfmt"
@@ -1315,18 +1293,18 @@ dependencies = [
[[package]]
name = "quote"
version = "1.0.38"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
[[package]]
name = "ra-ap-rustc_abi"
version = "0.87.0"
version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28b782af0a7a8df16ddf43cd70da9f17bc3b1ce712c9e4992b6edb16f5f53632"
checksum = "613760a3071b25a67a8d7bc97b37c7fd4722562e9479137b83ae9cf8f8c1601a"
dependencies = [
"bitflags 2.6.0",
"ra-ap-rustc_index",
@@ -1335,19 +1313,20 @@ dependencies = [
[[package]]
name = "ra-ap-rustc_index"
version = "0.87.0"
version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce5742f134960482f543b35ecebec3cacc6d79a9a685713518b4d8d70c5f9aa8"
checksum = "5b2bc6b4ecede8ff28295041e22c2e66853f8e0125990c05135bad3c30bad12c"
dependencies = [
"arrayvec",
"ra-ap-rustc_index_macros",
"smallvec",
]
[[package]]
name = "ra-ap-rustc_index_macros"
version = "0.87.0"
version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7ea011fcf68309a8835ad01d91c032cb18444617b00e2cab21d45b208164441"
checksum = "2374a39fb2d92d0509178c2b442eadca3cc10e403ef9729a040c1855b08ff261"
dependencies = [
"proc-macro2",
"quote",
@@ -1356,9 +1335,9 @@ dependencies = [
[[package]]
name = "ra-ap-rustc_lexer"
version = "0.87.0"
version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb76f0a4d4c20859e41f0a23bff0f37ab9ca9171c214a6c7dd72ea69434865dc"
checksum = "5a2cf8e48b69af3ecc29ed3449892e8a999111d2f75212a78aa242e117cf1711"
dependencies = [
"unicode-properties",
"unicode-xid",
@@ -1366,9 +1345,9 @@ dependencies = [
[[package]]
name = "ra-ap-rustc_parse_format"
version = "0.87.0"
version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06080bd35078305421a62da77f3c128482d8d44441b6da8ce9d146d1cd9cdb5b"
checksum = "8d6f59a22b559263c5c42747ae362cf5d4fb272293fa119a4623f8ec288f9656"
dependencies = [
"ra-ap-rustc_index",
"ra-ap-rustc_lexer",
@@ -1376,9 +1355,9 @@ dependencies = [
[[package]]
name = "ra-ap-rustc_pattern_analysis"
version = "0.87.0"
version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68a3154fe4c20c177d7b3c678a2d3a97aba0cca156ddef88959915041889daf0"
checksum = "a7d0575b54ffe09bc5d2f158454bc05f0c30c01d9992310965f854be50ae22b8"
dependencies = [
"ra-ap-rustc_index",
"rustc-hash 2.1.0",
@@ -1389,9 +1368,9 @@ dependencies = [
[[package]]
name = "ra_ap_base_db"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55bd06c212246716572baf2babd2f4e8b2bbfedccdb2deb5107dc67f0cd9f727"
checksum = "321b770750ff90b03af539ac6d47ca46208f6f747be97c0a4aaca3a428447c8f"
dependencies = [
"la-arena",
"lz4_flex",
@@ -1410,9 +1389,9 @@ dependencies = [
[[package]]
name = "ra_ap_cfg"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b507e0a9d182ac490400992264006b057d24f26164fb015a4927bedf4381d9f"
checksum = "5023f50ebcf3656d85b96565dac56d50cc3e3d959c41592f457d2230d7be706a"
dependencies = [
"ra_ap_intern",
"ra_ap_tt",
@@ -1420,17 +1399,11 @@ dependencies = [
"tracing",
]
[[package]]
name = "ra_ap_edition"
version = "0.0.257"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "287c134d67e3bfb606211b039acc711c3dfd74b61dc570beb18556901d2a4cde"
[[package]]
name = "ra_ap_hir"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf94ce7ef4564b34584ddecc20c948c746370256c1dd96babe1dff06f9992821"
checksum = "d07a9a085cf581d5f503aa467d32bbd1e5e7f94a3e86f881ca9c19b379570c62"
dependencies = [
"arrayvec",
"either",
@@ -1453,9 +1426,9 @@ dependencies = [
[[package]]
name = "ra_ap_hir_def"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95b60cb43d1dd97c6288436277174f09440a81e56c42c9c00b3747669ec18933"
checksum = "825c47fec7aab22c38ad9eba1d76102a95a6eb089e85b4e58308089d056c3cdc"
dependencies = [
"arrayvec",
"bitflags 2.6.0",
@@ -1490,9 +1463,9 @@ dependencies = [
[[package]]
name = "ra_ap_hir_expand"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e2884baf95b2ab8b7f6d88e0b3d3dcf9bc9c9fede8b6353cca1f93ec0db02df"
checksum = "1084b708f90de31888deb6e7f9cda5ebb8e6a59484143a3df0a4007dcf496b17"
dependencies = [
"cov-mark",
"either",
@@ -1518,9 +1491,9 @@ dependencies = [
[[package]]
name = "ra_ap_hir_ty"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "562c8a0bf46e3ace2493b8c42b6cfb506a6b992e2376e3f1b18b0252bf8b226b"
checksum = "400a42e442b6d8f64adea48a8c9e39f76a1b9ed9964fd40222bd2d7cfe0a5a79"
dependencies = [
"arrayvec",
"bitflags 2.6.0",
@@ -1558,9 +1531,9 @@ dependencies = [
[[package]]
name = "ra_ap_ide_db"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d16df71464447314e043790d407246af3d692815cd826bbfab9318ba50b0543a"
checksum = "d4ced45b107a8f4c1a4cee68b270d08832327b34ad0bf7794879342ac280bc8b"
dependencies = [
"arrayvec",
"bitflags 2.6.0",
@@ -1589,9 +1562,9 @@ dependencies = [
[[package]]
name = "ra_ap_intern"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29dd636c9c7c0b3ac0736a8e6e31202cae7b0b378ac1a8d73dd2c1f71c5931a4"
checksum = "e5432d6cf7382c06dab31b6c1772446c8576dd19fcbc007bc8a6fd8bca3d424d"
dependencies = [
"dashmap",
"hashbrown 0.14.5",
@@ -1602,15 +1575,15 @@ dependencies = [
[[package]]
name = "ra_ap_limit"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d1d98e79549c0a75f35d534042cbb3358a498985726bd5ae8f8f420e323a6ea"
checksum = "822501c9f88830865ebedf944130dbe0603fa8d30a5da90f3224c1dcca2660de"
[[package]]
name = "ra_ap_load-cargo"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d448f55f96ac9c5ecfdea9261bc122f9b586f4e43b8fb53e62a54a11090d479"
checksum = "2d5b002bcda197a4e9442c827dc86305d8fc1820fbbcb9814ff9bbc2c50f4e9c"
dependencies = [
"anyhow",
"crossbeam-channel",
@@ -1630,9 +1603,9 @@ dependencies = [
[[package]]
name = "ra_ap_mbe"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ff107e50b96ceacd2046e9c1ffae526721f14a6e5c6671dff2be8ad6252fb23"
checksum = "b4fce40b490b6bbca3d033f4cbf32ef07069423aa3edc1e00ec26ddabf503866"
dependencies = [
"arrayvec",
"cov-mark",
@@ -1651,33 +1624,34 @@ dependencies = [
[[package]]
name = "ra_ap_parser"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af7c6b15845145bc4f1351c4e6f3a06c3c390dfc0a8fd1e40ee3f05b6f73ba77"
checksum = "573c14046174e3ef03a9d73841dbc52fd1d6224fffd1a0713aef95b45e024f75"
dependencies = [
"drop_bomb",
"ra-ap-rustc_lexer",
"ra_ap_edition",
"ra_ap_limit",
"tracing",
]
[[package]]
name = "ra_ap_paths"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01e41f198abdce6161d071fb88fb906189f9a6ee55dd7cfa1ba7bf5da41b2cd2"
checksum = "57aa6e3d7c45806434cdee09aa74b561723552732e8b089213fe821ae84404ec"
dependencies = [
"camino",
"serde",
]
[[package]]
name = "ra_ap_proc_macro_api"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c719165f2e0e42706644e223f3b80dbab41061c4f60132d4a6a282bb67df6ef2"
checksum = "79d9595e05b422f3258c51f9a529129c9a59f99037deac652ff2cdd0c97e0bda"
dependencies = [
"indexmap 2.7.0",
"ra_ap_base_db",
"ra_ap_intern",
"ra_ap_paths",
"ra_ap_span",
@@ -1685,16 +1659,15 @@ dependencies = [
"ra_ap_tt",
"rustc-hash 2.1.0",
"serde",
"serde_derive",
"serde_json",
"tracing",
]
[[package]]
name = "ra_ap_profile"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43cf9a02881c4ce8107d2eb7454a4d386438fc99ee5bba021ff829b76cf29807"
checksum = "459551d7e5a6dda9204c3741215c1f6a97cf6f4553e3c29294f7f8ac0ec91f57"
dependencies = [
"cfg-if",
"libc",
@@ -1704,9 +1677,9 @@ dependencies = [
[[package]]
name = "ra_ap_project_model"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9238f0e90f2f9e7ab6a8c27916326668ab9d0971a1131b3d2ce51d806077af6a"
checksum = "171aacd6d1642f9d821f27fc318a503cfe10c5c6294193c401e991266e38a583"
dependencies = [
"anyhow",
"cargo_metadata",
@@ -1722,7 +1695,6 @@ dependencies = [
"rustc-hash 2.1.0",
"semver",
"serde",
"serde_derive",
"serde_json",
"tracing",
"triomphe",
@@ -1730,9 +1702,9 @@ dependencies = [
[[package]]
name = "ra_ap_salsa"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "288a0cd35aca45106f613e92a52c7fe63109c8ad2adfddd9181b55a8ced5fba4"
checksum = "504314128b0998f54d8e253a328a53e2a697f579f8d1f194b52f77cd8a540e36"
dependencies = [
"indexmap 2.7.0",
"itertools 0.12.1",
@@ -1748,9 +1720,9 @@ dependencies = [
[[package]]
name = "ra_ap_salsa-macros"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a417dc1192f6e1739560dac84f4d8ed18e4e0228144f13eba66191d7be494528"
checksum = "d957f6ec9a6f11cf9c8ce0f27711f4f9813bdd690b3efa6a280cb06a75b5a0fc"
dependencies = [
"heck 0.4.1",
"proc-macro2",
@@ -1760,9 +1732,9 @@ dependencies = [
[[package]]
name = "ra_ap_span"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10c82d730d56e5c0fadb2029f4347ef67b2453586a94cee40a151178ba77d1b4"
checksum = "5c82fd3ff10c25958db0c254f8f4378cb75069017b675f4fe4c5e7d5f2827e71"
dependencies = [
"hashbrown 0.14.5",
"la-arena",
@@ -1776,9 +1748,9 @@ dependencies = [
[[package]]
name = "ra_ap_stdx"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b39817ff288eb2d922878e8b517a4569246606dab4313665e2fa9470ae3602a"
checksum = "0be113ed187f4bf5403ebd8256d3d4aead8d265f670d534c646edea68516ef86"
dependencies = [
"always-assert",
"crossbeam-channel",
@@ -1791,9 +1763,9 @@ dependencies = [
[[package]]
name = "ra_ap_syntax"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "135493df963d932d4e4a9d9058db990384eb0a2fa694a06ecd1b161b0502c32e"
checksum = "d5af8d681a9fd408be1b17f3b150eb98907fb72b9b44000ada9c3e9b6c059188"
dependencies = [
"cov-mark",
"either",
@@ -1811,9 +1783,9 @@ dependencies = [
[[package]]
name = "ra_ap_syntax-bridge"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a95c0fd654ff10425387c24c9b28004fda5794db212990b2a997938429e0c499"
checksum = "8f957885289e9789dffcd81ebfa4c2d49be3fad41f7718ffeacb3599f6d88678"
dependencies = [
"ra_ap_intern",
"ra_ap_parser",
@@ -1827,9 +1799,9 @@ dependencies = [
[[package]]
name = "ra_ap_toolchain"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5e4c88d75ba247f15dfa28a1291e3e75c887bc2b6d00f1fa0cc17789111840"
checksum = "e067bd4107ec52a241b68398539632df0a850013907070002d4d403c3691e51c"
dependencies = [
"camino",
"home",
@@ -1837,9 +1809,9 @@ dependencies = [
[[package]]
name = "ra_ap_tt"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f04de8deab5777101652f9c79275785589fe5c7375d0f18207edb040ffaead9b"
checksum = "4c38deb50d7a26663c28deb01e5611b3b92b5a87298940e0638589f03c3faf62"
dependencies = [
"arrayvec",
"ra-ap-rustc_lexer",
@@ -1850,9 +1822,9 @@ dependencies = [
[[package]]
name = "ra_ap_vfs"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78c33cc88cb19b3b6d8af79d07a6989871025ef092af61f8d261a5e63117390e"
checksum = "168a9378dd3f185ae94dda9c35e4d468a8ff105c8f4bb57e17f6e2312d84d1a8"
dependencies = [
"crossbeam-channel",
"fst",
@@ -1866,9 +1838,9 @@ dependencies = [
[[package]]
name = "ra_ap_vfs-notify"
version = "0.0.257"
version = "0.0.248"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f690622dc77b2f6cae03ad3a019fca808802dae0915977d186928d9a202c4761"
checksum = "1a5e13d88bf8bbd8dd02c96dd8d89e6cebc2757a0edf13b3b85007024fcf216c"
dependencies = [
"crossbeam-channel",
"notify",
@@ -2064,18 +2036,18 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.217"
version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.217"
version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
dependencies = [
"proc-macro2",
"quote",
@@ -2084,9 +2056,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.135"
version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9"
checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
dependencies = [
"itoa",
"memchr",
@@ -2096,9 +2068,9 @@ dependencies = [
[[package]]
name = "serde_with"
version = "3.12.0"
version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa"
checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817"
dependencies = [
"base64",
"chrono",
@@ -2114,9 +2086,9 @@ dependencies = [
[[package]]
name = "serde_with_macros"
version = "3.12.0"
version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e"
checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d"
dependencies = [
"darling",
"proc-macro2",
@@ -2188,7 +2160,7 @@ checksum = "61c910772f992ab17d32d6760e167d2353f4130ed50e796752689556af07dc6b"
dependencies = [
"chrono",
"is-terminal",
"log 0.4.22",
"log",
"termcolor",
"thread_local",
]
@@ -2207,9 +2179,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.95"
version = "2.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a"
checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
dependencies = [
"proc-macro2",
"quote",
@@ -2341,7 +2313,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
dependencies = [
"log 0.4.22",
"log",
"once_cell",
"tracing-core",
]
@@ -2366,9 +2338,9 @@ dependencies = [
[[package]]
name = "tree-sitter"
version = "0.24.6"
version = "0.24.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f2434c86ba59ed15af56039cc5bf1acf8ba76ce301e32ef08827388ef285ec5"
checksum = "8ac95b18f0f727aaaa012bd5179a1916706ee3ed071920fdbda738750b0c0bf5"
dependencies = [
"cc",
"regex",
@@ -2530,7 +2502,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
dependencies = [
"bumpalo",
"log 0.4.22",
"log",
"proc-macro2",
"quote",
"syn",

View File

@@ -65,92 +65,26 @@ rust_host_tools.host_tools(
# deps for python extractor
# keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh`
py_deps = use_extension("//misc/bazel/3rdparty:py_deps_extension.bzl", "p")
use_repo(
py_deps,
"vendor__anyhow-1.0.44",
"vendor__cc-1.0.70",
"vendor__clap-2.33.3",
"vendor__regex-1.5.5",
"vendor__smallvec-1.6.1",
"vendor__string-interner-0.12.2",
"vendor__thiserror-1.0.29",
"vendor__tree-sitter-0.20.4",
"vendor__tree-sitter-graph-0.7.0",
)
use_repo(py_deps, "vendor__anyhow-1.0.44", "vendor__cc-1.0.70", "vendor__clap-2.33.3", "vendor__regex-1.5.5", "vendor__smallvec-1.6.1", "vendor__string-interner-0.12.2", "vendor__thiserror-1.0.29", "vendor__tree-sitter-0.20.4", "vendor__tree-sitter-graph-0.7.0")
# deps for ruby+rust
# keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh`
tree_sitter_extractors_deps = use_extension("//misc/bazel/3rdparty:tree_sitter_extractors_extension.bzl", "r")
use_repo(
tree_sitter_extractors_deps,
"vendor__anyhow-1.0.95",
"vendor__argfile-0.2.1",
"vendor__chrono-0.4.39",
"vendor__clap-4.5.24",
"vendor__dunce-1.0.5",
"vendor__either-1.13.0",
"vendor__encoding-0.2.33",
"vendor__figment-0.10.19",
"vendor__flate2-1.0.35",
"vendor__glob-0.3.2",
"vendor__globset-0.4.15",
"vendor__itertools-0.14.0",
"vendor__lazy_static-1.5.0",
"vendor__log-0.4.22",
"vendor__mustache-0.9.0",
"vendor__num-traits-0.2.19",
"vendor__num_cpus-1.16.0",
"vendor__proc-macro2-1.0.92",
"vendor__quote-1.0.38",
"vendor__ra_ap_base_db-0.0.257",
"vendor__ra_ap_cfg-0.0.257",
"vendor__ra_ap_hir-0.0.257",
"vendor__ra_ap_hir_def-0.0.257",
"vendor__ra_ap_hir_expand-0.0.257",
"vendor__ra_ap_ide_db-0.0.257",
"vendor__ra_ap_intern-0.0.257",
"vendor__ra_ap_load-cargo-0.0.257",
"vendor__ra_ap_parser-0.0.257",
"vendor__ra_ap_paths-0.0.257",
"vendor__ra_ap_project_model-0.0.257",
"vendor__ra_ap_span-0.0.257",
"vendor__ra_ap_stdx-0.0.257",
"vendor__ra_ap_syntax-0.0.257",
"vendor__ra_ap_vfs-0.0.257",
"vendor__rand-0.8.5",
"vendor__rayon-1.10.0",
"vendor__regex-1.11.1",
"vendor__serde-1.0.217",
"vendor__serde_json-1.0.135",
"vendor__serde_with-3.12.0",
"vendor__stderrlog-0.6.0",
"vendor__syn-2.0.95",
"vendor__tracing-0.1.41",
"vendor__tracing-subscriber-0.3.19",
"vendor__tree-sitter-0.24.6",
"vendor__tree-sitter-embedded-template-0.23.2",
"vendor__tree-sitter-json-0.24.8",
"vendor__tree-sitter-ql-0.23.1",
"vendor__tree-sitter-ruby-0.23.1",
"vendor__triomphe-0.1.14",
"vendor__ungrammar-1.16.1",
)
use_repo(tree_sitter_extractors_deps, "vendor__anyhow-1.0.94", "vendor__argfile-0.2.1", "vendor__chrono-0.4.39", "vendor__clap-4.5.23", "vendor__dunce-1.0.5", "vendor__either-1.13.0", "vendor__encoding-0.2.33", "vendor__figment-0.10.19", "vendor__flate2-1.0.35", "vendor__glob-0.3.1", "vendor__globset-0.4.15", "vendor__itertools-0.12.1", "vendor__itertools-0.13.0", "vendor__lazy_static-1.5.0", "vendor__log-0.4.22", "vendor__num-traits-0.2.19", "vendor__num_cpus-1.16.0", "vendor__proc-macro2-1.0.92", "vendor__quote-1.0.37", "vendor__ra_ap_base_db-0.0.248", "vendor__ra_ap_cfg-0.0.248", "vendor__ra_ap_hir-0.0.248", "vendor__ra_ap_hir_def-0.0.248", "vendor__ra_ap_hir_expand-0.0.248", "vendor__ra_ap_ide_db-0.0.248", "vendor__ra_ap_intern-0.0.248", "vendor__ra_ap_load-cargo-0.0.248", "vendor__ra_ap_parser-0.0.248", "vendor__ra_ap_paths-0.0.248", "vendor__ra_ap_project_model-0.0.248", "vendor__ra_ap_span-0.0.248", "vendor__ra_ap_stdx-0.0.248", "vendor__ra_ap_syntax-0.0.248", "vendor__ra_ap_vfs-0.0.248", "vendor__rand-0.8.5", "vendor__rayon-1.10.0", "vendor__regex-1.11.1", "vendor__serde-1.0.216", "vendor__serde_json-1.0.133", "vendor__serde_with-3.11.0", "vendor__stderrlog-0.6.0", "vendor__syn-2.0.90", "vendor__tracing-0.1.41", "vendor__tracing-subscriber-0.3.19", "vendor__tree-sitter-0.24.5", "vendor__tree-sitter-embedded-template-0.23.2", "vendor__tree-sitter-json-0.24.8", "vendor__tree-sitter-ql-0.23.1", "vendor__tree-sitter-ruby-0.23.1", "vendor__triomphe-0.1.14", "vendor__ungrammar-1.16.1")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# rust-analyzer sources needed by the rust ast-generator (see `rust/ast-generator/README.md`)
RUST_ANALYZER_SRC_TAG = "2025-01-07"
http_archive(
name = "rust-analyzer-src",
build_file = "//rust/ast-generator:BUILD.rust-analyzer-src.bazel",
integrity = "sha256-eo8mIaUafZL8LOM65bDIIIXw1rNQ/P/x5RK/XUtgo5g=",
integrity = "sha256-jl4KJmZku+ilMLnuX2NU+qa1v10IauSiDiz23sZo360=",
patch_args = ["-p1"],
patches = [
"//rust/ast-generator:patches/rust-analyzer.patch",
],
strip_prefix = "rust-analyzer-%s" % RUST_ANALYZER_SRC_TAG,
url = "https://github.com/rust-lang/rust-analyzer/archive/refs/tags/%s.tar.gz" % RUST_ANALYZER_SRC_TAG,
strip_prefix = "rust-analyzer-2024-12-16",
url = "https://github.com/rust-lang/rust-analyzer/archive/refs/tags/2024-12-16.tar.gz",
)
dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")

View File

@@ -1,5 +0,0 @@
## 0.4.0
### New Features
* Initial public preview release

View File

@@ -1,5 +1,4 @@
## 0.4.0
### New Queries
---
category: feature
---
* Initial public preview release

View File

@@ -1,5 +0,0 @@
## 0.4.0
### New Features
* Initial public preview release

View File

@@ -1,2 +0,0 @@
---
lastReleaseVersion: 0.4.0

View File

@@ -1,5 +1,5 @@
name: codeql/actions-all
version: 0.4.1-dev
version: 0.4.0-dev
library: true
warnOnImplicitThis: true
dependencies:

View File

@@ -1,5 +1,4 @@
## 0.4.0
### New Queries
---
category: newQuery
---
* Initial public preview release

View File

@@ -1,2 +0,0 @@
---
lastReleaseVersion: 0.4.0

View File

@@ -1,5 +1,5 @@
name: codeql/actions-queries
version: 0.4.1-dev
version: 0.4.0-dev
library: false
warnOnImplicitThis: true
groups: [actions, queries]

View File

@@ -247,8 +247,7 @@
"javascript/ql/lib/semmle/javascript/security/internal/SensitiveDataHeuristics.qll",
"python/ql/lib/semmle/python/security/internal/SensitiveDataHeuristics.qll",
"ruby/ql/lib/codeql/ruby/security/internal/SensitiveDataHeuristics.qll",
"swift/ql/lib/codeql/swift/security/internal/SensitiveDataHeuristics.qll",
"rust/ql/lib/codeql/rust/security/internal/SensitiveDataHeuristics.qll"
"swift/ql/lib/codeql/swift/security/internal/SensitiveDataHeuristics.qll"
],
"IncompleteUrlSubstringSanitization": [
"javascript/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.qll",

View File

@@ -1,3 +0,0 @@
description: Support variable template specializations
compatibility: full
var_specialized.rel: delete

View File

@@ -1,4 +0,0 @@
description: Support concept id expressions
compatibility: full
concept_instantiation.rel: delete
is_type_constraint.rel: delete

View File

@@ -1,6 +0,0 @@
description: Support requires clauses and type constraints
compatibility: full
fun_requires.rel: delete
var_requires.rel: delete
type_requires.rel: delete
type_template_type_constraint.rel: delete

View File

@@ -1,22 +1,3 @@
## 3.1.0
### Deprecated APIs
* The `TemplateParameter` class, representing C++ type template parameters has been deprecated. Use `TypeTemplateParameter` instead.
### New Features
* New classes `SizeofPackExprOperator` and `SizeofPackTypeOperator` were introduced, which represent the C++ `sizeof...` operator taking expressions and type arguments, respectively.
* A new class `TemplateTemplateParameterInstantiation` was introduced, which represents instantiations of template template parameters.
* A new predicate `getAnInstantiation` was added to the `TemplateTemplateParameter` class, which yields instantiations of template template parameters.
* The `getTemplateArgumentType` and `getTemplateArgumentValue` predicates of the `Declaration` class now also yield template arguments of template template parameters.
* A new class `NonTypeTemplateParameter` was introduced, which represents C++ non-type template parameters.
* A new class `TemplateParameterBase` was introduced, which represents C++ non-type template parameters, type template parameters, and template template parameters.
### Minor Analysis Improvements
* The `Guards` library (`semmle.code.cpp.controlflow.Guards`) has been improved to recognize more guard conditions.
## 3.0.0
### Breaking Changes

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The `Guards` library (`semmle.code.cpp.controlflow.Guards`) has been improved to recognize more guard conditions.

View File

@@ -0,0 +1,4 @@
---
category: feature
---
* A new class `TemplateParameterBase` was introduced, which represents C++ non-type template parameters, type template parameters, and template template parameters.

View File

@@ -0,0 +1,4 @@
---
category: deprecated
---
* The `TemplateParameter` class, representing C++ type template parameters has been deprecated. Use `TypeTemplateParameter` instead.

View File

@@ -0,0 +1,4 @@
---
category: feature
---
* A new class `NonTypeTemplateParameter` was introduced, which represents C++ non-type template parameters.

View File

@@ -0,0 +1,4 @@
---
category: feature
---
* New classes `SizeofPackExprOperator` and `SizeofPackTypeOperator` were introduced, which represent the C++ `sizeof...` operator taking expressions and type arguments, respectively.

View File

@@ -0,0 +1,6 @@
---
category: feature
---
* A new class `TemplateTemplateParameterInstantiation` was introduced, which represents instantiations of template template parameters.
* A new predicate `getAnInstantiation` was added to the `TemplateTemplateParameter` class, which yields instantiations of template template parameters.
* The `getTemplateArgumentType` and `getTemplateArgumentValue` predicates of the `Declaration` class now also yield template arguments of template template parameters.

View File

@@ -1,5 +0,0 @@
---
category: feature
---
* A new class `ConceptIdExpr` was introduced, which represents C++20 concept id expressions.

View File

@@ -1,5 +0,0 @@
---
category: feature
---
* A new class `VariableTemplateSpecialization` was introduced, which represents explicit specializations of variable templates.
* A new predicate `isSpecialization` was added to the `Variable` class, which holds if the variable is a template specialization.

View File

@@ -1,7 +0,0 @@
---
category: feature
---
* New predicates `getARequiresClause`, `getTemplateRequiresClause` and `getFunctionRequiresClause` were added to the `FunctionDeclarationEntry` class, which yield the requires clauses when the entry represents a function template declaration with requires clauses.
* A new predicate `getRequiresClause` was added to the `TypeDeclarationEntry` class, which yields the requires clause when the entry represents a class template declaration with a requires clause.
* A new predicate `getRequiresClause` was added to the `VariableDeclarationEntry` class, which yields the requires clause when the entry represents a variable template declaration with a requires clause.
* A new predicate `getTypeConstraint` was added to the `TypeTemplateParameter` class, which yields the type constraint of the parameter if it exists.

View File

@@ -1,4 +0,0 @@
---
category: feature
---
* A new abstract class `ConfigurationTestFile` (`semmle.code.cpp.ConfigurationTestFile.ConfigurationTestFile`) was introduced, which represents files created to test the build configuration. A subclass `CmakeTryCompileFile` of `ConfigurationTestFile` was also introduced, which represents files created by CMake to test the build configuration.

View File

@@ -1,18 +0,0 @@
## 3.1.0
### Deprecated APIs
* The `TemplateParameter` class, representing C++ type template parameters has been deprecated. Use `TypeTemplateParameter` instead.
### New Features
* New classes `SizeofPackExprOperator` and `SizeofPackTypeOperator` were introduced, which represent the C++ `sizeof...` operator taking expressions and type arguments, respectively.
* A new class `TemplateTemplateParameterInstantiation` was introduced, which represents instantiations of template template parameters.
* A new predicate `getAnInstantiation` was added to the `TemplateTemplateParameter` class, which yields instantiations of template template parameters.
* The `getTemplateArgumentType` and `getTemplateArgumentValue` predicates of the `Declaration` class now also yield template arguments of template template parameters.
* A new class `NonTypeTemplateParameter` was introduced, which represents C++ non-type template parameters.
* A new class `TemplateParameterBase` was introduced, which represents C++ non-type template parameters, type template parameters, and template template parameters.
### Minor Analysis Improvements
* The `Guards` library (`semmle.code.cpp.controlflow.Guards`) has been improved to recognize more guard conditions.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 3.1.0
lastReleaseVersion: 3.0.0

View File

@@ -1,8 +0,0 @@
extensions:
- addsTo:
pack: codeql/cpp-all
extensible: summaryModel
data: # namespace, type, subtypes, name, signature, ext, input, output, kind, provenance
- ["", "", False, "SysAllocString", "", "", "Argument[*0]", "ReturnValue[*]", "value", "manual"]
- ["", "", False, "SysAllocStringByteLen", "", "", "Argument[*0]", "ReturnValue[*]", "value", "manual"]
- ["", "", False, "SysAllocStringLen", "", "", "Argument[*0]", "ReturnValue[*]", "value", "manual"]

View File

@@ -1,5 +1,5 @@
name: codeql/cpp-all
version: 3.1.1-dev
version: 3.0.1-dev
groups: cpp
dbscheme: semmlecode.cpp.dbscheme
extractor: cpp

View File

@@ -153,107 +153,11 @@ class NestedRequirementExpr extends Expr, @nested_requirement {
/**
* A C++ concept id expression.
*
* For example, if:
* ```cpp
* template<typename T, T X> concept C = ...;
* ...
* requires { C<int, 1>; };
* ```
* then `C<int, 1>` is a concept id expression that refers to
* the concept `C`.
*/
class ConceptIdExpr extends RequirementExpr, @concept_id {
override string toString() {
result = this.getConcept().getName() + "<...>"
or
// The following is for backward compatibility with databases created with
// CodeQL 2.19.3, 2.19.4, and 2.20.0. Those databases include concept id
// expressions, but do not include concept template information.
not exists(this.getConcept()) and
result = "concept<...>"
}
override string toString() { result = "concept<...>" }
override string getAPrimaryQlClass() { result = "ConceptIdExpr" }
/**
* Holds if the concept id is used as a type constraint.
*
* In this case, the first template argument is implicit.
*/
predicate isTypeConstraint() { is_type_constraint(underlyingElement(this)) }
/**
* Gets the concept this concept id refers to.
*/
Concept getConcept() { concept_instantiation(underlyingElement(this), unresolveElement(result)) }
/**
* Gets a template argument passed to the concept.
*/
final Locatable getATemplateArgument() { result = this.getTemplateArgument(_) }
/**
* Gets the kind of a non-type template argument passed to the concept.
*/
final Locatable getATemplateArgumentKind() { result = this.getTemplateArgumentKind(_) }
/**
* Gets the `i`th template argument passed to the concept.
*
* For example, if:
* ```cpp
* template<typename T, T X> concept C = ...;
* ...
* requires { C<int, 1>; };
* ```
* then `getTemplateArgument(0)` yields `int`, and `getTemplateArgument(1)`
* yields `1`.
*
* If the concept id is a type constraint, then `getTemplateArgument(0)`
* will not yield a result.
*/
final Locatable getTemplateArgument(int index) {
if exists(this.getTemplateArgumentValue(index))
then result = this.getTemplateArgumentValue(index)
else result = this.getTemplateArgumentType(index)
}
/**
* Gets the kind of the `i`th template argument value passed to the concept.
*
* For example, if:
* ```cpp
* template<typename T, T X> concept C = ...;
* ...
* requires { C<int, 1>; };
* ```
* then `getTemplateArgumentKind(1)` yields `int`, and there is no result for
* `getTemplateArgumentKind(0)`.
*/
final Locatable getTemplateArgumentKind(int index) {
exists(this.getTemplateArgumentValue(index)) and
result = this.getTemplateArgumentType(index)
}
/**
* Gets the number of template arguments passed to the concept.
*/
final int getNumberOfTemplateArguments() {
result = count(int i | exists(this.getTemplateArgument(i)))
}
private Type getTemplateArgumentType(int index) {
exists(int i | if this.isTypeConstraint() then i = index - 1 else i = index |
concept_template_argument(underlyingElement(this), i, unresolveElement(result))
)
}
private Expr getTemplateArgumentValue(int index) {
exists(int i | if this.isTypeConstraint() then i = index - 1 else i = index |
concept_template_argument_value(underlyingElement(this), i, unresolveElement(result))
)
}
}
/**
@@ -283,9 +187,4 @@ class Concept extends Declaration, @concept_template {
* the constraint expression is `std::is_same<T, int>::value`.
*/
Expr getExpr() { result.getParent() = this }
/**
* Gets a concept id expression that refers to this concept
*/
ConceptIdExpr getAReferringConceptIdExpr() { this = result.getConcept() }
}

View File

@@ -1,28 +0,0 @@
/**
* Provides classes for identifying files that created to test the
* build configuration. It is often desirable to exclude these files
* from analysis.
*/
import File
/**
* A file created to test the system configuration.
*/
abstract class ConfigurationTestFile extends File { }
/**
* A file created by CMake to test the system configuration.
*/
class CmakeTryCompileFile extends ConfigurationTestFile {
CmakeTryCompileFile() {
exists(Folder folder, Folder parent |
folder = this.getParentContainer() and
parent = folder.getParentContainer()
|
folder.getBaseName().matches("TryCompile-%") and
parent.getBaseName() = "CMakeScratch" and
parent.getParentContainer().getBaseName() = "CMakeFiles"
)
}
}

View File

@@ -235,7 +235,7 @@ class Declaration extends Locatable, @declaration {
*
* `Foo<int, 1> bar;`
*
* Will have `getTemplateArgument(0)` return `int`, and
* Will have `getTemplateArgument())` return `int`, and
* `getTemplateArgument(1)` return `1`.
*/
final Locatable getTemplateArgument(int index) {

View File

@@ -253,7 +253,7 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
*/
override Location getADeclarationLocation() { result = this.getADeclarationEntry().getLocation() }
/** Holds if this function is a template specialization. */
/** Holds if this Function is a Template specialization. */
predicate isSpecialization() {
exists(FunctionDeclarationEntry fde |
fun_decls(unresolveElement(fde), underlyingElement(this), _, _, _) and
@@ -665,7 +665,7 @@ class FunctionDeclarationEntry extends DeclarationEntry, @fun_decl {
/** Holds if this declaration is also a definition of its function. */
override predicate isDefinition() { fun_def(underlyingElement(this)) }
/** Holds if this declaration is a template specialization. */
/** Holds if this declaration is a Template specialization. */
predicate isSpecialization() { fun_specialized(underlyingElement(this)) }
/**
@@ -715,27 +715,6 @@ class FunctionDeclarationEntry extends DeclarationEntry, @fun_decl {
* specification.
*/
predicate isNoExcept() { fun_decl_empty_noexcept(underlyingElement(this)) }
/**
* Gets a requires clause if this declaration is a template with such a clause.
*/
Expr getARequiresClause() { fun_requires(underlyingElement(this), _, unresolveElement(result)) }
/**
* Gets the requires clause that appears after the template argument list if this
* declaration is a template with such a clause.
*/
Expr getTemplateRequiresClause() {
fun_requires(underlyingElement(this), 1, unresolveElement(result))
}
/**
* Gets the requires clause that appears after the declarator if this declaration
* is a template with such a clause.
*/
Expr getFunctionRequiresClause() {
fun_requires(underlyingElement(this), 2, unresolveElement(result))
}
}
/**

View File

@@ -88,10 +88,6 @@ private Declaration getAnEnclosingDeclaration(Locatable ast) {
or
result = ast.(Initializer).getDeclaration()
or
exists(ConceptIdExpr concept | ast = concept.getATemplateArgument() |
result = concept.getEnclosingFunction()
)
or
result = ast
}
@@ -111,12 +107,6 @@ private newtype TPrintAstNode =
TRequiresExprParametersNode(RequiresExpr req) {
shouldPrintDeclaration(getAnEnclosingDeclaration(req))
} or
TConceptIdExprArgumentsNode(ConceptIdExpr concept) {
shouldPrintDeclaration(getAnEnclosingDeclaration(concept))
} or
TConceptIdExprTypeArgumentNode(Type type, ConceptIdExpr concept, int childIndex) {
type = concept.getTemplateArgument(childIndex)
} or
TConstructorInitializersNode(Constructor ctor) {
ctor.hasEntryPoint() and
shouldPrintDeclaration(ctor)
@@ -367,26 +357,6 @@ class StringLiteralNode extends ExprNode {
override string getValue() { result = "\"" + escapeString(expr.getValue()) + "\"" }
}
/**
* A node representing a `ConceptIdExpr`.
*/
class ConceptIdExprNode extends ExprNode {
override ConceptIdExpr expr;
override PrintAstNode getChildInternal(int childIndex) {
result = super.getChildInternal(childIndex)
or
childIndex = -1 and
result.(ConceptIdExprArgumentsNode).getConceptIdExpr() = expr
}
override string getChildAccessorPredicateInternal(int childIndex) {
result = super.getChildAccessorPredicateInternal(childIndex)
or
childIndex = -1 and result = "<args>"
}
}
/**
* A node representing a `Conversion`.
*/
@@ -623,63 +593,6 @@ class InitializerNode extends AstNode {
}
}
/**
* A node representing the arguments of a `ConceptIdExpr`.
*/
class ConceptIdExprArgumentsNode extends PrintAstNode, TConceptIdExprArgumentsNode {
ConceptIdExpr concept;
ConceptIdExprArgumentsNode() { this = TConceptIdExprArgumentsNode(concept) }
final override string toString() { result = "" }
final override Location getLocation() { result = getRepresentativeLocation(concept) }
override PrintAstNode getChildInternal(int childIndex) {
exists(Locatable arg | arg = concept.getTemplateArgument(childIndex) |
result.(ConceptIdExprTypeArgumentNode).isArgumentNode(arg, concept, childIndex)
or
result.(ExprNode).getAst() = arg
)
}
override string getChildAccessorPredicateInternal(int childIndex) {
exists(this.getChildInternal(childIndex)) and
result = "getTemplateArgument(" + childIndex + ")"
}
/**
* Gets the `ConceptIdExpr` for which this node represents the parameters.
*/
final ConceptIdExpr getConceptIdExpr() { result = concept }
}
/**
* A node representing a type argument of a `ConceptIdExpr`.
*/
class ConceptIdExprTypeArgumentNode extends PrintAstNode, TConceptIdExprTypeArgumentNode {
Type type;
ConceptIdExpr concept;
int index;
ConceptIdExprTypeArgumentNode() { this = TConceptIdExprTypeArgumentNode(type, concept, index) }
final override string toString() { result = qlClass(type) + type.toString() }
final override Location getLocation() { result = getRepresentativeLocation(type) }
override AstNode getChildInternal(int childIndex) { none() }
override string getChildAccessorPredicateInternal(int childIndex) { none() }
/**
* Holds if `t` is the `i`th template argument of `c`.
*/
predicate isArgumentNode(Type t, ConceptIdExpr c, int i) {
type = t and concept = c and index = i
}
}
/**
* A node representing the parameters of a `Function`.
*/
@@ -698,7 +611,7 @@ class FunctionParametersNode extends PrintAstNode, TFunctionParametersNode {
override string getChildAccessorPredicateInternal(int childIndex) {
exists(this.getChildInternal(childIndex)) and
result = "getParameter(" + childIndex + ")"
result = "getParameter(" + childIndex.toString() + ")"
}
/**
@@ -725,7 +638,7 @@ class RequiresExprParametersNode extends PrintAstNode, TRequiresExprParametersNo
override string getChildAccessorPredicateInternal(int childIndex) {
exists(this.getChildInternal(childIndex)) and
result = "getParameter(" + childIndex + ")"
result = "getParameter(" + childIndex.toString() + ")"
}
/**
@@ -752,7 +665,7 @@ class ConstructorInitializersNode extends PrintAstNode, TConstructorInitializers
final override string getChildAccessorPredicateInternal(int childIndex) {
exists(this.getChildInternal(childIndex)) and
result = "getInitializer(" + childIndex + ")"
result = "getInitializer(" + childIndex.toString() + ")"
}
/**
@@ -779,7 +692,7 @@ class DestructorDestructionsNode extends PrintAstNode, TDestructorDestructionsNo
final override string getChildAccessorPredicateInternal(int childIndex) {
exists(this.getChildInternal(childIndex)) and
result = "getDestruction(" + childIndex + ")"
result = "getDestruction(" + childIndex.toString() + ")"
}
/**

View File

@@ -59,13 +59,6 @@ class TypeTemplateParameter extends UserType, TemplateParameterImpl {
override string getAPrimaryQlClass() { result = "TypeTemplateParameter" }
override predicate involvesTemplateParameter() { any() }
/**
* Get the type constraint of this type template parameter.
*/
Expr getTypeConstraint() {
type_template_type_constraint(underlyingElement(this), unresolveElement(result))
}
}
/**

View File

@@ -129,9 +129,4 @@ class TypeDeclarationEntry extends DeclarationEntry, @type_decl {
* class or typedef.
*/
predicate isTopLevel() { type_decl_top(underlyingElement(this)) }
/**
* Gets the requires clause if this declaration is a template with such a clause.
*/
Expr getRequiresClause() { type_requires(underlyingElement(this), unresolveElement(result)) }
}

View File

@@ -187,14 +187,6 @@ class Variable extends Declaration, @variable {
* `for (char c : str) { ... }`
*/
predicate isCompilerGenerated() { compgenerated(underlyingElement(this)) }
/** Holds if this variable is a template specialization. */
predicate isSpecialization() {
exists(VariableDeclarationEntry vde |
var_decls(unresolveElement(vde), underlyingElement(this), _, _, _) and
vde.isSpecialization()
)
}
}
/**
@@ -275,14 +267,6 @@ class VariableDeclarationEntry extends DeclarationEntry, @var_decl {
override predicate isDefinition() { var_def(underlyingElement(this)) }
override string getASpecifier() { var_decl_specifiers(underlyingElement(this), result) }
/** Holds if this declaration is a template specialization. */
predicate isSpecialization() { var_specialized(underlyingElement(this)) }
/**
* Gets the requires clause if this declaration is a template with such a clause.
*/
Expr getRequiresClause() { var_requires(underlyingElement(this), unresolveElement(result)) }
}
/**
@@ -610,10 +594,7 @@ class TemplateVariable extends Variable {
/**
* Gets an instantiation of this variable template.
*/
Variable getAnInstantiation() {
result.isConstructedFrom(this) and
not result.isSpecialization()
}
Variable getAnInstantiation() { result.isConstructedFrom(this) }
}
/**
@@ -643,21 +624,6 @@ class VariableTemplateInstantiation extends Variable {
TemplateVariable getTemplate() { result = tv }
}
/**
* An explicit specialization of a C++ variable template.
*/
class VariableTemplateSpecialization extends Variable {
VariableTemplateSpecialization() { this.isSpecialization() }
override string getAPrimaryQlClass() { result = "VariableTemplateSpecialization" }
/**
* Gets the primary template for the specialization (the function template
* this specializes).
*/
TemplateVariable getPrimaryTemplate() { this.isConstructedFrom(result) }
}
/**
* A non-static local variable or parameter that is not part of an
* uninstantiated template. Uninstantiated templates are purely syntax, and

View File

@@ -12,14 +12,8 @@ private import semmle.code.cpp.dataflow.ExternalFlow
private import semmle.code.cpp.ir.IR
module Input implements InputSig<Location, DataFlowImplSpecific::CppDataFlow> {
private import codeql.util.Void
class SummarizedCallableBase = Function;
class SourceBase = Void;
class SinkBase = Void;
ArgumentPosition callbackSelfParameterPosition() { result = TDirectPosition(-1) }
ReturnKind getStandardReturnValueKind() { result.(NormalReturnKind).getIndirectionIndex() = 0 }
@@ -99,10 +93,6 @@ private module StepsInput implements Impl::Private::StepsInputSig {
DataFlowCall getACall(Public::SummarizedCallable sc) {
result.getStaticCallTarget().getUnderlyingCallable() = sc
}
Node getSourceNode(Input::SourceBase source, Impl::Private::SummaryComponent sc) { none() }
Node getSinkNode(Input::SinkBase sink, Impl::Private::SummaryComponent sc) { none() }
}
module SourceSinkInterpretationInput implements

View File

@@ -3,7 +3,6 @@
*/
private import Semantic
private import SemanticLocation
private import SemanticExprSpecific::SemanticExprConfig as Specific
private import SemanticType
@@ -16,7 +15,7 @@ private import SemanticType
class SemExpr instanceof Specific::Expr {
final string toString() { result = super.toString() }
SemLocation getLocation() { result = super.getLocation() }
final Specific::Location getLocation() { result = super.getLocation() }
Opcode getOpcode() { result instanceof Opcode::Unknown }

View File

@@ -2,7 +2,6 @@ private import RangeAnalysisImpl
private import codeql.rangeanalysis.RangeAnalysis
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticExpr
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticType
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticLocation
module FloatDelta implements DeltaSig {
class Delta = float;
@@ -23,7 +22,7 @@ module FloatDelta implements DeltaSig {
Delta fromFloat(float f) { result = f }
}
module FloatOverflow implements OverflowSig<SemLocation, Sem, FloatDelta> {
module FloatOverflow implements OverflowSig<Sem, FloatDelta> {
predicate semExprDoesNotOverflow(boolean positively, SemExpr expr) {
exists(float lb, float ub, float delta |
typeBounds(expr.getSemType(), lb, ub) and

View File

@@ -3,12 +3,11 @@
*/
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.Semantic
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticLocation
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.analysis.FloatDelta
private import RangeAnalysisImpl
private import codeql.rangeanalysis.RangeAnalysis
module CppLangImplConstant implements LangSig<SemLocation, Sem, FloatDelta> {
module CppLangImplConstant implements LangSig<Sem, FloatDelta> {
/**
* Ignore the bound on this expression.
*

View File

@@ -12,7 +12,7 @@ private import SemanticType
private import codeql.rangeanalysis.RangeAnalysis
private import ConstantAnalysis as ConstantAnalysis
module Sem implements Semantic<SemLocation> {
module Sem implements Semantic {
class Expr = SemExpr;
class ConstantIntegerExpr = ConstantAnalysis::SemConstantIntegerExpr;
@@ -104,7 +104,7 @@ module Sem implements Semantic<SemLocation> {
}
}
module SignAnalysis implements SignAnalysisSig<SemLocation, Sem> {
module SignAnalysis implements SignAnalysisSig<Sem> {
private import SignAnalysisCommon as SA
import SA::SignAnalysis<FloatDelta>
}
@@ -165,7 +165,7 @@ module AllBounds implements BoundSig<SemLocation, Sem, FloatDelta> {
}
}
private module ModulusAnalysisInstantiated implements ModulusAnalysisSig<SemLocation, Sem> {
private module ModulusAnalysisInstantiated implements ModulusAnalysisSig<Sem> {
class ModBound = AllBounds::SemBound;
private import codeql.rangeanalysis.ModulusAnalysis as MA

View File

@@ -3,13 +3,12 @@
*/
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.Semantic
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticLocation
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.analysis.FloatDelta
private import RangeAnalysisImpl
private import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils
private import codeql.rangeanalysis.RangeAnalysis
module CppLangImplRelative implements LangSig<SemLocation, Sem, FloatDelta> {
module CppLangImplRelative implements LangSig<Sem, FloatDelta> {
/**
* Ignore the bound on this expression.
*

View File

@@ -10,12 +10,11 @@ private import codeql.rangeanalysis.RangeAnalysis
private import RangeAnalysisImpl
private import SignAnalysisSpecific as Specific
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.Semantic
private import semmle.code.cpp.rangeanalysis.new.internal.semantic.SemanticLocation
private import ConstantAnalysis
private import Sign
module SignAnalysis<DeltaSig D> {
private import codeql.rangeanalysis.internal.RangeUtils::MakeUtils<SemLocation, Sem, D>
private import codeql.rangeanalysis.internal.RangeUtils::MakeUtils<Sem, D>
/**
* An SSA definition for which the analysis can compute the sign.

View File

@@ -480,19 +480,6 @@ fun_decl_typedef_type(
int typedeftype_id: @usertype ref
);
/*
case @fun_requires.kind of
1 = @template_attached
| 2 = @function_attached
;
*/
fun_requires(
int id: @fun_decl ref,
int kind: int ref,
int constraint: @expr ref
);
param_decl_bind(
unique int id: @var_decl ref,
int index: int ref,
@@ -508,16 +495,11 @@ var_decls(
int location: @location_default ref
);
var_def(unique int id: @var_decl ref);
var_specialized(int id: @var_decl ref);
var_decl_specifiers(
int id: @var_decl ref,
string name: string ref
)
is_structured_binding(unique int id: @variable ref);
var_requires(
int id: @var_decl ref,
int constraint: @expr ref
);
type_decls(
unique int id: @type_decl,
@@ -528,10 +510,6 @@ type_def(unique int id: @type_decl ref);
type_decl_top(
unique int type_decl: @type_decl ref
);
type_requires(
int id: @type_decl ref,
int constraint: @expr ref
);
namespace_decls(
unique int id: @namespace_decl,
@@ -811,11 +789,6 @@ nontype_template_parameters(
int id: @expr ref
);
type_template_type_constraint(
int id: @usertype ref,
int constraint: @expr ref
);
mangled_name(
unique int id: @declaration ref,
int mangled_name : @mangledname,
@@ -910,11 +883,6 @@ concept_templates(
string name: string ref,
int location: @location_default ref
);
concept_instantiation(
unique int to: @concept_id ref,
int from: @concept_template ref
);
is_type_constraint(int concept_id: @concept_id ref);
concept_template_argument(
int concept_id: @concept ref,
int index: int ref,

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
description: Support requires clauses and type constraints
compatibility: partial

View File

@@ -1,2 +0,0 @@
description: Support variable template specializations
compatibility: partial

View File

@@ -1,2 +0,0 @@
description: Support concept id expressions
compatibility: partial

View File

@@ -9,13 +9,11 @@
*/
import cpp
import semmle.code.cpp.ConfigurationTestFile
from GlobalVariable gv
where
gv.getName().length() <= 3 and
not gv.isStatic() and
not gv.getFile() instanceof ConfigurationTestFile // variables in files generated during configuration are likely false positives
not gv.isStatic()
select gv,
"Poor global variable name '" + gv.getName() +
"'. Prefer longer, descriptive names for globals (eg. kMyGlobalConstant, not foo)."

View File

@@ -1,13 +1,3 @@
## 1.3.1
### Minor Analysis Improvements
* The "Returning stack-allocated memory" query (`cpp/return-stack-allocated-memory`) no longer produces results if there is an extraction error in the returned expression.
* The "Badly bounded write" query (`cpp/badly-bounded-write`) no longer produces results if there is an extraction error in the type of the output buffer.
* The "Too few arguments to formatting function" query (`cpp/wrong-number-format-arguments`) no longer produces results if an argument has an extraction error.
* The "Wrong type of arguments to formatting function" query (`cpp/wrong-type-format-argument`) no longer produces results when an argument type has an extraction error.
* Added dataflow models and flow sources for Microsoft's Active Template Library (ATL).
## 1.3.0
### New Queries

View File

@@ -17,7 +17,6 @@ import cpp
import semmle.code.cpp.commons.Buffer
import semmle.code.cpp.ir.dataflow.DataFlow
import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
import semmle.code.cpp.ConfigurationTestFile
import LoopBounds
private predicate staticBufferBase(VariableAccess access, Variable v) {
@@ -149,10 +148,7 @@ predicate outOfBounds(BufferAccess bufaccess, string msg) {
from Element error, string msg
where
(
overflowOffsetInLoop(error, msg) or
wrongBufferSize(error, msg) or
outOfBounds(error, msg)
) and
not error.getFile() instanceof ConfigurationTestFile // elements in files generated during configuration are likely false positives
overflowOffsetInLoop(error, msg) or
wrongBufferSize(error, msg) or
outOfBounds(error, msg)
select error, msg

View File

@@ -12,7 +12,6 @@
*/
import cpp
import semmle.code.cpp.ConfigurationTestFile
from EqualityOperation ro, Expr left, Expr right
where
@@ -21,6 +20,5 @@ where
ro.getAnOperand().getExplicitlyConverted().getType().getUnderlyingType() instanceof
FloatingPointType and
not ro.getAnOperand().isConstant() and // comparisons to constants generate too many false positives
not left.(VariableAccess).getTarget() = right.(VariableAccess).getTarget() and // skip self comparison
not ro.getFile() instanceof ConfigurationTestFile // expressions in files generated during configuration are likely false positives
not left.(VariableAccess).getTarget() = right.(VariableAccess).getTarget() // skip self comparison
select ro, "Equality checks on floating point values can yield unexpected results."

View File

@@ -12,8 +12,7 @@
*/
import cpp
import semmle.code.cpp.commons.Exclusions
import semmle.code.cpp.ConfigurationTestFile
private import semmle.code.cpp.commons.Exclusions
class PureExprInVoidContext extends ExprInVoidContext {
PureExprInVoidContext() { this.isPure() }
@@ -91,7 +90,6 @@ where
not peivc.getType() instanceof UnknownType and
not functionContainsDisabledCodeRecursive(peivc.(FunctionCall).getTarget()) and
not functionDefinedInIfDefRecursive(peivc.(FunctionCall).getTarget()) and
not peivc.getFile() instanceof ConfigurationTestFile and // expressions in files generated during configuration are likely false positives
if peivc instanceof FunctionCall
then
exists(Function target |

View File

@@ -19,10 +19,7 @@
import cpp
import TooFewArguments
import semmle.code.cpp.ConfigurationTestFile
from FunctionCall fc, Function f
where
tooFewArguments(fc, f) and
not fc.getFile() instanceof ConfigurationTestFile // calls in files generated during configuration are likely false positives
where tooFewArguments(fc, f)
select fc, "This call has fewer arguments than required by $@.", f, f.toString()

View File

@@ -16,7 +16,6 @@
*/
import semmle.code.cpp.security.BufferWrite
import semmle.code.cpp.ConfigurationTestFile
/*
* See CWE-120/UnboundedWrite.ql for a summary of CWE-120 alert cases.
@@ -27,8 +26,7 @@ where
bw.hasExplicitLimit() and // has an explicit size limit
destSize = max(getBufferSize(bw.getDest(), _)) and
bw.getExplicitLimit() > destSize and // but it's larger than the destination
not bw.getDest().getType().stripType() instanceof ErroneousType and // destSize may be incorrect
not bw.getFile() instanceof ConfigurationTestFile // expressions in files generated during configuration are likely false positives
not bw.getDest().getType().stripType() instanceof ErroneousType // destSize may be incorrect
select bw,
"This '" + bw.getBWDesc() + "' operation is limited to " + bw.getExplicitLimit() +
" bytes but the destination is only " + destSize + " bytes."

View File

@@ -12,7 +12,6 @@
import cpp
import FilePermissions
import semmle.code.cpp.ConfigurationTestFile
predicate worldWritableCreation(FileCreationExpr fc, int mode) {
mode = localUmask(fc).mask(fc.getMode()) and
@@ -28,7 +27,6 @@ predicate setWorldWritable(FunctionCall fc, int mode) {
from Expr fc, int mode, string message
where
worldWritableCreation(fc, mode) and
not fc.getFile() instanceof ConfigurationTestFile and // expressions in files generated during configuration are likely false positives
message =
"A file may be created here with mode " + octalFileMode(mode) +
", which would make it world-writable."

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Added dataflow models and flow sources for Microsoft's Active Template Library (ATL).

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The "Badly bounded write" query (`cpp/badly-bounded-write`) no longer produces results if there is an extraction error in the type of the output buffer.

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The "Too few arguments to formatting function" query (`cpp/wrong-number-format-arguments`) no longer produces results if an argument has an extraction error.

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The "Wrong type of arguments to formatting function" query (`cpp/wrong-type-format-argument`) no longer produces results when an argument type has an extraction error.

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The "Returning stack-allocated memory" query (`cpp/return-stack-allocated-memory`) no longer produces results if there is an extraction error in the returned expression.

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* The `cpp/badly-bounded-write`, `cpp/equality-on-floats`, `cpp/short-global-name`, `cpp/static-buffer-overflow`, `cpp/too-few-arguments`, `cpp/useless-expression`, `cpp/world-writable-file-creation` queries no longer produce alerts on files created by CMake to test the build configuration.

View File

@@ -1,4 +0,0 @@
---
category: minorAnalysis
---
* Added dataflow models for `SysAllocString` and related functions.

View File

@@ -1,9 +0,0 @@
## 1.3.1
### Minor Analysis Improvements
* The "Returning stack-allocated memory" query (`cpp/return-stack-allocated-memory`) no longer produces results if there is an extraction error in the returned expression.
* The "Badly bounded write" query (`cpp/badly-bounded-write`) no longer produces results if there is an extraction error in the type of the output buffer.
* The "Too few arguments to formatting function" query (`cpp/wrong-number-format-arguments`) no longer produces results if an argument has an extraction error.
* The "Wrong type of arguments to formatting function" query (`cpp/wrong-type-format-argument`) no longer produces results when an argument type has an extraction error.
* Added dataflow models and flow sources for Microsoft's Active Template Library (ATL).

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 1.3.1
lastReleaseVersion: 1.3.0

View File

@@ -1,5 +1,5 @@
name: codeql/cpp-queries
version: 1.3.2-dev
version: 1.3.1-dev
groups:
- cpp
- queries

View File

@@ -10,14 +10,14 @@ edges
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:6 |
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | |
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:10 |
| test.cpp:4:5:4:11 | [summary param] 0 in ymlStep | test.cpp:4:5:4:11 | [summary] to write: ReturnValue in ymlStep | provenance | MaD:969 |
| test.cpp:7:10:7:18 | call to ymlSource | test.cpp:7:10:7:18 | call to ymlSource | provenance | Src:MaD:967 |
| test.cpp:7:10:7:18 | call to ymlSource | test.cpp:11:10:11:10 | x | provenance | Sink:MaD:968 |
| test.cpp:4:5:4:11 | [summary param] 0 in ymlStep | test.cpp:4:5:4:11 | [summary] to write: ReturnValue in ymlStep | provenance | MaD:966 |
| test.cpp:7:10:7:18 | call to ymlSource | test.cpp:7:10:7:18 | call to ymlSource | provenance | Src:MaD:964 |
| test.cpp:7:10:7:18 | call to ymlSource | test.cpp:11:10:11:10 | x | provenance | Sink:MaD:965 |
| test.cpp:7:10:7:18 | call to ymlSource | test.cpp:13:18:13:18 | x | provenance | |
| test.cpp:13:10:13:16 | call to ymlStep | test.cpp:13:10:13:16 | call to ymlStep | provenance | |
| test.cpp:13:10:13:16 | call to ymlStep | test.cpp:15:10:15:10 | y | provenance | Sink:MaD:968 |
| test.cpp:13:10:13:16 | call to ymlStep | test.cpp:15:10:15:10 | y | provenance | Sink:MaD:965 |
| test.cpp:13:18:13:18 | x | test.cpp:4:5:4:11 | [summary param] 0 in ymlStep | provenance | |
| test.cpp:13:18:13:18 | x | test.cpp:13:10:13:16 | call to ymlStep | provenance | MaD:969 |
| test.cpp:13:18:13:18 | x | test.cpp:13:10:13:16 | call to ymlStep | provenance | MaD:966 |
nodes
| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | semmle.label | [summary param] *0 in buffer |
| asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | semmle.label | [summary] to write: ReturnValue in buffer |

View File

@@ -7735,12 +7735,6 @@ WARNING: module 'TaintTracking' has been deprecated and may be removed in future
| taint.cpp:790:10:790:12 | ref arg & ... | taint.cpp:790:11:790:12 | f2 [inner post update] | |
| taint.cpp:790:10:790:12 | ref arg & ... | taint.cpp:791:7:791:8 | f2 | |
| taint.cpp:790:11:790:12 | f2 | taint.cpp:790:10:790:12 | & ... | |
| taint.cpp:805:12:805:25 | call to SysAllocString | taint.cpp:806:8:806:9 | p1 | |
| taint.cpp:806:8:806:9 | p1 | taint.cpp:806:7:806:9 | * ... | TAINT |
| taint.cpp:808:12:808:32 | call to SysAllocStringByteLen | taint.cpp:809:8:809:9 | p2 | |
| taint.cpp:809:8:809:9 | p2 | taint.cpp:809:7:809:9 | * ... | TAINT |
| taint.cpp:811:12:811:28 | call to SysAllocStringLen | taint.cpp:812:8:812:9 | p3 | |
| taint.cpp:812:8:812:9 | p3 | taint.cpp:812:7:812:9 | * ... | TAINT |
| vector.cpp:16:43:16:49 | source1 | vector.cpp:17:26:17:32 | source1 | |
| vector.cpp:16:43:16:49 | source1 | vector.cpp:31:38:31:44 | source1 | |
| vector.cpp:17:21:17:33 | call to vector | vector.cpp:19:14:19:14 | v | |

View File

@@ -789,25 +789,4 @@ void fopen_test(char* source) {
FILE* f2;
fopen_s(&f2, source, "r");
sink(f2); // $ ast,ir
}
typedef wchar_t OLECHAR;
typedef OLECHAR* LPOLESTR;
typedef const LPOLESTR LPCOLESTR;
typedef OLECHAR* BSTR;
typedef const char* LPCSTR;
BSTR SysAllocString(const OLECHAR *);
BSTR SysAllocStringByteLen(LPCSTR, unsigned );
BSTR SysAllocStringLen(const OLECHAR *,unsigned);
void test_sysalloc() {
auto p1 = SysAllocString((LPOLESTR)indirect_source());
sink(*p1); // $ ir MISSING: ast
auto p2 = SysAllocStringByteLen(indirect_source(), 10);
sink(*p2); // $ ir MISSING: ast
auto p3 = SysAllocStringLen((LPOLESTR)indirect_source(), 10);
sink(*p3); // $ ir MISSING: ast
}

View File

@@ -2021,14 +2021,6 @@ getParameterTypeName
| taint.cpp:783:5:783:11 | fopen_s | 1 | const char * |
| taint.cpp:783:5:783:11 | fopen_s | 2 | const char * |
| taint.cpp:785:6:785:15 | fopen_test | 0 | char * |
| taint.cpp:800:6:800:19 | SysAllocString | 0 | const OLECHAR * |
| taint.cpp:800:6:800:19 | SysAllocString | 0 | const wchar_t * |
| taint.cpp:801:6:801:26 | SysAllocStringByteLen | 0 | LPCSTR |
| taint.cpp:801:6:801:26 | SysAllocStringByteLen | 0 | const char * |
| taint.cpp:801:6:801:26 | SysAllocStringByteLen | 1 | unsigned int |
| taint.cpp:802:6:802:22 | SysAllocStringLen | 0 | const OLECHAR * |
| taint.cpp:802:6:802:22 | SysAllocStringLen | 0 | const wchar_t * |
| taint.cpp:802:6:802:22 | SysAllocStringLen | 1 | unsigned int |
| vector.cpp:13:6:13:9 | sink | 0 | int |
| vector.cpp:14:27:14:30 | sink | 0 | vector> & |
| vector.cpp:14:27:14:30 | sink | 0 | vector> & |

View File

@@ -1,8 +0,0 @@
typedef long long size_t;
size_t strlen(const char *s);
int main() {
strlen(""); // GOOD: the source file occurs in a `CMakeFiles/CMakeScratch/TryCompile-...` directory
return 0;
}

View File

@@ -52,6 +52,8 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
if (!string.IsNullOrWhiteSpace(cert))
{
logger.LogInfo("No certificate configured for Dependabot proxy.");
var certDirPath = new DirectoryInfo(Path.Join(tempWorkingDirectory.DirInfo.FullName, ".dependabot-proxy"));
Directory.CreateDirectory(certDirPath.FullName);

View File

@@ -46,9 +46,9 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
{
logger.LogInfo($"Setting up Dependabot proxy at {this.proxy.Address}");
startInfo.EnvironmentVariables["HTTP_PROXY"] = this.proxy.Address;
startInfo.EnvironmentVariables["HTTPS_PROXY"] = this.proxy.Address;
startInfo.EnvironmentVariables["SSL_CERT_FILE"] = this.proxy.CertificatePath;
startInfo.EnvironmentVariables.Add("HTTP_PROXY", this.proxy.Address);
startInfo.EnvironmentVariables.Add("HTTPS_PROXY", this.proxy.Address);
startInfo.EnvironmentVariables.Add("SSL_CERT_FILE", this.proxy.CertificatePath);
}
return startInfo;

View File

@@ -1,7 +1,3 @@
## 1.7.31
No user-facing changes.
## 1.7.30
No user-facing changes.

View File

@@ -1,3 +0,0 @@
## 1.7.31
No user-facing changes.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 1.7.31
lastReleaseVersion: 1.7.30

View File

@@ -1,5 +1,5 @@
name: codeql/csharp-solorigate-all
version: 1.7.32-dev
version: 1.7.31-dev
groups:
- csharp
- solorigate

View File

@@ -1,7 +1,3 @@
## 1.7.31
No user-facing changes.
## 1.7.30
No user-facing changes.

View File

@@ -1,3 +0,0 @@
## 1.7.31
No user-facing changes.

View File

@@ -1,2 +1,2 @@
---
lastReleaseVersion: 1.7.31
lastReleaseVersion: 1.7.30

View File

@@ -1,5 +1,5 @@
name: codeql/csharp-solorigate-queries
version: 1.7.32-dev
version: 1.7.31-dev
groups:
- csharp
- solorigate

View File

@@ -1,9 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>

View File

@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="BlazorTest.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet />
</head>
<body>
<Routes />
<script src="_framework/blazor.web.js"></script>
</body>
</html>

View File

@@ -1,23 +0,0 @@
@inherits LayoutComponentBase
<div class="page">
<div class="sidebar">
<NavMenu />
</div>
<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
</div>
<article class="content px-4">
@Body
</article>
</main>
</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>

View File

@@ -1,96 +0,0 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}
main {
flex: 1;
}
.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}
.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}
.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row {
justify-content: space-between;
}
.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}
.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}

Some files were not shown because too many files have changed in this diff Show More