<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Sep 9, 2015 at 5:11 PM Bhargava Shastry 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,<br>
<br>
I plan to implement a stand-alone tool based off of libTooling<br>
infrastructure that includes both AST and Analyzer Frontend actions.<br>
Think of it as a clone of clang-check.<br></blockquote><div><br></div><div>We have clang-tidy. Have you seen that? It allows to implement your own AST based checks, and comes with analyzer checks out of the box.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I intend to build this tool outside of the LLVM/Clang source tree.<br>
Naturally, I have added libclangStaticAnalyzer* libraries to the link<br>
section of my tool's cmake file.<br>
<br>
Problem is, a handful of clang SA symbols are unresolved at link time.<br>
Most of them have to do with const strings in the<br>
clang::ento::categories namespace. Any ideas why this is happening and<br>
how it can be fixed? FWIW, I tried to build against LLVM source tree<br>
*and* an ubuntu installation of libclang-dev libraries. Both lead to the<br>
following set of (sample) link-time errors.<br>
<br>
```<br>
llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp:200:<br>
error: undefined reference to<br>
'clang::ento::categories::CoreFoundationObjectiveC'<br>
lvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h:70:<br>
error: undefined reference to 'clang::ento::categories::LogicError'<br>
llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:239:<br>
error: undefined reference to 'clang::ento::categories::UnixAPI'<br>
```<br>
<br>
Thanks,<br>
Bhargava<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>