Commit Graph

302 Commits

Author SHA1 Message Date
Varun Gandhi
caf1a55eea Merge pull request #35229 from mininny/switch-find-to-contains
[NFC] Replace uses of find(x) != end() idiom with contains(x) for StringRef and Set-like types
2021-02-08 13:57:43 -08:00
Minhyuk Kim
53d1fc481e Replace usages of .find(Key) != .end() to .contains(Key) in llvm sets 2021-02-06 18:24:20 +09:00
Doug Gregor
06dc593cec Merge pull request #35264 from DougGregor/concurrent-value-protocol
[Concurrency] Introduce "ConcurrentValue" protocol and checking.
2021-02-05 10:28:26 -08:00
shreyaa-sharmaa
2b11d7acc7 Task SR-14138 Replace std::transform with llvm::transform 2021-02-04 12:58:33 +05:30
Doug Gregor
866a8d8944 Introduce checking for ConcurrentValue conformance across actors.
When referring to an actor-isolated declaration from outside of the
actor, ensure that the types involved conform to the `ConcurrentValue`
protocol. Otherwise, produce a diagnostic stating that it is unsafe to
pass such types across actors.

Apply the same rule to local captures within concurrent code.
2021-02-03 17:37:43 -08:00
Slava Pestov
e675bee26c AST: Split off DependencyCollector.h from EvaluatorDependencies.h
Also remove some unnecessary #includes from DependencyCollector.h,
which necessitated adding #includes in various other files.
2020-12-23 00:00:25 -05:00
Xi Ge
86918102c4 ABIChecker: abort if given baseline file is absent 2020-10-05 13:49:06 -07:00
Xi Ge
950eb74e67 ABI Checker: use lower-cased decl keywords to be consistent with source. NFC 2020-09-12 10:35:03 -07:00
Xi Ge
028a75572c ModuleInterface: remark potential version differences between SDK and prebuilt modules
Prebuilt-module directory now contains a SystemVersion.plist file copied from the SDK
it's built from. This patch teaches the compiler to remark this version and the SDK version
when -Rmodule-interface-rebuild is specified. The difference between these versions could
help us debug unusable prebuilt modules.
2020-09-04 11:45:05 -07:00
Xi Ge
e107182f1a Merge remote-tracking branch 'apple/master' into master-rebranch 2020-09-02 18:36:37 -07:00
Xi Ge
a4d731ed9f ModuleLoader: remove several walk-arounds for not having a persistent ClangImporterOptions available. NFC 2020-09-02 15:10:50 -07:00
Xi Ge
c403b140e1 ClangImporter: refactor ClangImporterOptions to be ASTContext-owned. NFC
We need ClangImporterOptions to be persistent for several scenarios: (1)
when creating a sub-ASTContext to build Swift modules from interfaces; and
(2) when creating a new Clang instance to invoke Clang dependencies scanner.

This change is NFC.
2020-09-01 14:04:22 -07:00
swift_jenkins
4eaa071e8b Merge remote-tracking branch 'origin/master' into master-rebranch 2020-08-31 18:46:27 -07:00
Xi Ge
55e77785df ABI checker: add a mechansim for specifying allowd ABI breakages
When the checker found a breakage listed in the user-specified list,
the breage should be consumed internally without failing the check.

rdar://68086477
2020-08-31 10:57:15 -07:00
swift_jenkins
114cfe5101 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-08-27 17:07:02 -07:00
Xi Ge
5faedbd1ab Merge pull request #33667 from nkcsgexi/allow-list-rename
ABIChecker: rename argument -protocol-requirement-white-list to -protocol-requirement-allow-list. NFC
2020-08-27 16:52:34 -07:00
swift_jenkins
80d87082d3 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-08-27 14:00:17 -07:00
Xi Ge
103b61c8be ABIChecker: rename argument -protocol-requirement-white-list to -protocol-requirement-allow-list 2020-08-27 12:06:25 -07:00
Xi Ge
1a44db3dcf ABIChecker: exclude decls with the @_alwaysEmitIntoClient attribute
Removing or updating @_alwaysEmitIntoClient functions are never ABI-breaking, thus
we should exclude them from the symbol set for ABI stability checking.

rdar://67883661
2020-08-27 10:58:48 -07:00
swift-ci
2dbd6228eb Merge remote-tracking branch 'origin/master' into master-rebranch 2020-08-11 13:43:28 -07:00
Xi Ge
a8255f2601 abi-checker: allow ABI checker to deserialize @_implementationOnly modules on demand
This could prevent the tool from crashing when module recovery failed.
2020-08-11 10:41:01 -07:00
Nathan Hawes
b0a2230860 Manually merge remote-tracking branch 'upstream/master' into merge-in-master 2020-07-27 09:25:01 -07:00
Meghana Gupta
b34791a0a0 Update code as per Apple Style Guide
whitelist -> allowlist
blacklist -> denylist
2020-07-24 11:37:15 -07:00
swift_jenkins
45b3113ce1 Merge remote-tracking branch 'origin/master' into master-next 2020-06-17 10:46:06 -07:00
Xi Ge
4448a229df ABI-checker: include Swift symbols only when ABI checking is enabled
ABI checking logics are largely Swift-specific, so we should exclude
symbols from the underlying Clang module.

