Skip to content

Commit d21729d

Browse files
---
yaml --- r: 340921 b: refs/heads/rxwei-patch-1 c: 7e8ce6c h: refs/heads/master i: 340919: dd26165
1 parent b8f59e9 commit d21729d

File tree

99 files changed

+997
-415
lines changed

Some content is hidden

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

99 files changed

+997
-415
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: 9b3206f415e083f3623e332ec0388fcf20da9a47
1018+
refs/heads/rxwei-patch-1: 7e8ce6ce4aa9a7c6a344e334ff200248adce646c
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,7 @@ else()
10821082
# ensure we build that when building tools.
10831083
if(SWIFT_INCLUDE_TOOLS)
10841084
add_subdirectory(stdlib/public/Reflection)
1085+
add_subdirectory(stdlib/public/SwiftShims)
10851086
endif()
10861087
endif()
10871088

branches/rxwei-patch-1/include/swift/ABI/Class.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ inline ObjCClassFlags operator|(ObjCClassFlags lhs, ObjCClassFlags rhs) {
6565

6666
}
6767

68-
#endif /* SWIFT_ABI_CLASS_H */
68+
#endif // SWIFT_ABI_CLASS_H

branches/rxwei-patch-1/include/swift/ABI/HeapObject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#ifndef __SWIFT_ABI_HEAPOBJECT_H__
18-
#define __SWIFT_ABI_HEAPOBJECT_H__
17+
#ifndef SWIFT_ABI_HEAPOBJECT_H
18+
#define SWIFT_ABI_HEAPOBJECT_H
1919

2020
#include "../../../stdlib/public/SwiftShims/HeapObject.h"
2121

22-
#endif // __SWIFT_ABI_HEAPOBJECT_H__
22+
#endif // SWIFT_ABI_HEAPOBJECT_H

branches/rxwei-patch-1/include/swift/ABI/KeyPath.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#ifndef __SWIFT_ABI_KEYPATH_H__
18-
#define __SWIFT_ABI_KEYPATH_H__
17+
#ifndef SWIFT_ABI_KEYPATH_H
18+
#define SWIFT_ABI_KEYPATH_H
1919

2020
// We include the basic constants in a shim header so that it can be shared with
2121
// the Swift implementation in the standard library.
@@ -235,4 +235,4 @@ class KeyPathComponentHeader {
235235

236236
}
237237

238-
#endif
238+
#endif // SWIFT_ABI_KEYPATH_H

branches/rxwei-patch-1/include/swift/ABI/Metadata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4442,4 +4442,4 @@ class DynamicReplacementScope
44424442

44434443
#pragma clang diagnostic pop
44444444

4445-
#endif /* SWIFT_ABI_METADATA_H */
4445+
#endif // SWIFT_ABI_METADATA_H

branches/rxwei-patch-1/include/swift/ABI/MetadataValues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,4 +1752,4 @@ class IntegerLiteralFlags {
17521752

17531753
} // end namespace swift
17541754

1755-
#endif /* SWIFT_ABI_METADATAVALUES_H */
1755+
#endif // SWIFT_ABI_METADATAVALUES_H

branches/rxwei-patch-1/include/swift/ABI/System.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#ifndef __SWIFT_ABI_SYSTEM_H__
18-
#define __SWIFT_ABI_SYSTEM_H__
17+
#ifndef SWIFT_ABI_SYSTEM_H
18+
#define SWIFT_ABI_SYSTEM_H
1919

2020
#include "../../../stdlib/public/SwiftShims/System.h"
2121

22-
#endif // __SWIFT_ABI_SYSTEM_H__
22+
#endif // SWIFT_ABI_SYSTEM_H

branches/rxwei-patch-1/include/swift/ABI/TypeIdentity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,4 @@ class ParsedTypeIdentity {
215215

216216
} // end namespace swift
217217

218-
#endif /* SWIFT_ABI_TYPEIDENTITY_H */
218+
#endif // SWIFT_ABI_TYPEIDENTITY_H

branches/rxwei-patch-1/include/swift/AST/ASTDemangler.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
//
2020
//===----------------------------------------------------------------------===//
2121

