Commit Graph

414 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
Minhyuk Kim
e924cf6104 Replace usages of StringRef.find(Key) != StringRef::npos to StringRef.contains(Key) 2021-02-04 00:42:04 +09:00
Ikko Ashimine
db52444109 Fix typo in ModuleAnalyzerNodes.h
propery ->property
2021-01-11 12:35:38 +09: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
Matt Zanchelli
be13b470aa Fix typos
becuase -> because
preceeds -> precedes
initalizer -> initializer
intialize -> initialize
libary -> library
notfication -> notification
reciever -> receiver
collecton -> collection
exlcusive -> exclusive
techincal -> technical
compatability -> compatibility
setps -> steps
accomodate -> accommodate
brakcet -> bracket
fraciton -> fraction
programm -> program
concequently -> consequently
ecoding -> encoding
timeIntervalforSelfEnd -> timeIntervalForSelfEnd
2020-12-21 18:44:03 -05:00
Xi Ge
86918102c4 ABIChecker: abort if given baseline file is absent 2020-10-05 13:49:06 -07:00
Xi Ge
00577acacd ABI checker: when invoking via build system, explicitly mention ABI breakge in diagnostics
The error messages emitted from the ABI checker are mostly explanations of breakages. We should
explicitly mention why they are emitted to differentiate them from other compiler diagnostics.

rdar://68864860
2020-09-14 10:50:28 -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
swift-ci
a0a181159c Merge remote-tracking branch 'origin/master' into master-rebranch 2020-07-31 16:07:19 -07:00
Slava Pestov
b4ea644910 IDE: Replace some calls to getDeclaredType() with getDeclaredInterfaceType() 2020-07-31 13:39:02 -04: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
Nathan Hawes
9d4ed5f39c Manually merge remote-tracking branch 'upstream/master' into manually-merge-master-to-master-rebranch 2020-07-20 16:09:55 -07:00
Nathan Hawes
244dc4a768 [AST] Rename PlatformKind::OSX to PlatformKind::macOS
Because the names are coming from a .def file used for printing too, this
simplifies the printing logic as well.
2020-07-08 16:29:31 -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
71686f9984 Merge remote-tracking branch 'origin/master' into master-next 2020-04-24 12:58:09 -07:00
Anthony Latsis
74252028ca AST: Rename getFullName -> getName on ValueDecl & MissingMemberDecl 2020-04-23 05:16:55 +03: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