/// The ID of the diagnostic.
unsigned DiagnosticID;
+
+ /// The Option Flag for the diagnostic
+ std::string WarningOption;
/// The level of the diagnostic.
DiagnosticsEngine::Level DiagnosticLevel;
<< " ";
EmitString(OS, DE.Message) << '\n';
}
+ OS << " <key>ID</key>\n"
+ << " ";
+ EmitInteger(OS, DE.DiagnosticID) << '\n';
+ if (!DE.WarningOption.empty()) {
+ OS << " <key>WarningOption</key>\n"
+ << " ";
+ EmitString(OS, DE.WarningOption) << '\n';
+ }
OS << " </dict>\n";
}
DE.DiagnosticID = Info.getID();
DE.DiagnosticLevel = Level;
+ DE.WarningOption = DiagnosticIDs::getWarningOptionForDiag(DE.DiagnosticID);
+
// Format the message.
SmallString<100> MessageStr;
Info.FormatDiagnostic(MessageStr);