22-
#ifndef __SWIFT_AST_ASTDEMANGLER_H__
23-
#define __SWIFT_AST_ASTDEMANGLER_H__
22+
#ifndef SWIFT_AST_ASTDEMANGLER_H
23+
#define SWIFT_AST_ASTDEMANGLER_H
2424

2525
#include "llvm/ADT/ArrayRef.h"
2626
#include "llvm/ADT/StringRef.h"
@@ -185,4 +185,4 @@ class ASTBuilder {
185185

186186
} // namespace swift
187187

188-
#endif // __SWIFT_AST_ASTDEMANGLER_H__
188+
#endif // SWIFT_AST_ASTDEMANGLER_H

branches/rxwei-patch-1/include/swift/AST/ASTMangler.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef __SWIFT_AST_ASTMANGLER_H__
14-
#define __SWIFT_AST_ASTMANGLER_H__
13+
#ifndef SWIFT_AST_ASTMANGLER_H
14+
#define SWIFT_AST_ASTMANGLER_H
1515

1616
#include "swift/Basic/Mangler.h"
1717
#include "swift/AST/Types.h"
@@ -350,4 +350,4 @@ class ASTMangler : public Mangler {
350350
} // end namespace Mangle
351351
} // end namespace swift
352352

353-
#endif // __SWIFT_AST_ASTMANGLER_H__
353+
#endif // SWIFT_AST_ASTMANGLER_H

branches/rxwei-patch-1/include/swift/AST/ASTPrinter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ class ASTPrinter {
286286

287287
/// To sanitize a malformed utf8 string to a well-formed one.
288288
static std::string sanitizeUtf8(StringRef Text);
289-
static ValueDecl* findConformancesWithDocComment(ValueDecl *VD);
290289

291290
private:
292291
virtual void anchor();

branches/rxwei-patch-1/include/swift/AST/ASTTypeIDs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ class Type;
3838

3939
} // end namespace swift
4040

41-
#endif /* SWIFT_AST_ASTTYPEIDS_H */
41+
#endif // SWIFT_AST_ASTTYPEIDS_H

branches/rxwei-patch-1/include/swift/AST/Comment.h

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,26 @@
1818

1919
namespace swift {
2020
class Decl;
21-
class DocComment;
21+
class TypeDecl;
2222
struct RawComment;
2323

2424
class DocComment {
2525
const Decl *D;
26-
const swift::markup::Document *Doc = nullptr;
27-
const swift::markup::CommentParts Parts;
26+
swift::markup::Document *Doc = nullptr;
27+
swift::markup::CommentParts Parts;
2828

29-
public:
3029
DocComment(const Decl *D, swift::markup::Document *Doc,
3130
swift::markup::CommentParts Parts)
3231
: D(D), Doc(Doc), Parts(Parts) {}
3332

33+
public:
34+
static DocComment *create(const Decl *D, swift::markup::MarkupContext &MC,
35+
RawComment RC);
36+
37+
void addInheritanceNote(swift::markup::MarkupContext &MC, TypeDecl *base);
38+
3439
const Decl *getDecl() const { return D; }
40+
void setDecl(const Decl *D) { this->D = D; }
3541

3642
const swift::markup::Document *getDocument() const { return Doc; }
3743

@@ -87,19 +93,23 @@ class DocComment {
8793
};
8894

8995
/// Get a parsed documentation comment for the declaration, if there is one.
90-
Optional<DocComment *>getSingleDocComment(swift::markup::MarkupContext &Context,
91-
const Decl *D);
96+
DocComment *getSingleDocComment(swift::markup::MarkupContext &Context,
97+
const Decl *D);
98+
99+
const Decl *getDocCommentProvidingDecl(const Decl *D);
92100

93101
/// Attempt to get a doc comment from the declaration, or other inherited
94102
/// sources, like from base classes or protocols.
95-
Optional<DocComment *> getCascadingDocComment(swift::markup::MarkupContext &MC,
96-
const Decl *D);
103+
DocComment *getCascadingDocComment(swift::markup::MarkupContext &MC,
104+
const Decl *D);
97105

98106
/// Extract comments parts from the given Markup node.
99107
swift::markup::CommentParts
100108
extractCommentParts(swift::markup::MarkupContext &MC,
101109
swift::markup::MarkupASTNode *Node);
110+
111+
/// Extract brief comment from \p RC, and print it to \p OS .
112+
void printBriefComment(RawComment RC, llvm::raw_ostream &OS);
102113
} // namespace swift
103114

104115
#endif // LLVM_SWIFT_AST_COMMENT_H
105-

branches/rxwei-patch-1/include/swift/AST/DiagnosticSuppression.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ class DiagnosticSuppression {
4040
};
4141

4242
}
43-
#endif /* SWIFT_AST_DIAGNOSTIC_SUPPRESSION_H */
43+
#endif // SWIFT_AST_DIAGNOSTIC_SUPPRESSION_H

branches/rxwei-patch-1/include/swift/AST/DiagnosticsSema.def

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ ERROR(sema_opening_import,Fatal,
628628
"opening import file for module %0: %1", (Identifier, StringRef))
629629

630630
ERROR(serialization_load_failed,Fatal,
631-
"failed to load module %0", (Identifier))
631+
"failed to load module '%0'", (StringRef))
632632
ERROR(serialization_malformed_module,Fatal,
633633
"malformed compiled module: %0", (StringRef))
634634
ERROR(serialization_module_too_new,Fatal,
@@ -997,6 +997,10 @@ ERROR(missing_address_of,none,
997997
ERROR(missing_address_of_yield,none,
998998
"yielding mutable value of type %0 requires explicit '&'",
999999
(Type))
1000+
ERROR(extraneous_property_wrapper_unwrap,none,
1001+
"property %0 will be unwrapped to value of type %1, use '$' to refer to "
1002+
"wrapper type %2",
1003+
(DeclName, Type, Type))
10001004
ERROR(extraneous_address_of,none,
10011005
"use of extraneous '&'",
10021006
())

branches/rxwei-patch-1/include/swift/AST/ExperimentalDependencies.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef ExperimentalDependencies_h
14-
#define ExperimentalDependencies_h
13+
#ifndef SWIFT_AST_EXPERIMENTAL_DEPENDENCIES_H
14+
#define SWIFT_AST_EXPERIMENTAL_DEPENDENCIES_H
1515

1616
#include "swift/Basic/LLVM.h"
1717
#include "swift/Basic/Range.h"
@@ -982,4 +982,4 @@ struct SequenceTraits<
982982
LLVM_YAML_DECLARE_MAPPING_TRAITS(
983983
swift::experimental_dependencies::SourceFileDepGraph)
984984

985-
#endif /* ExperimentalDependencies_h */
985+
#endif // SWIFT_AST_EXPERIMENTAL_DEPENDENCIES_H

branches/rxwei-patch-1/include/swift/AST/PrintOptions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ struct PrintOptions {
349349

350350
/// Whether to print the doc-comment from the conformance if a member decl
351351
/// has no associated doc-comment by itself.
352-
bool ElevateDocCommentFromConformance = false;
352+
bool CascadeDocComment = false;
353353

354354
/// Whether to print the content of an extension decl inside the type decl where it
355355
/// extends from.
@@ -480,7 +480,7 @@ struct PrintOptions {
480480
result.SkipDeinit = true;
481481
result.ExcludeAttrList.push_back(DAK_DiscardableResult);
482482
result.EmptyLineBetweenMembers = true;
483-
result.ElevateDocCommentFromConformance = true;
483+
result.CascadeDocComment = true;
484484
result.ShouldQualifyNestedDeclarations =
485485
QualifyNestedDeclarations::Always;
486486
result.PrintDocumentationComments = true;

branches/rxwei-patch-1/include/swift/AST/TrailingCallArguments.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ class TrailingCallArguments
127127

128128
} // end namespace swift
129129

130-
#endif /* SWIFT_AST_TRAILINGCALLARGUMENTS_H */
130+
#endif // SWIFT_AST_TRAILINGCALLARGUMENTS_H

branches/rxwei-patch-1/include/swift/AST/TypeResolutionStage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ void simple_display(llvm::raw_ostream &out, const TypeResolutionStage &value);
4242

4343
} // end namespace swift
4444

45-
#endif /* SWIFT_AST_TYPE_RESOLUTION_STAGE_H */
45+
#endif // SWIFT_AST_TYPE_RESOLUTION_STAGE_H

branches/rxwei-patch-1/include/swift/Basic/ExponentialGrowthAppendingBinaryByteStream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ class ExponentialGrowthAppendingBinaryByteStream
9191

9292
} // end namespace swift
9393

94-
#endif /* SWIFT_BASIC_EXPONENTIALGROWTHAPPENDINGBINARYBYTESTREAM_H */
94+
#endif // SWIFT_BASIC_EXPONENTIALGROWTHAPPENDINGBINARYBYTESTREAM_H

branches/rxwei-patch-1/include/swift/Basic/PrimarySpecificPaths.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ class PrimarySpecificPaths {
5252
};
5353
} // namespace swift
5454

55-
#endif /* SWIFT_BASIC_PRIMARYSPECIFICPATHS_H */
55+
#endif // SWIFT_BASIC_PRIMARYSPECIFICPATHS_H

branches/rxwei-patch-1/include/swift/Basic/SupplementaryOutputPaths.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ struct SupplementaryOutputPaths {
137137
};
138138
} // namespace swift
139139

140-
#endif /* SWIFT_FRONTEND_SUPPLEMENTARYOUTPUTPATHS_H */
140+
#endif // SWIFT_FRONTEND_SUPPLEMENTARYOUTPUTPATHS_H

branches/rxwei-patch-1/include/swift/Driver/ExperimentalDependencyDriverGraph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,4 +468,4 @@ class ModuleDepGraph {
468468
} // namespace experimental_dependencies
469469
} // namespace swift
470470

471-
#endif /* ExperimentalDependencyGraph_h */
471+
#endif // ExperimentalDependencyGraph_h

branches/rxwei-patch-1/include/swift/Frontend/FrontendInputsAndOutputs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,4 @@ class FrontendInputsAndOutputs {
243243

244244
} // namespace swift
245245

246-
#endif /* SWIFT_FRONTEND_FRONTENDINPUTS_H */
246+
#endif // SWIFT_FRONTEND_FRONTENDINPUTS_H

branches/rxwei-patch-1/include/swift/Frontend/InputFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ class InputFile {
102102
};
103103
} // namespace swift
104104

105-
#endif /* SWIFT_FRONTEND_INPUTFILE_H */
105+
#endif // SWIFT_FRONTEND_INPUTFILE_H

branches/rxwei-patch-1/include/swift/Runtime/Casting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,4 @@ const WitnessTable *swift_conformsToProtocol(const Metadata *type,
246246

247247
} // end namespace swift
248248

249-
#endif /* SWIFT_RUNTIME_CASTING_H */
249+
#endif // SWIFT_RUNTIME_CASTING_H

branches/rxwei-patch-1/include/swift/Runtime/Debug.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#ifndef _SWIFT_RUNTIME_DEBUG_HELPERS_
18-
#define _SWIFT_RUNTIME_DEBUG_HELPERS_
17+
#ifndef SWIFT_RUNTIME_DEBUG_HELPERS_H
18+
#define SWIFT_RUNTIME_DEBUG_HELPERS_H
1919

2020
#include <cstdarg>
2121
#include <cstdio>
@@ -268,4 +268,4 @@ inline static int swift_asprintf(char **strp, const char *fmt, ...) {
268268
// namespace swift
269269
}
270270

271-
#endif // _SWIFT_RUNTIME_DEBUG_HELPERS_
271+
#endif // SWIFT_RUNTIME_DEBUG_HELPERS_H

branches/rxwei-patch-1/include/swift/Runtime/Heap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
#ifndef SWIFT_RUNTIME_HEAP_H
1818
#define SWIFT_RUNTIME_HEAP_H
1919

20-
#endif /* SWIFT_RUNTIME_HEAP_H */
20+
#endif // SWIFT_RUNTIME_HEAP_H

0 commit comments

Comments
 (0)