Merge pull request #63341 from hborla/generalize-macro-expansion-expr

[Macros] Generalize `MacroExpansionExpr` and use it for both freestanding and attached macros.
This commit is contained in:
Holly Borla
2023-02-01 11:04:39 -08:00
committed by GitHub
18 changed files with 91 additions and 184 deletions

View File

@@ -2616,18 +2616,6 @@ MacroMissingPound::create(ConstraintSystem &cs, MacroDecl *macro,
return new (cs.getAllocator()) MacroMissingPound(cs, macro, locator);
}
bool MacroMissingArguments::diagnose(const Solution &solution,
bool asNote) const {
AddMissingMacroArguments failure(solution, macro, getLocator());
return failure.diagnose(asNote);
}
MacroMissingArguments *
MacroMissingArguments::create(ConstraintSystem &cs, MacroDecl *macro,
ConstraintLocator *locator) {
return new (cs.getAllocator()) MacroMissingArguments(cs, macro, locator);
}
bool AllowGlobalActorMismatch::diagnose(const Solution &solution,
bool asNote) const {
GlobalActorFunctionMismatchFailure failure(solution, getFromType(),