mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #37320 from fwcd/sourcekit-diagnostic-ids
[SourceKit] Add id and category to diagnostics
This commit is contained in:
@@ -100,6 +100,14 @@ void EditorDiagConsumer::handleDiagnostic(SourceManager &SM,
|
||||
|
||||
DiagnosticEntryInfo SKInfo;
|
||||
|
||||
SKInfo.ID = DiagnosticEngine::diagnosticIDStringFor(Info.ID).str();
|
||||
|
||||
if (Info.Category == "deprecation") {
|
||||
SKInfo.Categories.push_back(DiagnosticCategory::Deprecation);
|
||||
} else if (Info.Category == "no-usage") {
|
||||
SKInfo.Categories.push_back(DiagnosticCategory::NoUsage);
|
||||
}
|
||||
|
||||
// Actually substitute the diagnostic arguments into the diagnostic text.
|
||||
llvm::SmallString<256> Text;
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user