aboutsummaryrefslogtreecommitdiff
path: root/gcc/input.h
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 /gcc/input.h
parentc67c64efbe7082e3453f24016795af52179317b2 (diff)
downloadgcc-63cb3926080e7f7e1b93dd94911ad4720813a081.zip
gcc-63cb3926080e7f7e1b93dd94911ad4720813a081.tar.gz
gcc-63cb3926080e7f7e1b93dd94911ad4720813a081.tar.bz2
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 'gcc/input.h')
-rw-r--r--gcc/input.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/input.h b/gcc/input.h
index e95bd3c..fe80605 100644
--- a/gcc/input.h
+++ b/gcc/input.h
@@ -77,6 +77,11 @@ extern location_t input_location;
comes from a macro expansion, O otherwise. */
#define from_macro_expansion_at(LOC) \
((linemap_location_from_macro_expansion_p (line_table, LOC)))
+/* Return a positive value if LOCATION is the locus of a token that comes from
+ a macro definition, O otherwise. This differs from from_macro_expansion_at
+ in its treatment of macro arguments, for which this returns false. */
+#define from_macro_definition_at(LOC) \
+ ((linemap_location_from_macro_definition_p (line_table, LOC)))
static inline location_t
get_pure_location (location_t loc)