/* Declarations relating to class gcc_rich_location
- Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Copyright (C) 2014-2020 Free Software Foundation, Inc.
This file is part of GCC.
Implemented in diagnostic-show-locus.c. */
- bool add_location_if_nearby (location_t loc);
+ bool add_location_if_nearby (location_t loc,
+ bool restrict_to_current_line_spans = true,
+ const range_label *label = NULL);
/* Add a fix-it hint suggesting the insertion of CONTENT before
INSERTION_POINT.
label_text get_text (unsigned /*range_idx*/) const FINAL OVERRIDE
{
- return label_text (const_cast <char *> (m_text), false);
+ return label_text::borrow (m_text);
}
private:
tree m_other_expr;
};
-struct op_location_t;
+class op_location_t;
/* A subclass of rich_location for showing problems with binary operations.