<div dir="ltr">Okay I will look into this thank you. <div><br></div><div>Can you please tell me if I will be able to have control over all Preprocessor directives and over the full C++ AST using either Libclang or Libtooling?</div>
<div><br></div><div style>The aim of my project is to import C++ code (including included files) into a Visual Environment.</div><div style>Meaning i need to know in which file something was declared/defined is there a way to see this in just the AST?</div>
<div style><br></div><div style>I just have the fear that LibClang and LibTooling will not be enough for the whole task..?</div><div style><br></div><div style>I appreciate any comment/help on this.</div><div style><br></div>
<div style>Cheers,</div><div style>Lukas</div><div style><br></div><div style><br></div><div style><br></div><div style> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/1 Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Using CompilerInstance is non-trivial. To make your life easier, there's LibTooling:<div><a href="http://clang.llvm.org/docs/LibTooling.html" target="_blank">http://clang.llvm.org/docs/LibTooling.html</a><br>
</div><div>
<br></div><div>If you want a more stable interface I'd suggest you also take a look at LibClang.</div><div><br></div><div>Cheers,</div><div>/Manuel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div class="h5">
On Thu, Feb 28, 2013 at 11:18 PM, Lukas Vogel <span dir="ltr"><<a href="mailto:lukedirtwalkerdev@gmail.com" target="_blank">lukedirtwalkerdev@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr">Hi,<div><br></div><div>I try to parse c++ code, for now just very simple code like this:</div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(255,255,85)">class</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,85)">Testing</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">{</span></pre>



<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(255,255,85)">public</span><span style="color:rgb(170,170,170)">:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(85,255,85)">Testing</span><span style="color:rgb(170,170,170)">(){}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(170,170,170)">};</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(170,170,170)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(170,170,170)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(170,170,170)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(170,170,170)">My Code is based on a CompilerInstance but I always get the following </span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><p style="margin:0px"><span style="font-family:monospace;font-size:9pt;color:rgb(180,9,9)">error: unknown type name 'class'</span></p><p style="margin:0px"><span style="font-family:monospace;font-size:9pt;color:rgb(180,9,9)"><br>


</span></p><p style="margin:0px"><span style="font-family:monospace;font-size:9pt;color:rgb(180,9,9)">I tried to somehow set the LangOptions but still didn't get it to work...</span></p><p style="margin:0px"><br></p>

<p style="margin:0px">
<font color="#b40909">My code is here </font><a href="https://github.com/lukedirtwalker/Envision/blob/cppimport/CppImport/src/cppimportmanager.cpp" style="font-family:arial" target="_blank">https://github.com/lukedirtwalker/Envision/blob/cppimport/CppImport/src/cppimportmanager.cpp</a> </p>


<p style="margin:0px"><br></p><p style="margin:0px">Thanks for any help :)</p></pre>
<pre style="margin-top:0px;margin-bottom:0px"></pre></div></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>