<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Jul 7, 2016 at 8:31 AM Andre-Marcel Hellmund 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">Hi Clang-Guys,<br>
<br>
I recently started to look into the clang-tools to enforce coding<br>
guidelines for our development group. Therefore, I played around with<br>
clang-tidy and clang-format (version 3.8 and trunk from Monday), however<br>
ran into a two problems. Before I dive deeper into the code details of<br>
both tools, I would like to check with you for known issues or hints.<br>
<br>
1) While the compilation of the code using CMake (ninja) works fine,<br>
loading the same code via clang-tidy (and the compilation database)<br>
results in an error that a header, omp.h, could not be found. Is this a<br>
known bug for clang-tidy or might this be caused by a defect in CMake?<br></blockquote><div><br></div><div>This is really hard to diagnose without more info.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2) Performing a simple AST match (reduced from the clang-tidy check<br>
'readability-identifier-naming'), that is,<br>
<br>
fieldDecl(isPublic()).bind("public_member")<br>
<br>
results in incorrect matches meaning that privately declared members or<br>
public type definitions of std containers like const_iterator are<br>
matched. Interestingly, I was not yet able to reproduce those errors<br>
with simplified test cases. Are there some known issues with the AST<br>
matchers that could fit my description?<br></blockquote><div><br></div><div>The only known issue is that it's often hard to intuitively understand why things are in the AST. It would be great to have a smaller repro of your problem, otherwise it's really hard to help.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you for your help and support in advance,<br>
Andi<br>
_______________________________________________<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>