Files
codeql/swift/third_party/swift-llvm-support/patches/remove_getFallthrougDest_assert.patch
Paolo Tranquilli 9731048836 Swift: remove an assert from swift headers
An interesting byproduct was finding a problematic `assert` in the
Swift headers. An incomplete `FallthroughStmt` was asserting on having
a destination. I did not find any other sensible way of getting rid of
the crash when running in debug mode than to patch the header.
2022-11-08 11:47:12 +01:00

12 lines
507 B
Diff

diff -ru a/include/swift/AST/Stmt.h b/include/swift/AST/Stmt.h
--- a/include/swift/AST/Stmt.h 2022-09-21 12:56:54.000000000 +0200
+++ b/include/swift/AST/Stmt.h 2022-11-04 14:39:18.407971007 +0100
@@ -920,7 +920,6 @@
/// Get the CaseStmt block to which the fallthrough transfers control.
/// Set during Sema.
CaseStmt *getFallthroughDest() const {
- assert(FallthroughDest && "fallthrough dest is not set until Sema");
return FallthroughDest;
}
void setFallthroughDest(CaseStmt *C) {