mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
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.
12 lines
507 B
Diff
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) {
|