[cfe-dev] Linking to libclangStaticAnalyzer out-of-tree
Manuel Klimek via cfe-dev
cfe-dev at lists.llvm.org
Thu Sep 10 02:58:44 PDT 2015
On Wed, Sep 9, 2015 at 5:11 PM Bhargava Shastry via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> I plan to implement a stand-alone tool based off of libTooling
> infrastructure that includes both AST and Analyzer Frontend actions.
> Think of it as a clone of clang-check.
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.
> I intend to build this tool outside of the LLVM/Clang source tree.
> Naturally, I have added libclangStaticAnalyzer* libraries to the link
> section of my tool's cmake file.
> Problem is, a handful of clang SA symbols are unresolved at link time.
> Most of them have to do with const strings in the
> clang::ento::categories namespace. Any ideas why this is happening and
> how it can be fixed? FWIW, I tried to build against LLVM source tree
> *and* an ubuntu installation of libclang-dev libraries. Both lead to the
> following set of (sample) link-time errors.
> error: undefined reference to
> error: undefined reference to 'clang::ento::categories::LogicError'
> error: undefined reference to 'clang::ento::categories::UnixAPI'
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev