I have written a custom clang Frontend tool according to the following link. http://ift.tt/WYB0vy
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 http://ift.tt/2lL5j8L
From the documentation of this test case, It is written for undefined behavior. And while running ClangTool on this test it throws stackoverflow exception even before the control comes in HandleTranslationUnit.
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.
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.
Thanks in advance!
Thanks, Hemant Bhagat
Aucun commentaire:
Enregistrer un commentaire