diff --git a/include/swift/AST/ASTBridging.h b/include/swift/AST/ASTBridging.h index 50985bf7ee7ef..3d26622667e4b 100644 --- a/include/swift/AST/ASTBridging.h +++ b/include/swift/AST/ASTBridging.h @@ -40,9 +40,10 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) BridgedDiagID : uint32_t { #include "swift/AST/DiagnosticsAll.def" } BridgedDiagID; -struct BridgedDiagnosticEngine { +// Must match the definition of BridgedDiagnosticEngine in CASTBridging.h. +typedef struct { void * _Nonnull object; -}; +} BridgedDiagnosticEngine; struct BridgedOptionalDiagnosticEngine { void *_Nullable object; @@ -66,7 +67,7 @@ class BridgedDiagnosticArgument { }; class BridgedDiagnosticFixIt { - int64_t storage[6]; + int64_t storage[7]; public: #ifdef USED_IN_CPP_SOURCE diff --git a/lib/AST/ASTBridging.cpp b/lib/AST/ASTBridging.cpp index a6d8a42ab3d2e..db58aaa98fe1b 100644 --- a/lib/AST/ASTBridging.cpp +++ b/lib/AST/ASTBridging.cpp @@ -35,7 +35,7 @@ BridgedDiagnosticArgument::BridgedDiagnosticArgument(BridgedStringRef s) : BridgedDiagnosticArgument(DiagnosticArgument(s.get())) {} static_assert(sizeof(BridgedDiagnosticFixIt) >= sizeof(DiagnosticInfo::FixIt), - "BridgedDiagnosticArgument has wrong size"); + "BridgedDiagnosticFixIt has wrong size"); static SourceLoc getSourceLoc(BridgedSourceLoc bridgedLoc) { return SourceLoc(llvm::SMLoc::getFromPointer(bridgedLoc.getLoc()));