[cfe-dev] cindex example produces a warning

Sebastian Redl sebastian.redl at getdesigned.at
Thu Feb 3 00:51:48 PST 2011


On 02.02.2011 22:53, bruce.r.stephens at gmail.com wrote:
> The following (taken from slides on libclang) produces a warning when
> run on a file:
> warning: ./syntax-checker: 'linker' input unused when '-fsyntax-only' is present
>
> Is that expected?
>
> #include "Index.h"
>
> int main(int argc, const char *const argv[]) {
>    CXIndex Index = clang_createIndex(0, 0);
>    CXTranslationUnit TU = clang_parseTranslationUnit(Index, 0,
>                                argv, argc, 0, 0, CXTranslationUnit_None);
Here, the arguments to the example program are simply passed on to 
Clang, except that -fsyntax-only is added. So the question is, how do 
you call the example program?

Sebastian



More information about the cfe-dev mailing list