[cfe-dev] how to determine a parameter has a type declaratorinclang

kevinlynx kevinlynx at gmail.com
Thu Jan 3 18:22:36 PST 2013


But i did not find any methods about `written` in ParamVarDecl, or QualType.




------------------ Original ------------------
From:  "John McCall"<rjmccall at apple.com>;
Date:  Fri, Jan 4, 2013 09:56 AM
To:  "kevinlynx"<kevinlynx at gmail.com>; 
Cc:  "cfe-dev"<cfe-dev at cs.uiuc.edu>; 
Subject:  Re: [cfe-dev] how to determine a parameter has a type declaratorinclang



On Jan 3, 2013, at 5:36 PM, kevinlynx <kevinlynx at gmail.com> wrote:
> Thanks, it worked on 1 parameter function, but does not work on more than one parameters function, say,
> 
>     void func(int a, b)
> 
> `hasWrittenPrototype` still return true, and `b` will also get a default `int` type. 

Oh, I see.  You need to look at the type as written of the ParmVarDecl.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130104/b7491ffe/attachment.html>


More information about the cfe-dev mailing list