aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-09-21 15:59:29 -0400
committerJason Merrill <jason@gcc.gnu.org>2016-09-21 15:59:29 -0400
commit63cb3926080e7f7e1b93dd94911ad4720813a081 (patch)
tree452d1f9ed62885789446c7406e5160af2992acdd /libcpp/include
parentc67c64efbe7082e3453f24016795af52179317b2 (diff)
downloadgcc-63cb3926080e7f7e1b93dd94911ad4720813a081.tar.gz
gcc-63cb3926080e7f7e1b93dd94911ad4720813a081.tar.bz2
gcc-63cb3926080e7f7e1b93dd94911ad4720813a081.zip
Add from_macro_definition_at predicate for locations.
gcc/ * input.h (from_macro_definition_at): New. libcpp/ * line-map.c (linemap_location_from_macro_definition_p): New. * line-map.h: Declare it. From-SVN: r240330
Diffstat (limited to 'libcpp/include')
-rw-r--r--libcpp/include/line-map.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 747609d4393..8be98b5f597 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -1086,12 +1086,16 @@ const char* linemap_map_get_macro_name (const line_map_macro *);
int linemap_location_in_system_header_p (struct line_maps *,
source_location);
-/* Return TRUE if LOCATION is a source code location of a token coming
- from a macro replacement-list at a macro expansion point, FALSE
- otherwise. */
+/* Return TRUE if LOCATION is a source code location of a token that is part of
+ a macro expansion, FALSE otherwise. */
bool linemap_location_from_macro_expansion_p (const struct line_maps *,
source_location);
+/* TRUE if LOCATION is a source code location of a token that is part of the
+ definition of a macro, FALSE otherwise. */
+bool linemap_location_from_macro_definition_p (struct line_maps *,
+ source_location);
+
/* With the precondition that LOCATION is the locus of a token that is
an argument of a function-like macro MACRO_MAP and appears in the
expansion of MACRO_MAP, return the locus of that argument in the