Merge pull request #65313 from hborla/fix-macro-expansion-walking

[Macros] Fix type-checking local pattern bindings in macro-expanded closures.
This commit is contained in:
Holly Borla
2023-04-20 07:39:55 -07:00
committed by GitHub
11 changed files with 83 additions and 25 deletions

View File

@@ -816,13 +816,6 @@ SourceFile *ModuleDecl::getSourceFileContainingLocation(SourceLoc loc) {
return foundSourceFile;
}
bool ModuleDecl::isInGeneratedBuffer(SourceLoc loc) {
SourceFile *file = getSourceFileContainingLocation(loc);
if (!file)
return false;
return file->Kind == SourceFileKind::MacroExpansion;
}
std::pair<unsigned, SourceLoc>
ModuleDecl::getOriginalLocation(SourceLoc loc) const {
assert(loc.isValid());