Paolo Tranquilli
14fd89d482
Swift: generalize output redirection code
2022-12-14 18:26:48 +01:00
Paolo Tranquilli
45c0c7fe6c
Merge branch 'main' into redsun82/swift-open-redirection
2022-12-14 18:26:16 +01:00
Paolo Tranquilli
de2e92d5e1
Swift: remove / delimiters from regex extracted patterns
2022-12-14 09:18:36 +01:00
Paolo Tranquilli
fb5b6eab19
Swift: extract RegexLiteralExpr
2022-12-14 09:12:07 +01:00
Alex Denisov
ee94849528
Swift: switch to bootstrapped Swift compiler
2022-12-13 13:59:13 +01:00
Paolo Tranquilli
03d7adb303
Swift: wrap extractor with shell script
...
This is in preparation for the extractor to use shared libraries
packaged alongside it.
We could probably also move the `CODEQL_EXTRACTOR_SWIFT_RUN_UNDER` logic
in it, where it would be simpler and more robust.
2022-12-13 09:07:37 +01:00
Paolo Tranquilli
7162692656
Swift: exit directly on actions not requiring extraction
2022-12-09 10:00:01 +01:00
Paolo Tranquilli
4a41bb4061
Merge branch 'main' into redsun82/swift-open-redirection
2022-12-09 09:59:21 +01:00
Paolo Tranquilli
bf1b32f210
Swift: rework file redirection
...
The hash map mechanism that was already in use for reading swiftmodule
files on macOS is now in use also on Linux. The output replacing
mechanism has been also reworked so that:
* frontend module emission modes have the remapping done directly in
the internal frontend options instead of painstakingly modifying input
flags (this requires a patch on the swift headers though)
* object emission mode is silenced to be just a type checking pass,
thus producing no output files
* all other passes but some debugging and version related ones become
noops
The open file read redirection uses a global weak pointer instance to
maximize robustness in the face of possibly multi-threaded calls to open
happening while `main` is exiting. Possibly overkill, but better safe
than sorry.
2022-12-08 16:10:44 +01:00
Paolo Tranquilli
1ba8b6d35a
Swift: fix extraction of sources from ..
2022-12-08 15:57:57 +01:00
Alex Denisov
f5ddbd6abb
Swift: add a test case showing case canonicalization
2022-12-02 14:06:21 +01:00
AlexDenisov
691188bc48
Merge pull request #11523 from github/alexdenisov/preserve-symlinks
...
Swift: resolve symlinks conditionally
2022-12-02 14:05:13 +01:00
Alex Denisov
7a3beac494
Swift: resolve symlinks conditionally
2022-12-02 10:07:10 +01:00
Paolo Tranquilli
1b6a50147a
Merge branch 'main' into redsun82/swift-type-mapping
...
Conflict resolved on addition of `AbiSafeConversionExpr`
2022-12-02 09:02:47 +01:00
Alex Denisov
0bfe502bb0
Swift: remove patches from the extractor
...
Moved elsewhere https://github.com/dsp-testing/codeql-swift-artifacts/pull/3
2022-11-30 15:36:09 +01:00
Alex Denisov
67fb56deb8
Swift: workaround an internal crash coming from Swift 5.7.1
2022-11-30 12:40:42 +01:00
Alex Denisov
f618d53302
Swift: add new implicit conversion
2022-11-30 12:40:34 +01:00
Nora Dimitrijević
931173350f
Swift: extract missing cases of AccessorKind and AccessSemantics
...
This resolves the warnings that were showing up during extractor-pack
compilation.
2022-11-29 11:31:07 +01:00
Nora Dimitrijević
36e7235493
Swift: fix -Wmissing-braces warning in extractor
...
By initializing va_list the standard way,
i.e. leaving it uninitialized until va_start().
2022-11-29 11:31:07 +01:00
Nora Dimitrijević
c89c449a2c
Swift: silence cmake/vscode intellisense Problem
...
i.e. "TrapLabel not found"
2022-11-29 11:27:33 +01:00
Paolo Tranquilli
edddaaa838
Swift: make mapping from swift types to tags explicit
...
This should decouple schema names from swift names, allowing to
rename schema names regardless of internal swift compiler names.
2022-11-25 13:10:33 +01:00
Paolo Tranquilli
545c2f67e9
Merge pull request #11382 from github/alexdenisov/swift-relax-file-archiving
...
Swift: do not abort if cannot archive a source file
2022-11-23 06:56:26 +01:00
Alex Denisov
8f02463411
Swift: fix remapping bug
...
This issue has slipped during a recent refactoring:
https://github.com/github/codeql/pull/10987/files#diff-c5ab26a06a93c4507a834859a6a56878d5bfe16c4d7cbac4afc4f081d46f461aL63-R64
2022-11-22 17:25:07 +01:00
Alex Denisov
a2ac1384cb
Swift: do not abort if cannot archive a source file
2022-11-22 17:18:40 +01:00
Paolo Tranquilli
3816361c15
Merge branch 'main' into redsun82/swift-types
2022-11-11 13:54:12 +01:00
Paolo Tranquilli
41977d1dbb
Swift: implement extraction of new properties
2022-11-11 12:49:48 +01:00
Paolo Tranquilli
88dc65cb3c
Swift: extract or ignore last remaining types
2022-11-10 17:38:32 +01:00
Paolo Tranquilli
458fb3a4a2
Swift: fix printing of unextracted entities
...
This was still printing explicitly ignored classes.
2022-11-10 16:49:32 +01:00
Paolo Tranquilli
5b9e89acd3
Swift: implement ignoring of removed classes
2022-11-10 15:26:55 +01:00
Paolo Tranquilli
edfecddca1
Swift: extract AppliedPropertyWrapperExpr
2022-11-10 12:55:28 +01:00
Paolo Tranquilli
28c9d6b6b5
Swift: extract PropertyWrapperValuePlaceholderExpr
2022-11-10 11:28:05 +01:00
Paolo Tranquilli
0ccf81e67c
Swift: extract UnresolvedSpecializeExpr
2022-11-09 16:42:22 +01:00
Paolo Tranquilli
1a062823ee
Swift: extract DynamicLookupExpr
2022-11-09 16:31:59 +01:00
Paolo Tranquilli
e2bdef2fba
Swift: extract DynamicMemberRefExpr
2022-11-09 16:22:22 +01:00
Paolo Tranquilli
4770ad3177
Swift: extract OverloadedDeclRefExpr
2022-11-09 16:06:23 +01:00
Paolo Tranquilli
5f8e7e67b4
Swift: extract ObjectLiteralExpr
2022-11-09 15:51:08 +01:00
Paolo Tranquilli
9d4a208c0d
Swift: extract MissingMemberDecl
2022-11-09 12:04:42 +01:00
Paolo Tranquilli
235181fb21
Swift: share translateDiagnosticsKind with SwiftDiagnosticsConsumer
2022-11-09 12:00:43 +01:00
Paolo Tranquilli
7bcee6e9a8
Merge branch 'main' into redsun82/swift-decls
2022-11-09 11:59:16 +01:00
AlexDenisov
8756989b4b
Merge pull request #11101 from github/alexdenisov/extractor-errors
...
Swift: extract diagnostics
2022-11-09 11:33:54 +01:00
Paolo Tranquilli
73ad1307ae
Swift: extract PoundDiagnosticDecl
2022-11-09 11:13:55 +01:00
Paolo Tranquilli
b399d8df7e
Swift: extract opaque types and their decls
2022-11-09 09:27:25 +01:00
Paolo Tranquilli
53b7584a90
Merge pull request #11169 from github/redsun82/swift-extract-last-stmts
...
Swift: extract remaining `Stmt`s
2022-11-08 20:51:10 +01:00
Paolo Tranquilli
9ee4f8b388
Swift: extract remaining Stmts
...
`FailStmt` are `return nil` in fallible initializers.
`PoundAssertStmt` are an experimental feature for compile time
assertions.
2022-11-08 17:38:17 +01:00
Paolo Tranquilli
00d3ff8a18
Swift: extract UnaryPostfixExpr
2022-11-08 17:10:33 +01:00
Paolo Tranquilli
d325a42890
Swift: print unextracted entities
2022-11-08 15:38:53 +01:00
Alex Denisov
3f2f328d87
Swift: put invocation files into a separate folder
2022-11-08 15:32:51 +01:00
Alex Denisov
096469c6fe
Swift: use timestamp + getpid for the invocation filename
2022-11-08 15:26:35 +01:00
Alex Denisov
42004d93f0
Swift: cleanup diagnostic message construction
2022-11-08 15:07:01 +01:00
Alex Denisov
d9b3104c78
Swift: remove unneeded include
2022-11-08 15:03:43 +01:00