title: Doxygen doesn't generate References function call relation for class method whose object created indirectly
body: <p>References to <code>Array&lt;&gt;::print</code> is missing for <code>testTemplate</code> in document generated for below example documentation:</p>
  <p><img src="https://i.stack.imgur.com/Y86dU.png" alt="doc" />.</p>
  <pre><code>#include&quot;lib.h&quot;
  using namespace std;
  void testTemplate(void);
  int main()
  {
      testTemplate();
      return 0;
  }
  
  void testTemplate(void)
  {
      int arr[5] = {1, 2, 3, 4, 5};
      using array_type = Array&lt;int&gt;;
      array_type array2(arr, 5);
      array2.print();
  }
  
  #include&lt;iostream&gt;
  
  template &lt;typename T&gt;
  class Array
  {
  private:
      T *ptr;
      int size;
  public:
      Array(T arr[], int s);
      void print();
  };
  
  template &lt;typename T&gt;
  Array&lt;T&gt;::Array(T arr[], int s)
  {
      ptr = new T[s];
      size = s;
      for(int i = 0; i &lt; size; i++)
      {
          ptr[i] = arr[i];
      }
  }
  
  template &lt;typename T&gt;
  void Array&lt;T&gt;::print()
  {
      for (int i = 0; i &lt; size; i++)
      {
          std::cout&lt;&lt;&quot; &quot;&lt;&lt;*(ptr + i);
      }
      std::cout&lt;&lt;std::endl;
  }
  </code></pre>
  <p>Doxygen settings:</p>
  <pre><code>EXTRACT_ALL            = YES
  EXTRACT_PRIVATE        = YES
  EXTRACT_PACKAGE        = YES
  EXTRACT_STATIC         = YES
  EXTRACT_LOCAL_CLASSES  = YES
  EXTRACT_LOCAL_METHODS  = YES
  EXTRACT_ANON_NSPACES   = YES
  RESOLVE_UNNAMED_PARAMS = YES
  REFERENCED_BY_RELATION = YES
  REFERENCES_RELATION    = YES
  </code></pre>
  <p><em><strong>Exmaple 2: similar use case</strong></em></p>
  <p>file &lt;project_name.h&gt;</p>
  <pre><code>class ProjectName
  {
  public:
      int arr[5] = {1, 2, 3, 4, 5};
      Array&lt;int&gt; array_type;
  
      ProjectName(void):array_type(arr,5)
      {
      }
  
      void print(void)
      {
          std::cout&lt;&lt;&quot;Hello World&quot;&lt;&lt;std::endl;
      }
  };
  
  ProjectName&amp; getProjectName(void);
  </code></pre>
  <p>file &lt;project_name.cpp&gt;</p>
  <pre><code>#include &quot;project_name.h&quot;
  
  ProjectName&amp; getProjectName(void)
  {
      static ProjectName obj;
      return obj;
  }
  </code></pre>
  <p>file &lt;main.cpp&gt;</p>
  <pre><code>#include &lt;iostream&gt;
  #include&quot;project_name.h&quot;
  
  using namespace std;
  
  void testTemplate(void);
  
  int main()
  {
      testTemplate();
      return 0;
  }
  
  void testTemplate(void)
  {
      ProjectName&amp; project = getProjectName();
      project.print();
      project.array_type.print();
  }
  </code></pre>
  <p>References to <code>Array&lt;&gt;::print</code> is missing for <code>testTemplate</code> in generated document <a href="https://i.stack.imgur.com/EPgOy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EPgOy.png" alt="enter image description here" /></a>:</p>