Skip to content

Commit 234d100

Browse files
committed
---
yaml --- r: 326142 b: refs/heads/master-next c: 761b029 h: refs/heads/master
1 parent 1955a03 commit 234d100

File tree

507 files changed

+3367
-5305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

507 files changed

+3367
-5305
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: e052da7d8886fa0439677852e8f7830b20c2e1da
3-
refs/heads/master-next: 9230753857c328ae8e7ecdc1e44ec2fd12765758
3+
refs/heads/master-next: 761b02949a8c1f462bc3dcb3939d0062f53bfcf6
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/CHANGELOG.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -26,63 +26,6 @@ CHANGELOG
2626
Swift Next
2727
----------
2828

29-
* [SR-11298][]:
30-
31-
A class-constrained protocol extension, where the extended protocol does
32-
not impose a class constraint, will now infer the constraint implicitly.
33-
34-
```swift
35-
protocol Foo {}
36-
class Bar: Foo {
37-
var someProperty: Int = 0
38-
}
39-
40-
// Even though 'Foo' does not impose a class constraint, it is automatically
41-
// inferred due to the Self: Bar constraint.
42-
extension Foo where Self: Bar {
43-
var anotherProperty: Int {
44-
get { return someProperty }
45-
// As a result, the setter is now implicitly nonmutating, just like it would
46-
// be if 'Foo' had a class constraint.
47-
set { someProperty = newValue }
48-
}
49-
}
50-
```
51-
52-
As a result, this could lead to code that currently compiles today to throw an error.
53-
54-
```swift
55-
protocol Foo {
56-
var someProperty: Int { get set }
57-
}
58-
59-
class Bar: Foo {
60-
var someProperty = 0
61-
}
62-
63-
extension Foo where Self: Bar {
64-
var anotherProperty1: Int {
65-
get { return someProperty }
66-
// This will now error, because the protocol requirement
67-
// is implicitly mutating and the setter is implicitly
68-
// nonmutating.
69-
set { someProperty = newValue } // Error
70-
}
71-
}
72-
```
73-
74-
**Workaround**: Define a new mutable variable inside the setter that has a reference to `self`:
75-
76-
```swift
77-
var anotherProperty1: Int {
78-
get { return someProperty }
79-
set {
80-
var mutableSelf = self
81-
mutableSelf.someProperty = newValue // Okay
82-
}
83-
}
84-
```
85-
8629
* [SE-0253][]:
8730

8831
Values of types that declare `func callAsFunction` methods can be called
@@ -108,7 +51,7 @@ Swift Next
10851

10952
* [SR-4206][]:
11053

111-
A method override is no longer allowed to have a generic signature with
54+
A method override is no longer allowed to have a generic signature with
11255
requirements not imposed by the base method. For example:
11356

11457
```
@@ -7822,4 +7765,3 @@ Swift 1.0
78227765
[SR-8974]: <https://bugs.swift.org/browse/SR-8974>
78237766
[SR-9043]: <https://bugs.swift.org/browse/SR-9043>
78247767
[SR-9827]: <https://bugs.swift.org/browse/SR-9827>
7825-
[SR-11298]: <https://bugs.swift.org/browse/SR-11298>

branches/master-next/cmake/modules/SwiftXcodeSupport.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ macro(swift_common_xcode_cxx_config)
100100
# Force usage of Clang.
101101
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0"
102102
CACHE STRING "Xcode Compiler")
103-
# Use C++'14.
104-
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14"
103+
# Use C++'11.
104+
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11"
105105
CACHE STRING "Xcode C++ Language Standard")
106106
# Use libc++.
107107
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++"

branches/master-next/docs/SIL.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ the Swift programming language. SIL accommodates the following use cases:
1717
such as definitive initialization of variables and constructors, code
1818
reachability, switch coverage.
1919
- High-level optimization passes, including retain/release optimization,
20-
dynamic method devirtualization, closure inlining, promoting heap allocations
21-
to stack allocations, promoting stack allocations to SSA registers, scalar
22-
replacement of aggregates (splitting aggregate allocations into multiple
23-
smaller allocations), and generic function instantiation.
20+
dynamic method devirtualization, closure inlining, memory allocation promotion,
21+
and generic function instantiation.
2422
- A stable distribution format that can be used to distribute "fragile"
2523
inlineable or generic code with Swift library modules, to be optimized into
2624
client binaries.

branches/master-next/include/swift/AST/ASTNode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ namespace swift {
3636
enum class DeclKind : uint8_t;
3737
enum class StmtKind;
3838

39-
struct ASTNode : public llvm::PointerUnion<Expr*, Stmt*, Decl*> {
39+
struct ASTNode : public llvm::PointerUnion3<Expr*, Stmt*, Decl*> {
4040
// Inherit the constructors from PointerUnion.
41-
using PointerUnion::PointerUnion;
42-
41+
using PointerUnion3::PointerUnion3;
42+
4343
SourceRange getSourceRange() const;
4444

4545
/// Return the location of the start of the statement.

branches/master-next/include/swift/AST/Builtins.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ BUILTIN_BINARY_OPERATION(ExactUDiv, "udiv_exact", "n", IntegerOrVector)
7575
BUILTIN_BINARY_OPERATION(URem, "urem", "n", Integer)
7676
BUILTIN_BINARY_OPERATION(FRem, "frem", "n", FloatOrVector)
7777
BUILTIN_BINARY_OPERATION(Xor, "xor", "n", IntegerOrVector)
78-
// This builtin is an optimizer hint and always returns the first argument.
79-
BUILTIN_BINARY_OPERATION(Expect, "int_expect", "n", Integer)
8078
#undef BUILTIN_BINARY_OPERATION
8179

8280
/// These builtins are analogous the similarly named llvm intrinsics. The

branches/master-next/include/swift/AST/Decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4790,7 +4790,7 @@ class VarDecl : public AbstractStorageDecl {
47904790
};
47914791

47924792
protected:
4793-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4793+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
47944794

47954795
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
47964796
bool issCaptureList, SourceLoc nameLoc, Identifier name,

branches/master-next/include/swift/AST/DeclContext.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,7 @@ class alignas(1 << DeclContextAlignInBits) DeclContext {
261261

262262
/// Returns the kind of context this is.
263263
DeclContextKind getContextKind() const;
264-
265-
/// Returns whether this context has value semantics.
266-
bool hasValueSemantics() const;
267-
264+
268265
/// Determines whether this context is itself a local scope in a
269266
/// code block. A context that appears in such a scope, like a
270267
/// local type declaration, does not itself become a local context.

branches/master-next/include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ WARNING(implicit_bridging_header_imported_from_module,none,
9191
"is deprecated and will be removed in a later version of Swift",
9292
(StringRef, Identifier))
9393

94+
WARNING(clang_vfs_overlay_is_ignored,none,
95+
"ignoring '-ivfsoverlay' options provided to '-Xcc' in favor of "
96+
"'-vfsoverlay'", ())
97+
9498
#ifndef DIAG_NO_UNDEF
9599
# if defined(DIAG)
96100
# undef DIAG

branches/master-next/include/swift/AST/DiagnosticsSIL.def

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -360,75 +360,61 @@ ERROR(pound_assert_failure,none,
360360
NOTE(constexpr_unknown_reason_default,none,
361361
"cannot evaluate expression as constant here", ())
362362
NOTE(constexpr_unevaluable_operation,none,
363-
"cannot constant evaluate operation%select{| used by this call}0", (bool))
363+
"cannot constant evaluate operation", ())
364364

365365
NOTE(constexpr_too_many_instructions,none,
366366
"exceeded instruction limit: %0 when evaluating the expression "
367367
"at compile time", (unsigned))
368-
NOTE(constexpr_limit_exceeding_instruction,none, "limit exceeded "
369-
"%select{here|during this call}0", (bool))
368+
NOTE(constexpr_limit_exceeding_instruction,none, "limit exceeded here", ())
370369

371370
NOTE(constexpr_loop_found_note,none,
372371
"control-flow loop found during evaluation ", ())
373-
NOTE(constexpr_loop_instruction,none, "found loop "
374-
"%select{here|inside this call}0", (bool))
372+
NOTE(constexpr_loop_instruction,none, "found loop here", ())
375373

376374
NOTE(constexpr_overflow,none, "integer overflow detected", ())
377-
NOTE(constexpr_overflow_operation,none, "operation"
378-
"%select{| performed during this call}0 overflows", (bool))
375+
NOTE(constexpr_overflow_operation,none, "operation overflows", ())
379376

380377
NOTE(constexpr_trap,none, "trap detected", ())
381-
NOTE(constexpr_trap_operation,none, "operation"
382-
"%select{| performed during this call}0 traps", (bool))
383-
384-
NOTE(constexpr_assertion_failed, none, "assertion failed with message: %0",
385-
(StringRef))
386-
NOTE(constexpr_assertion_failed_here, none, "assertion failed"
387-
"%select{ here| during this call}0 ", (bool))
378+
NOTE(constexpr_trap_operation,none, "operation traps", ())
388379

389380
NOTE(constexpr_invalid_operand_seen, none,
390381
"operation with invalid operands encountered during evaluation",())
391382
NOTE(constexpr_operand_invalid_here, none,
392-
"operation with invalid operands encountered "
393-
"%select{here|during this call}0", (bool))
383+
"operation with invalid operands encountered here",())
394384

395385
NOTE(constexpr_value_unknown_at_top_level,none,
396386
"cannot evaluate top-level value as constant here",())
397387
NOTE(constexpr_multiple_writers_found_at_top_level,none,
398388
"top-level value has multiple assignments",())
399389

400390
NOTE(constexpr_unsupported_instruction_found, none,
401-
"encountered operation not supported by the evaluator: %0", (StringRef))
402-
NOTE(constexpr_unsupported_instruction_found_here,none, "operation"
403-
"%select{| used by this call is}0 not supported by the evaluator", (bool))
391+
"encountered operation not supported by the evaluator", ())
392+
NOTE(constexpr_unsupported_instruction_found_here,none,
393+
"operation not supported by the evaluator", ())
404394

405395
NOTE(constexpr_unknown_function_called, none,
406-
"encountered call to '%0' whose body is not available", (StringRef))
396+
"encountered call to a function whose body is not available", ())
407397
NOTE(constexpr_unknown_function_called_here, none,
408-
"%select{|calls a }0function whose body is not available", (bool))
398+
"call to a function whose body is not available", ())
409399

410400
NOTE(constexpr_untracked_sil_value_use_found, none,
411401
"encountered use of a variable not tracked by the evaluator", ())
412402
NOTE(constexpr_untracked_sil_value_used_here, none,
413-
"untracked variable used %select{here|by this call}0", (bool))
414-
415-
NOTE(constexpr_unresolvable_witness_call, none,
416-
"encountered unresolvable witness method call: '%0'", (StringRef))
417-
NOTE(constexpr_no_witness_table_entry, none, "cannot find witness table entry "
418-
"%select{for this call|for a witness-method invoked during this call}0",
419-
(bool))
420-
NOTE(constexpr_witness_call_with_no_conformance, none,
421-
"cannot find concrete conformance "
422-
"%select{for this call|for a witness-method invoked during this call}0",
423-
(bool))
403+
"untracked variable used here", ())
404+
405+
NOTE(constexpr_witness_call_with_no_conformance_found, none,
406+
"cannot find concrete conformance for a witness method call", ())
407+
NOTE(constexpr_witness_call_with_no_target_found, none,
408+
"cannot resolve a witness method call to a concrete function", ())
409+
NOTE(constexpr_witness_call_found_here, none,
410+
"witness method call found here", ())
424411

425412
NOTE(constexpr_unknown_control_flow_due_to_skip,none, "branch depends on "
426413
"non-constant value produced by an unevaluated instructions", ())
427414
NOTE(constexpr_returned_by_unevaluated_instruction,none,
428415
"return value of an unevaluated instruction is not a constant", ())
429416
NOTE(constexpr_mutated_by_unevaluated_instruction,none, "value mutable by an "
430417
"unevaluated instruction is not a constant", ())
431-
ERROR(not_constant_evaluable, none, "not constant evaluable", ())
432418

433419
ERROR(non_physical_addressof,none,
434420
"addressof only works with purely physical lvalues; "

branches/master-next/include/swift/AST/DiagnosticsSema.def

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,19 +1665,10 @@ ERROR(cannot_use_nil_with_this_type,none,
16651665
ERROR(use_of_equal_instead_of_equality,none,
16661666
"use of '=' in a boolean context, did you mean '=='?", ())
16671667

1668-
ERROR(type_cannot_conform, none,
1669-
"%select{|value of protocol }0type %1 cannot conform to %2; "
1670-
"only struct/enum/class types can conform to protocols",
1671-
(bool, Type, Type))
1672-
NOTE(required_by_opaque_return,none,
1673-
"required by opaque return type of %0 %1", (DescriptiveDeclKind, DeclName))
1674-
NOTE(required_by_decl,none,
1675-
"required by %0 %1 where %2 = %3",
1676-
(DescriptiveDeclKind, DeclName, Type, Type))
1677-
NOTE(required_by_decl_ref,none,
1678-
"required by referencing %0 %1 on %2 where %3 = %4",
1679-
(DescriptiveDeclKind, DeclName, Type, Type, Type))
16801668

1669+
ERROR(protocol_does_not_conform_objc,none,
1670+
"protocol type %0 cannot conform to %1 because only concrete "
1671+
"types can conform to protocols", (Type, Type))
16811672
ERROR(protocol_does_not_conform_static,none,
16821673
"%0 cannot be used as a type conforming to protocol %1 because %1 "
16831674
"has static requirements",

branches/master-next/include/swift/AST/Evaluator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class Evaluator {
260260
// Check for a cycle.
261261
if (checkDependency(getCanonicalRequest(request))) {
262262
return llvm::Error(
263-
std::make_unique<CyclicalRequestError<Request>>(request, *this));
263+
llvm::make_unique<CyclicalRequestError<Request>>(request, *this));
264264
}
265265

266266
// Make sure we remove this from the set of active requests once we're

0 commit comments

Comments
 (0)