title: Exception during running custom clang Frontend tool on some input files
body: <p>I have written a custom clang Frontend tool according to the following link.
  <a href="http://clang.llvm.org/docs/RAVFrontendAction.html" rel="nofollow noreferrer">http://clang.llvm.org/docs/RAVFrontendAction.html</a></p>
  
  <p>Now I am giving clang source code itself to my frontend tool for static analysis.
  My tool is throwing an exception for this test case
  <a href="https://llvm.org/svn/llvm-project/cfe/trunk/test/CXX/expr/expr.const/p2-0x.cpp" rel="nofollow noreferrer">https://llvm.org/svn/llvm-project/cfe/trunk/test/CXX/expr/expr.const/p2-0x.cpp</a></p>
  
  <p>From the documentation of this test case, It is written for undefined behavior.
  And while running ClangTool on this test it throws <strong>stackoverflow exception even before the control comes in HandleTranslationUnit</strong>.</p>
  
  <p>As clang can generate AST for the above test case, I assume the exception might be coming during compilation. Now the question is can't I continue visiting AST nodes for such files as I don't care about the semantics of input source files. I am only interested in static analysis.</p>
  
  <p>Is this the expected behavior? Then how to traverse the generated AST and visit the nodes. I am really stuck at this moment and have no clue how to proceed.
  Would you please help me to fix this issue.</p>
  
  <p>Thanks in advance!</p>
  
  <p>Thanks,
  Hemant Bhagat</p>