cc_args.py bundled with clang_complete may be useful to you. It should create a valid .clang_complete file. Unfortunately (I just tested it and I will try to fix it), it does not work here (the .clang_complete file cannot be created).
However, by changing the script and its result, I was able to create a valid .clang_complete file:
-D__KERNEL__ -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -nostdinc -I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include -I/usr/src/linux-3.2.12-1-ARCH/arch/x86/include -I/usr/src/linux-3.2.12-1-ARCH/arch/x86/include/generated -I/usr/src/linux-3.2.12-1-ARCH/include -DMODULE -DKBUILD_STR(s)=
With this .clang_complete, for more information about this, there is only one error related to __kfree_rcu: https://lkml.org/lkml/2012/1/12/2
source share