Ensure that buffers containing Clang swift_attr attributes are parsed as attributes

Previously, they were being parsed as top-level code, which would cause
errors because there are no definitions. Introduce a new
GeneratedSourceInfo kind to mark the purpose of these buffers so the
parser can handle them appropriately.
This commit is contained in:
Doug Gregor
2024-11-12 22:15:36 -08:00
parent 29315e656b
commit 989c73d014
15 changed files with 45 additions and 5 deletions

View File

@@ -972,6 +972,7 @@ public:
case GeneratedSourceInfo::DefaultArgument:
case GeneratedSourceInfo::ReplacedFunctionBody:
case GeneratedSourceInfo::PrettyPrinted:
case GeneratedSourceInfo::Attribute:
break;
}
}