* DECL_SOURCE_LOCATION including return type and template type
@ 2019-03-11 12:12 Martin Liška
2019-05-07 7:07 ` Martin Liška
0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2019-03-11 12:12 UTC (permalink / raw)
To: GCC Development, Jason Merrill, Marek Polacek, David Malcolm
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: DECL_SOURCE_LOCATION including return type and template type
2019-03-11 12:12 DECL_SOURCE_LOCATION including return type and template type Martin Liška
@ 2019-05-07 7:07 ` Martin Liška
0 siblings, 0 replies; 2+ messages in thread
From: Martin Liška @ 2019-05-07 7:07 UTC (permalink / raw)
To: GCC Development, Jason Merrill, Marek Polacek, David Malcolm
PING^1
On 3/11/19 1:12 PM, Martin Liška wrote:
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-07 7:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 12:12 DECL_SOURCE_LOCATION including return type and template type Martin Liška
2019-05-07 7:07 ` Martin Liška
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).