나는 dump the include paths에 GCC를 얻기 위해 노력하고처럼 내 .clang_complete
파일은 이제 같습니다linux 커널 모듈 개발을 위해 clang_complete를 어떻게 구성합니까?
-std=gnu89
-nostdinc
-I/usr/src/linux-headers-3.0.0-16-generic/arch/x86/include
-I/lib/modules/3.0.0-16-generic/build/arch/x86/include/generated
-I/lib/modules/3.0.0-16-generic/build/include
-I/lib/modules/3.0.0-16-generic/build/ubuntu/include
-I/usr/lib/gcc/i686-linux-gnu/4.6.1/include
-D__KERNEL__
-DMODULE
그러나 libclang
여전히 오류의 톤을 불평 & 경고 간단한 인사 세계 커널 모듈을 편집.
1 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|24 col 42 warning| declaration of 'struct list_head' will not be visible outside of this function
2 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|26 col 6 error| incomplete definition of type 'struct list_head'
3 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|24 col 42 info| forward declaration of 'struct list_head'
4 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|27 col 6 error| incomplete definition of type 'struct list_head'
5 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|24 col 42 info| forward declaration of 'struct list_head'
6 /lib/modules/3.0.0-16-generic/build/include/linux/list.h|37 col 38 warning| declaration of 'struct list_head' will not be visible outside of this function
...
<linux/types.h>
struct list_head
에서의 정의는 이미 <linux/list.h>
으로 포함된다. 모두 내부에 있습니다 /lib/modules/3.0.0-16-generic/build/include