mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[AST] Merge BridgedDiagnosticEngine + BridgedDiagEngine
Introduce a macro that can stamp out wrapper classes for underlying C++ pointers, and use it to define BridgedDiagnosticEngine in ASTBridging. Then, migrate users of BridgedDiagEngine onto it.
This commit is contained in:
@@ -40,12 +40,12 @@ ParserResult<Expr> Parser::parseExprRegexLiteral() {
|
||||
auto capturesBuf = Context.AllocateUninitialized<uint8_t>(
|
||||
RegexLiteralExpr::getCaptureStructureSerializationAllocationSize(
|
||||
regexText.size()));
|
||||
bool hadError =
|
||||
regexLiteralParsingFn(regexText.str().c_str(), &version,
|
||||
/*captureStructureOut*/ capturesBuf.data(),
|
||||
/*captureStructureSize*/ capturesBuf.size(),
|
||||
/*diagBaseLoc*/ {(const uint8_t *)(Tok.getLoc().getOpaquePointerValue())},
|
||||
getBridgedDiagnosticEngine(&Diags));
|
||||
bool hadError = regexLiteralParsingFn(
|
||||
regexText.str().c_str(), &version,
|
||||
/*captureStructureOut*/ capturesBuf.data(),
|
||||
/*captureStructureSize*/ capturesBuf.size(),
|
||||
/*diagBaseLoc*/ {(const uint8_t *)(Tok.getLoc().getOpaquePointerValue())},
|
||||
&Diags);
|
||||
auto loc = consumeToken();
|
||||
SourceMgr.recordRegexLiteralStartLoc(loc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user