[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] API for auto type deduction in libclang
From:       Jacob Carlborg <doob () me ! com>
Date:       2014-01-29 12:01:37
Message-ID: lcaqil$o05$1 () ger ! gmane ! org
[Download RAW message or body]

On 2014-01-29 11:30, Kevin Funk wrote:

> It would be nice if someone with a deeper understanding of libclang internals
> could have a look at our small tool at [1] and check if we're doing something
> wrong. Or if that just *can't* work with the current API at hand.
>
> Sorry if I'm missing something obvious.

It works correctly for me using libclang 3.3 on OS X. It prints "int" as 
the type, not "auto". Here's also the same code that uses 
"clang_getCanonicalType" and a switch statement on "type.kind" as I 
tried to explain:

http://pastebin.com/xMPn7kS6

I would consider my example only a workaround since it seems to work, at 
least on libclang 3.3.

-- 
/Jacob Carlborg

_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic