This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

DECL_SOURCE_LOCATION including return type and template type


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]