rdar://64373983
2020-06-16 16:41:07 -07:00
Karoy Lorentey
68351d2110 Revert "Merge remote-tracking branch 'origin/master-next'"
This reverts commit 1c9b0908e6, reversing
changes made to 3eb82c1836.
2020-06-08 16:48:38 -07:00
swift_jenkins
45975414d9 Merge remote-tracking branch 'origin/master' into master-next 2020-05-23 18:58:49 -07:00
Xi Ge
c5730beb42 API checker: only diagnose adding enum cases to exhaustive enums
Adding new cases to a non-exhaustive enum type isn't source-breaking
since it only triggers a warning.

rdar://63464929
2020-05-23 15:56:22 -07:00
swift_jenkins
66e1d00d86 Merge remote-tracking branch 'origin/master' into master-next 2020-05-11 11:19:10 -07:00
Xi Ge
9883e664b2 ABIChecker: don't diagnose missing availability attribute for decls where the attribute doesn't apply
rdar://62990671
2020-05-11 08:35:11 -07:00
swift_jenkins
b441bd2a5f Merge remote-tracking branch 'origin/master' into master-next 2020-04-27 21:18:36 -07:00
Xi Ge
6b6a65fd5b ABI Checker: add an option to serialize diagnostics to a file path 2020-04-27 16:51:08 -07:00
swift_jenkins
ebc4926f8b Merge remote-tracking branch 'origin/master' into master-next 2020-04-21 09:57:24 -07:00
Xi Ge
7f8b5f7ead ABI-checker: specify default baseline file names for non-Darwin platforms
rdar://62111064
2020-04-21 09:26:37 -07:00
Michael Forster
21adecc9c2 Another StringRef -> std::string conversion fix.
This is needed to make this code compile on master-next.
2020-04-21 06:28:30 +02:00
Xi Ge
701ad83d87 Merge pull request #31141 from nkcsgexi/abi-checker-baseline-directory
ABI-checker: add an option to dump generated baselines into a directory. NFC
2020-04-20 16:18:33 -07:00
Xi Ge
c68c1234b4 ABI-checker: add an option to dump generated baselines into a directory. NFC
Using a directory instead of an exact file name for the generated
baseline allows the tool to use target triple as file name, which is
expected by the diagnostic phase.
2020-04-20 14:31:58 -07:00
Michael Forster
00b09c723c More StringRef -> std::string conversion fixes.
This is needed for the master-next branch.
2020-04-20 09:47:41 +02:00
Xi Ge
4effe03d07 ABI-checker: allow users to specify a directory containing baseline files. NFC
The ABI-checker tool could pick up a baseline file to use according to
the given target triple.
2020-04-18 14:39:22 -07:00
Xi Ge
140a151de1 ABI-checker: diagnose missing available attributes for members of extensions instead of the extensions themselves
rdar://61644469
2020-04-11 19:00:49 -07:00
Xi Ge
cec45195a2 APIChecker: adding enum cases are source breaking changes
rdar://60041622
2020-03-05 16:23:49 -08:00
swift_jenkins
70bfa0cfc1 Merge remote-tracking branch 'origin/master' into master-next 2020-01-06 12:17:27 -08:00
Harlan Haskins
4d731735d2 [api-digester] Teach the api-digester about hasMissingDesignatedInitializers
Because we won’t be serializing this attribute, add custom diagnostics for the cases where:

- We add @_hasMissingDesignatedInits to an open class, which means subclasses won’t be able to inherit its inits
- We remove @_inheritsConvenienceInitializers, which means APIs are removed
2020-01-06 10:15:07 -08:00
swift_jenkins
b9f998ffa4 Merge remote-tracking branch 'origin/master' into master-next 2019-11-15 15:56:48 -08:00
Xi Ge
c8ce5b304c ABI/API checker: don't complain about changing var to let or vice versa
The tool diagnoses the removal of getter/setter for properties, so complaining about the keyword change can be redundant.

rdar://problem/57201030
2019-11-14 13:59:26 -08:00
Xi Ge
64c0680686 Merge remote-tracking branch 'apple/master' into master-next 2019-10-28 10:19:36 -07:00
Xi Ge
7d600eb27a ABI/API checker: teach the tool to emit diagnostics to serialized source location for decls 2019-10-17 16:31:56 -07:00
swift-ci
b71f094f77 Merge remote-tracking branch 'origin/master' into master-next 2019-09-16 18:29:18 -07:00
Xi Ge
8912ef9fd0 ABI/API checker: move node mapping information from under -v to under -debug. NFC 2019-09-16 15:30:02 -07:00
swift-ci
d628a95f15 Merge remote-tracking branch 'origin/master' into master-next 2019-09-12 17:10:18 -07:00