GCC Middle and Back End API Reference
gcc-rich-location.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "hash-set.h"
#include "vec.h"
#include "input.h"
#include "alias.h"
#include "symtab.h"
#include "inchash.h"
#include "tree-core.h"
#include "tree.h"
#include "diagnostic-core.h"
#include "gcc-rich-location.h"
#include "print-tree.h"
#include "pretty-print.h"
#include "intl.h"
#include "cpplib.h"
#include "diagnostic.h"
Include dependency graph for gcc-rich-location.cc:

Functions

static bool blank_line_before_p (file_cache &fc, location_t loc)
 
static bool use_new_line (file_cache &fc, location_t insertion_point, location_t indent, location_t *out_start_of_line)
 

Function Documentation

◆ blank_line_before_p()

static bool blank_line_before_p ( file_cache & fc,
location_t loc )
static
Return true if there is nothing on LOC's line before LOC.   

References expand_location(), ggc_alloc(), and char_span::length().

Referenced by use_new_line().

◆ use_new_line()

static bool use_new_line ( file_cache & fc,
location_t insertion_point,
location_t indent,
location_t * out_start_of_line )
static
Subroutine of gcc_rich_location::add_fixit_insert_formatted.
Return true if we should add the content on its own line,
false otherwise.
If true is returned then *OUT_START_OF_LINE is written to.   

References blank_line_before_p(), expand_location(), ggc_alloc(), line_table, and UNKNOWN_LOCATION.

Referenced by gcc_rich_location::add_fixit_insert_formatted().