<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
I'm writing a some tool for doing static analysis on C++ code.<br>
<br>
My tool has obviously two inputs: the file(s) to check (let's say <i>f.cpp</i>)
and the property to check .<br>
<br>
Currently (I'm in a early stage of development), I want to describe
the property directly in C++ (let's say <i>prop.cpp</i>).<br>
and use clang/libtooling to read it .The thing is that the property
will use symbols that are defined in the code to analyze.<br>
<br>
Thus, I wish to parse <i>prop.cpp </i>knowing <i>f.cpp</i>'s AST
so I don't run into unknown symbols. But I haven't been successful
so far.<br>
<br>
i could cheat and merge the two files in a temporary file but I
don't like that idea.<br>
I could also require <i>prop.cpp </i>to be self contained (with
all the headers needed) but that would hinder the tool's usability
(headers to include, need to provide to clang all the compilation
options...). <br>
<br>
If you have any lead,<br>
<br>
Thanks,<br>
David.<br>
</body>
</html>