Geoffrey White
5727d49cce
Swift: Take out common code for lines of code.
2023-06-08 12:03:03 +01:00
Geoffrey White
a3ef5c6918
Swift: QLDoc Diagnostics.qll.
2023-06-08 12:03:02 +01:00
Geoffrey White
e0f16f46d2
Swift: Add compile errors / warnings to SummaryStats.ql.
2023-06-08 11:48:57 +01:00
Geoffrey White
dc7a286948
Swift: Add lines of code to SummaryStats.ql.
2023-06-08 11:29:04 +01:00
Nora Dimitrijević
a5e0669981
Swift: fix bad join order in NamedPattern.getVarDecl()
...
Ideally the EDB itself should contain a direct
reference from NamedPattern to VarDecl, not just a name,
but oh well, this join order works fine.
BEFORE:
```
[2023-06-08 11:40:01] Evaluated non-recursive predicate quick_eval#ff@60fe07kr in 6533ms (size: 91309).
Evaluated relational algebra for predicate quick_eval#ff@60fe07kr with tuple counts:
1209062 ~3% {2} r1 = SCAN VarDecl#914e0d1e::Generated::VarDecl::getName#0#dispred#ff OUTPUT In.1, In.0
234687793 ~0% {2} r2 = JOIN r1 WITH NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Lhs.1, Rhs.1
19112791 ~0% {3} r3 = JOIN r2 WITH VarDecl#914e0d1e::Generated::VarDecl::getImmediateParentPattern#0#dispred#ff ON FIRST 1 OUTPUT Rhs.1, Lhs.0, Lhs.1
19112791 ~0% {3} r4 = JOIN r3 WITH Element#e67432df::Generated::Element::resolve#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1
24647 ~0% {2} r5 = JOIN r4 WITH Element#d22cfd66::Element::getFullyUnresolved#bf ON FIRST 2 OUTPUT Lhs.1, Lhs.2
19112791 ~0% {3} r6 = JOIN r3 WITH Element#e67432df::Generated::Element::resolve#bf ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
19112791 ~3% {3} r7 = JOIN r6 WITH Element#d22cfd66::Element::getFullyUnresolved#bf ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1
66662 ~4% {2} r8 = JOIN r7 WITH #Pattern#19b8cf65::Pattern::getImmediateEnclosingPattern#0#dispredPlus#bf ON FIRST 2 OUTPUT Lhs.0, Lhs.2
91309 ~2% {2} r9 = r5 UNION r8
return r9
```
AFTER:
```
[2023-06-08 11:55:26] Evaluated non-recursive predicate quick_eval#ff@fe906afo in 26ms (size: 91309).
Evaluated relational algebra for predicate quick_eval#ff@fe906afo with tuple counts:
92048 ~0% {3} r1 = SCAN NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff OUTPUT In.0, In.1, In.0
82893 ~0% {2} r2 = SCAN #Pattern#19b8cf65::Pattern::getImmediateEnclosingPattern#0#dispredPlus#fb#flipped OUTPUT In.1, In.0
66417 ~1% {3} r3 = JOIN r2 WITH NamedPattern#c3d26570::Generated::NamedPattern::getName#0#dispred#ff ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.0
158465 ~0% {3} r4 = r1 UNION r3
94246 ~3% {3} r5 = JOIN r4 WITH VarDecl#914e0d1e::Generated::VarDecl::getImmediateParentPattern#0#dispred#ff_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
91309 ~2% {2} r6 = JOIN r5 WITH VarDecl#914e0d1e::Generated::VarDecl::getName#0#dispred#ff ON FIRST 2 OUTPUT Lhs.2, Lhs.0
return r6
```
2023-06-08 12:03:58 +02:00
Nora Dimitrijević
cad6582701
Merge branch 'main' into swift/brace-stmt-variables
2023-06-07 10:51:58 +02:00
Paolo Tranquilli
0b09fdae43
Merge branch 'main' into alexdenisov+redsun82/tuple-mangling
2023-06-07 10:40:38 +02:00
Geoffrey White
aa8878ba86
Merge pull request #13356 from geoffw0/qualname
...
Swift: Add FieldDecl.getQualifiedName
2023-06-07 09:08:16 +01:00
Nora Dimitrijević
03e94c7137
Swift: add library pack change note
2023-06-06 17:37:02 +02:00
Nora Dimitrijević
a831456e94
Swift: make BraceStmt's variable a synth property
2023-06-06 16:54:47 +02:00
Nora Dimitrijević
4a29087ce7
Swift: update Cfg test: VarDecls no longer in BraceStmt basic blocks
...
This is a consequence of VarDecls not being Elements of BraceStmts. =
2023-06-06 16:54:47 +02:00
Nora Dimitrijević
8ccbad601b
Swift: PrintAst test changes
2023-06-06 16:54:47 +02:00
Nora Dimitrijević
026492836c
Swift: codegen
2023-06-06 16:54:46 +02:00
Nora Dimitrijević
387cde5972
Swift: add BraceStmt.getVariable(_) child with logic in QL.
2023-06-06 16:54:46 +02:00
Geoffrey White
e04f6bff27
Swift: Add a simple Regex library.
2023-06-05 23:55:01 +01:00
Geoffrey White
c994b4b9dd
Swift: Create test cases for a regular expression library.
2023-06-05 23:55:01 +01:00
Jami Cogswell
5a23421d9a
Shared: minor updates to comments
2023-06-05 13:46:56 -04:00
Jami Cogswell
6c46cd9c21
Java/C#/Go/Swift: move 'SharedModelValidation.qll' to internal folder
2023-06-05 13:11:08 -04:00
Jami Cogswell
9d5972acc2
Shared: update qldocs
2023-06-05 12:18:34 -04:00
Jami Cogswell
3f1dc8e5c7
Shared: add outdated Swift sink kinds
2023-06-05 12:18:34 -04:00
Jami Cogswell
62ac0dc471
Shared: add outdated sink kind msg to 'getInvalidModelKind' for all languages
2023-06-05 12:18:33 -04:00
Jami Cogswell
76f5dca861
Shared: move 'OutdatedSinkKind' to shared file and add outdated JS and C# sink kinds
2023-06-05 12:18:33 -04:00
Jami Cogswell
7b629f5d63
Shared: include 'qltest%' and 'test-%'
2023-06-05 12:18:33 -04:00
Jami Cogswell
76508d17c6
Go/Swift: validate source/sink kinds
2023-06-05 12:18:33 -04:00
Jami Cogswell
615f2a573b
Java/C#/Go/Swift: remove commented-out code
2023-06-05 12:18:33 -04:00
Jami Cogswell
7317c29eea
Shared: update kind information
2023-06-05 12:18:33 -04:00
Jami Cogswell
79f61cc645
Java/C#/Go/Swift: use 'SharedModelValidation' file
2023-06-05 12:18:33 -04:00
Jami Cogswell
ddb5d92ef8
Shared: add source, summary, and neutral shared valid kinds
2023-06-05 12:18:33 -04:00
Jami Cogswell
869f820fcf
Shared: add 'SharedModelValidation' file as experiment
2023-06-05 12:18:33 -04:00
Paolo Tranquilli
dc26dc81a9
Merge pull request #13370 from github/redsun82/swift-fix-cmake
...
Swift: fix cmake generation
2023-06-05 14:52:40 +02:00
Michael B. Gale
06d48dca67
Merge pull request #13211 from github/mbg/identify-environment-stubs
...
Shared: Add stubs for `identify-environment` scripts
2023-06-05 10:29:06 +01:00
Paolo Tranquilli
400176f677
Swift: fix cmake generation
...
The bazel -> cmake generator is currently not capable of handling
separate included generated cmake files making use of common C/C++
dependencies.
To work around this limitation, a single generated cmake is now in
place. Long-term, we should either:
* make the cmake generator handle common dependencies gracefully, or
* make the cmake generation aspect travel up `pkg_` rules `srcs`
attributes
so to avoid having to list the targets to be generated in the top-level
`BUILD` file.
Other things fixed:
* removed some warning spam about redefined `BAZEL_CURRENT_REPOSITORY`
* fixed the final link step, that was failing because `libswiftCore.so`
was not being linked.
2023-06-05 11:12:11 +02:00
Michael B. Gale
5d89b0739b
Swift: Remove .cmd script
2023-06-05 09:12:21 +01:00
Geoffrey White
4c8225724b
Swift: Fix QL-for-QL warnings.
2023-06-02 12:21:17 +01:00
Geoffrey White
14d193383e
Swift: Put the change note in the right place.
2023-06-02 12:03:22 +01:00
Geoffrey White
8e8696a8ed
Swift: Autoformat.
2023-06-02 12:02:33 +01:00
Geoffrey White
c7c8807f40
Swift: Use FieldDecl.hasQualifiedName.
2023-06-02 11:56:16 +01:00
Geoffrey White
5bf82aeddf
Swift: Add FieldDecl.hasQualifiedName.
2023-06-02 11:13:57 +01:00
Geoffrey White
d7e4c5f044
Swift: Change note.
2023-06-02 10:42:52 +01:00
Geoffrey White
00cd347117
Swift: Add more heuristic expressions.
2023-06-02 10:42:52 +01:00
Geoffrey White
bc57e464e5
Swift: Add some more test cases.
2023-06-02 10:42:51 +01:00
Geoffrey White
edfdddb24a
Swift: Tweak and update the qldoc string.
2023-06-01 11:47:05 +01:00
Geoffrey White
d68f602124
Merge branch 'main' into sharedsensitive
2023-06-01 11:11:42 +01:00
Michael Nebel
06b02eb3ce
Sync files.
2023-06-01 09:30:31 +02:00
Arthur Baars
c211b704f3
Merge pull request #13272 from github/post-release-prep/codeql-cli-2.13.3
...
Post-release preparation for codeql-cli-2.13.3
2023-05-31 15:33:12 +02:00
Geoffrey White
caf250cc1b
Swift: Update the QLdoc on Callable.
2023-05-31 13:01:20 +01:00
Geoffrey White
02cae30270
Merge branch 'main' into sharedsensitive
2023-05-31 12:57:33 +01:00
Geoffrey White
daad2e1bd3
Swift: Use regexp for function name.
2023-05-31 12:55:09 +01:00
Arthur Baars
5981ce4cb1
Swift: accept test output from failed CFG consistency queries
2023-05-31 12:15:21 +02:00
Paolo Tranquilli
edb822279b
Swift: update comments to the mangler
2023-05-31 10:12:31 +02:00