Stakoverflow exception while parsing clang test file p2-0x.cpp with clang frontend.

Hi,

I have written a custom RecursiveASTVisitor class according to the following link.

http://clang.llvm.org/docs/RAVFrontendAction.html

Now I am giving clang source code to my frontend tool for analysis.

The problem is for the test case

llvm-3.8.1.src\tools\cfe-3.8.1.src\test\CXX\expr\expr.const\p2-0x.cpp

From the documentation of this test case, It is for undefined behaviour.

But clang can generate its AST.

And while running ClangTool on this test it throws stackoverflow exception even before the control comes in HandleTranslationUnit.

I am really very confused about the control flow and why this exception is coming.

Is this the expected behaviour. Then how to traverse the generated AST and visit the nodes.

Thanks,

Hemant Bhagat