title: LLVM Clang C++ code injection
body: <p>I am a bit confused about implementing a code injection function in LLVM Clang. I basically want to add a function before a variable or a pointer is created in the source code. Example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  int main() {
    int a;
    return 0;
  }
  </code></pre>
  
  <p>to </p>
  
  <pre><code>#include &lt;iostream&gt;
  int main() {
    foo();
    int a;
    return 0;
  }
  </code></pre>
  
  <p>I read the LLVM docs to find an answer but couldn't. Please help me.
  Thank you in advance.</p>