title: How to get the location of the right parenthesis of a condition in Clang?
body: <p>I'm using the clang library to do some c++ AST manipulation. I would like to get the location of the right parenthesis of a condition of an <code>IfStmt</code>.
  I tried:</p>
  
  <pre><code>auto condLocEnd = statement-&gt;getCond()-&gt;getLocEnd();
  auto condLoc = Lexer::findLocationAfterToken(condLocEnd, tok::r_paren, sm, LangOptions(), false);
  </code></pre>
  
  <p>Unfortunately <code>condLoc</code> is invalid when the condition contains a macro.
  Eg: <code>if(p == NULL)</code>. I can't figure out how to get the location. How to get it ?</p>