From: Richard Palethorpe <rpalethorpe@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH v2 0/2] Libclang based analyzer
Date: Mon, 07 Jun 2021 11:20:02 +0100 [thread overview]
Message-ID: <87bl8i563x.fsf@suse.de> (raw)
In-Reply-To: <85bddc61-f6dc-de7c-3a62-daeefcd0a058@jv-coder.de>
Hello Joerg,
Joerg Vehlow <lkml@jv-coder.de> writes:
> Hi,
>
> just one quick remark. I guess the whole reason for using clang over
> coccinelle was availability of clang on developer systems.
> I just wanted to quickly check your work, but had no clang
> installed. Build fail, even with cyril's patch for CHECK_TARGETS,
> because clang-c/Index.h is not found.
Thanks for testing it.
>
> On ubuntu 20.04, this file is part of libclang-dev, but installing it
> did not help either, because it is installed to an include path not
> know to gcc (/usr/lib/llvm-10/include/clang-c).
Is part of this path the same that 'clang -print-resource-dir' prints?
Either way I guess we can search for this during configuration. LLVM has
a CMake module (or w/e) which probably finds all this automatically.
> I added it to the include path and it was found, but the next problem
> is, that some used functions (like clang_Cursor_getVarDeclInitializer)
> are only available starting with libclang 12.
>
I guess that we could replace that function by recursing further into
the AST to find the initializer ourselves.
Probably we can restrict ourselves to only use functions from before
libclang 11.
>
> So in conclusion, I do not think we can assume libclang to be
> available for all developers and installing it is probably more work,
> at least when newer functions from libclang are used, than installing
> coccinelle.
IIRC Cyril said the Coccinelle package on Gentoo is not maintained
anymore. AFAICT it exists, but it is on an old version. I don't think
many people are interested in or want to maintain Ocaml
stuff. LLVM/Clang OTOH looks to be very active.
> And very important for final setup: It must be possible to
> successfully compile ltp, without libclang/coccinelle available. There
> is no reason to force this libraries/tools for pure "users" of ltp.
>
> J?rg
100% agree. These checks only make sense during development. Even then I
want to ensure that everyone can run the checks with very little
effort.
--
Thank you,
Richard.
next prev parent reply other threads:[~2021-06-07 10:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 11:14 [LTP] [RFC PATCH v2 0/2] Libclang based analyzer Richard Palethorpe
2021-06-04 11:14 ` [LTP] [RFC PATCH v2 1/2] Add 'make check' and clang-check to build system Richard Palethorpe
2021-06-04 14:10 ` Petr Vorel
2021-06-04 14:11 ` Cyril Hrubis
2021-06-04 14:28 ` Richard Palethorpe
2021-06-04 14:33 ` Cyril Hrubis
2021-06-07 9:18 ` Joerg Vehlow
2021-06-07 9:12 ` Cyril Hrubis
2021-06-11 13:49 ` Petr Vorel
2021-06-11 14:17 ` Petr Vorel
2021-06-14 11:09 ` Richard Palethorpe
2021-06-04 11:14 ` [LTP] [RFC PATCH v2 2/2] Start libclang based analyzer and TEST() check Richard Palethorpe
2021-06-04 12:52 ` [LTP] [RFC PATCH v2 0/2] Libclang based analyzer Cyril Hrubis
2021-06-04 13:50 ` Richard Palethorpe
2021-06-07 8:37 ` Joerg Vehlow
2021-06-07 9:14 ` Cyril Hrubis
2021-06-07 10:20 ` Richard Palethorpe [this message]
2021-06-07 11:34 ` Joerg Vehlow
2021-06-07 13:42 ` Cyril Hrubis
2021-06-07 13:49 ` Richard Palethorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bl8i563x.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox