|
GCC Middle and Back End API Reference
|
#include <tree.h>
Public Member Functions | |
| op_location_t (location_t combined_loc) | |
| op_location_t (location_t operator_loc, location_t combined_loc) | |
| operator location_t () const | |
Data Fields | |
| location_t | m_operator_loc |
| location_t | m_combined_loc |
A struct for encapsulating location information about an operator
and the operation built from it.
m_operator_loc is the location of the operator
m_combined_loc is the location of the compound expression.
For example, given "a && b" the, operator location is:
a && b
^~
and the combined location is:
a && b
~~^~~~
Capturing this information allows for class binary_op_rich_location
to provide detailed information about e.g. type mismatches in binary
operations where enough location information is available:
arg_0 op arg_1
~~~~~ ^~ ~~~~~
| |
| arg1 type
arg0 type
falling back to just showing the combined location:
arg_0 op arg_1
~~~~~~^~~~~~~~
where it is not.
|
inline |
References m_combined_loc, m_operator_loc, and UNKNOWN_LOCATION.
|
inline |
References m_combined_loc, and m_operator_loc.
|
inline |
References m_combined_loc.
| location_t op_location_t::m_combined_loc |
Referenced by op_location_t(), op_location_t(), and operator location_t().
| location_t op_location_t::m_operator_loc |
Referenced by op_location_t(), and op_location_t().