@@ -62,17 +62,6 @@ struct SwiftDiagnostic {
6262
6363 std::optional<SwiftDiagnosticsLocation> location{};
6464
65- // optional arguments can be either Severity or Visibility to set the corresponding field.
66- // TODO(C++20) this constructor won't really be necessary anymore with designated initializers
67- template <typename ... OptionalArgs>
68- constexpr SwiftDiagnostic (std::string_view id,
69- std::string_view name,
70- std::string_view action,
71- OptionalArgs... optionalArgs)
72- : id{id}, name{name}, action{action} {
73- (setOptionalArg (optionalArgs), ...);
74- }
75-
7665 // create a JSON diagnostics for this source with the given `timestamp` and Markdown `message`
7766 // A markdownMessage is emitted that includes both the message and the action to take. The id is
7867 // used to construct the source id in the form `swift/<prog name>/<id>`
@@ -116,14 +105,15 @@ inline constexpr SwiftDiagnostic::Visibility operator&(SwiftDiagnostic::Visibili
116105}
117106
118107constexpr SwiftDiagnostic internalError{
119- " internal-error" ,
120- " Internal error" ,
121- " Some or all of the Swift analysis may have failed.\n "
122- " \n "
123- " If the error persists, contact support, quoting the error message and describing what "
124- " happened, or [open an issue in our open source repository][1].\n "
125- " \n "
126- " [1]: https://github.com/github/codeql/issues/new?labels=bug&template=ql---general.md" ,
127- SwiftDiagnostic::Severity::warning,
108+ .id = " internal-error" ,
109+ .name = " Internal error" ,
110+ .action =
111+ " Some or all of the Swift analysis may have failed.\n "
112+ " \n "
113+ " If the error persists, contact support, quoting the error message and describing what "
114+ " happened, or [open an issue in our open source repository][1].\n "
115+ " \n "
116+ " [1]: https://github.com/github/codeql/issues/new?labels=bug&template=ql---general.md" ,
117+ .severity = SwiftDiagnostic::Severity::warning,
128118};
129119} // namespace codeql
0 commit comments