DECL_SOURCE_LOCATION including return type and template type
Martin Liška
mliska@suse.cz
Mon Mar 11 12:12:00 GMT 2019
Hi.
For a test-case like:
ââââââââ¬âââââââââââââââââââââââââââââââââ
â File: test.cpp
ââââââââ¼âââââââââââââââââââââââââââââââââ
1 â template <class T>
2 â T
3 â abs(T x) {
4 â if (x < 0) {
5 â return -x;
6 â } else {
7 â return x;
8 â }
9 â }
10 â
11 â int main(int argc, char **argv)
12 â {
13 â return abs<int> (argc);
14 â }
it would be handy in GCOV to provide extended source location
which would include return type and template type.
Right now, DECL_SOURCE_LOCATION is:
test.cpp:3:1-9:1
Would it be possible to achieve?
Thanks,
Martin
More information about the Gcc
mailing list