[cfe-dev] clang_indexSourceFile and CXCursor_(ParmDecl|VarDecl|DeclRefExpr)

Anders Bakken agbakken at gmail.com
Fri Jan 13 18:48:42 PST 2012


Sweet. That sounds like just what we need. Will try out.

Thanks

Anders

On Fri, Jan 13, 2012 at 6:14 PM, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:
> Skipping function-local symbols was intentional, but it is a reasonable request to get callbacks for such symbols.
> After r148160 & r148169 you can set CXIndexOpt_IndexFunctionLocalSymbols at indexing options to get callbacks for function-local symbols.
>
> I don't see issue with the 'diagnostic' callback. Try using 'c-index-test' like this:
>
> c-index-test -index-file <compiler args>
>
> on your source file. You should see 'diagnostic' getting called for errors/warnings.
>
> -Argyrios
>
> On Jan 13, 2012, at 1:10 PM, David Mirabito wrote:
>
>> Hi All,
>>
>> For the record once I got syntax colouring working (tokenise and attribute the resulting list) I moved on to flagging warnings / errors (a-la XCode). I too was surprised that only some declarations/references were raised to the callback functions - most seemed related to global and cross-translation unit. All the 'internal' stuff was stripped.
>> Additionally, try as I might I cannot get the 'diagnostic' callback to be triggered, whether I introduce warnings or errors in the parsed code.
>>
>> At first I thought it was just me or my app doing something stupid :)
>>
>> I might try migrating to visitChildren and the explicit API calls to get and walk the diagnostic list of a TU.
>>
>> Cheers,
>> DavidM
>>
>> On 13/01/2012, at 3:06 AM, Anders Bakken wrote:
>> <snip>
>>> No mention of either the local variable inside foo(int) or the
>>> parameter. Is this the way it's supposed to be? I've noticed a lot
>>> work has gone into these new APIs.
>>>
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list