Home | History | Annotate | Download | only in Inputs
      1 // Template instantiations are placed into comdat sections. Check that
      2 // coverage data from different instantiations are mapped back to the correct
      3 // source regions.
      4 
      5 template <class T> class FOO {
      6 public:
      7   FOO() : t(0) {}
      8 
      9   T DoIt(T ti);
     10 
     11 private:
     12   T t;
     13 };
     14 
     15 template <class T> T FOO<T>::DoIt(T ti) { // HEADER:  2| [[@LINE]]|template
     16   for (T I = 0; I < ti; I++) {            // HEADER: 22| [[@LINE]]|  for (T
     17     t += I;                               // HEADER: 20| [[@LINE]]|    t += I;
     18     if (I > ti / 2)                       // HEADER: 20| [[@LINE]]|    if (I > ti
     19       t -= 1;                             // HEADER:  8| [[@LINE]]|      t -= 1;
     20   }                                       // HEADER: 10| [[@LINE]]|  }
     21                                           // HEADER:  1| [[@LINE]]|
     22   return t;                               // HEADER:  1| [[@LINE]]|  return t;
     23 }
     24