diff options
Diffstat (limited to 'gcc/diagnostic-format-sarif.cc')
-rw-r--r-- | gcc/diagnostic-format-sarif.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/diagnostic-format-sarif.cc b/gcc/diagnostic-format-sarif.cc index 9510f4a..1bb7286 100644 --- a/gcc/diagnostic-format-sarif.cc +++ b/gcc/diagnostic-format-sarif.cc @@ -536,8 +536,8 @@ sarif_builder::make_result_object (diagnostic_context *context, /* "ruleId" property (SARIF v2.1.0 section 3.27.5). */ /* Ideally we'd have an option_name for these. */ if (char *option_text - = context->m_option_name (context, diagnostic->option_index, - orig_diag_kind, diagnostic->kind)) + = context->make_option_name (diagnostic->option_index, + orig_diag_kind, diagnostic->kind)) { /* Lazily create reportingDescriptor objects for and add to m_rules_arr. Set ruleId referencing them. */ @@ -639,15 +639,10 @@ make_reporting_descriptor_object_for_warning (diagnostic_context *context, it seems redundant compared to "id". */ /* "helpUri" property (SARIF v2.1.0 section 3.49.12). */ - if (context->m_get_option_url) + if (char *option_url = context->make_option_url (diagnostic->option_index)) { - char *option_url - = context->m_get_option_url (context, diagnostic->option_index); - if (option_url) - { - reporting_desc->set_string ("helpUri", option_url); - free (option_url); - } + reporting_desc->set_string ("helpUri", option_url); + free (option_url); } return reporting_desc; |