--- layout: fc_discuss_archives title: Message 2 from Frama-C-discuss on May 2017 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Support LLVM database "compile_commands.json"



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.

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

I tried to use the  "-save-temps" technique described in
https://lists.gforge.inria.fr/pipermail/frama-c-discuss/2008-October/000600.html
but gcc saves files in current directory which does not scale as it
doesn't preserve the folder hierarchy and some files get rewritten.

There are only releases on the github
(https://github.com/Frama-C/Frama-C-snapshot) and no commit in-between
(might be nice to `git tag` them). Is there another repository to
check out ? (so that contributors don't rewrite some code already done
but not public)

Best regards
Matt