Где прочитать как им пользоваться?
Документация какая-нибудь вообще есть по этому поводу? Нагуглить ничего не смог.
Поковыряв Emacs'овский auto-complete-clang.el, сделал такой тест:
cat -n main.c
1 typedef struct test_s
2 {
3 int a,b;
4 float c;
5 } test_t;
6
7 int main( int argc, char *argv[] )
8 {
9 test_t st;
10 st.
11 tes
12 prin
13 return 0;
14 }
Команда:
cat main.c|clang -cc1 -fsyntax-only -x 'c' -code-completion-at=-:10:5
cat main.c|clang -cc1 -fsyntax-only -x 'c' -code-completion-at=-:11:5
Выдало:
<stdin>:11:3: error: no member named 'te' in 'struct test_s'
te
^
COMPLETION: __func__
COMPLETION: __FUNCTION__
COMPLETION: __PRETTY_FUNCTION__
COMPLETION: _Bool
COMPLETION: _Complex
COMPLETION: _Imaginary
COMPLETION: argc : [#int#]argc
COMPLETION: argv : [#char **#]argv
COMPLETION: char
COMPLETION: const
COMPLETION: double
COMPLETION: enum
COMPLETION: extern
COMPLETION: float
COMPLETION: Pattern : goto <#label#>
COMPLETION: int
COMPLETION: long
COMPLETION: main : [#int#]main(<#int argc#>, <#char **argv#>)
COMPLETION: restrict
COMPLETION: Pattern : return <#expression#>
COMPLETION: short
COMPLETION: signed
COMPLETION: Pattern : sizeof(<#expression-or-type#>)
COMPLETION: st : [#test_t#]st
COMPLETION: static
COMPLETION: struct
COMPLETION: test_t : test_t
COMPLETION: Pattern : typedef <#type#> <#name#>
COMPLETION: Pattern : typeof <#expression#>
COMPLETION: Pattern : typeof(<#type#>)
COMPLETION: union
COMPLETION: unsigned
COMPLETION: Pattern : using namespace <#identifier#>
COMPLETION: void
COMPLETION: volatile
1 error generated.