<div dir="ltr">Thanks a lot,<div><br></div><div>After looking  at the color_coded and a little more research I found these 2 functions created specifically for the syntax highlighting purpose:</div><div>clang_tokenize() and clang_annotateTokens()</div><div><br></div><div>Davit</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 25, 2015 at 6:40 PM, Benjamin Kramer <span dir="ltr"><<a href="mailto:benny.kra@gmail.com" target="_blank">benny.kra@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Dec 25, 2015 at 2:39 PM, Davit Samvelyan via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
> Hi,<br>
><br>
> Sorry if this email is off topic.<br>
><br>
> Today I've got this sticky idea, to do a semantic highlighting of C++ source<br>
> in Vim using YouCompleteMe's infrastructure.<br>
> For the start I would like to be able get  class, namespace, enum... names<br>
> and highlight them.<br>
><br>
> So I dug in, and didn't find anything similar in the libclang C API (the one<br>
> used by YCM).<br>
> I'm not sure how to do it right with the C++ API: to traverse the whole AST<br>
> or there is a better/cheaper way to do it? (for example judging by its name<br>
> ASTContext::getTypes() is doing something similar)<br>
><br>
> So if anyone is interested in the topic and is willing to help me by giving<br>
> initial direction or guiding me, and if I will be allowed to add such<br>
> functionality into the libclang C API :) I will be glad to work on this.<br>
<br>
</span>There is color_coded [1] which does semantic highlighting in vim via<br>
libclang, maybe you can take some ideas from it.<br>
<br>
- Ben<br>
<br>
[1] <a href="https://github.com/jeaye/color_coded" rel="noreferrer" target="_blank">https://github.com/jeaye/color_coded</a><br>
</blockquote></div><br></div>