<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Mar 15, 2016 at 11:11 AM David Come via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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></div></blockquote><div><br></div><div>Unfortunately, that's a general restriction of C++ tools. C++ is unparsable without knowing the full types.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<br>
If you have any lead,<br>
<br>
Thanks,<br>
David.<br>
</div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>