Frama-C-discuss mailing list archives
This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Frama-c-discuss] Support LLVM database "compile_commands.json"
- Subject: [Frama-c-discuss] Support LLVM database "compile_commands.json"
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- Date: Tue, 16 May 2017 12:50:31 +0200
- In-reply-to: <CADHp1NwbeCmzOVdJC6hsbz8CyyoGXUctkQQD=L8YSOyOM=ZReA@mail.gmail.com>
- References: <CADHp1NwbeCmzOVdJC6hsbz8CyyoGXUctkQQD=L8YSOyOM=ZReA@mail.gmail.com>
Hello, 2017-05-05 17:39 GMT+02:00 Matt <mattator at gmail.com>: > Hi, > > I am fairly new to frama-c. I followed the great tutorial on the eva > plugin and I am now trying to run frama-c on the neovim project > (https://github.com/neovim/neovim/wiki/Building-Neovim) to get some > metrics such as cyclomatic complexity. Syntactic metrics are not exactly the main target of Frama-C. Are you planning to use EVA (which looks like a major endeavor on neovim) afterwards? Otherwise, I'm not completely sure this is worth the effort. > I wonder if it's possible to pass several -cpp-command depending on > the file "-cpp-command file1.c -cpp-command file2.c etc" to match the > flags in the compilation database (made popular with clang, can be > generated by cmake/bear and is used in tools such as > chromatica.nvim/YouCompleteMe etc): > https://transfer.sh/EcL5c/compile_commands.json No. support for pre-processing in Frama-C is quite basic. That said, it is possible to do something like frama-c -ocode file1.i -cpp-command cmd1 -print file1.c -then -ocode file2.i -cpp-command cmd2 -print file2.c [...] -then -ocode="" file1.i file2.i [analysis options] or of course frama-c -ocode file1.i -cpp-command cmd1 -print file1.c frama-c -ocode file2.i -cpp-command cmd2 -print file2.c ... frama-c file1.i file2.i ... As an aside, unless you really want to change the whole pre-processor, it's usually better to use -cpp-extra-args="-Iinclude-lib -DFOO ..." rather than -cpp-command. Best regards, -- E tutto per oggi, a la prossima volta Virgile
- References:
- [Frama-c-discuss] Support LLVM database "compile_commands.json"
- From: mattator at gmail.com (Matt)
- [Frama-c-discuss] Support LLVM database "compile_commands.json"
- Prev by Date: [Frama-c-discuss] Pragma-based ACSL syntax
- Next by Date: [Frama-c-discuss] Hello and One Dude of EVA (frama-c)
- Previous by thread: [Frama-c-discuss] Support LLVM database "compile_commands.json"
- Next by thread: [Frama-c-discuss] Frama-C & SPARK Day, May 30th, 2017 - Second call for participation
- Index(es):