@@ -70,3 +70,31 @@ index 4d77e374deb..88b6645a811 100644
70
70
# These clang header options conflict with 'clang-builtin-headers'.
71
71
list(REMOVE_ITEM _SWIFT_DEFAULT_COMPONENTS "clang-resource-dir-symlink")
72
72
list(REMOVE_ITEM _SWIFT_DEFAULT_COMPONENTS "clang-builtin-headers-in-clang-resource-dir")
73
+ diff --git a/include/swift/AST/Stmt.h b/include/swift/AST/Stmt.h
74
+ index 532e038c386..f013eee2f98 100644
75
+ --- a/include/swift/AST/Stmt.h
76
+ +++ b/include/swift/AST/Stmt.h
77
+ @@ -920,7 +920,6 @@ public:
78
+ /// Get the CaseStmt block to which the fallthrough transfers control.
79
+ /// Set during Sema.
80
+ CaseStmt *getFallthroughDest() const {
81
+ - assert(FallthroughDest && "fallthrough dest is not set until Sema");
82
+ return FallthroughDest;
83
+ }
84
+ void setFallthroughDest(CaseStmt *C) {
85
+ diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
86
+ index 75b99a22e73..09115678a82 100644
87
+ --- a/lib/AST/Decl.cpp
88
+ +++ b/lib/AST/Decl.cpp
89
+ @@ -1725,7 +1725,10 @@ StringRef PatternBindingEntry::getInitStringRepresentation(
90
+
91
+ SourceRange PatternBindingDecl::getSourceRange() const {
92
+ SourceLoc startLoc = getStartLoc();
93
+ - SourceLoc endLoc = getPatternList().back().getSourceRange().End;
94
+ + SourceLoc endLoc = startLoc;
95
+ + if (!getPatternList().empty()) {
96
+ + endLoc = getPatternList().back().getSourceRange().End;
97
+ + }
98
+ if (startLoc.isValid() != endLoc.isValid()) return SourceRange();
99
+ return { startLoc, endLoc };
100
+ }
0 commit comments