From 3de8a540d8905f8820166960754bb6bb39bfbb44 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 20 Nov 2009 08:18:16 +0000 Subject: macro.c (enter_macro_context): Call cb.used callback if defined. * macro.c (enter_macro_context): Call cb.used callback if defined. * directives.c (do_idef, do_ifndef): Ditto. * include/cpplib.h (struct cpp_callbacks): Add used callback. From-SVN: r154359 --- libcpp/include/cpplib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libcpp/include/cpplib.h') diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index e95f01a..6175bbc 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -508,6 +508,9 @@ struct cpp_callbacks /* Called before #define and #undef or other macro definition changes are processed. */ void (*before_define) (cpp_reader *); + /* Called whenever a macro is expanded or tested. + Second argument is the location of the start of the current expansion. */ + void (*used) (cpp_reader *, source_location, cpp_hashnode *); }; #ifdef VMS -- cgit v1.1