[cfe-dev] How to get the type in typedef by CSA interface or function.
Artem Dergachev via cfe-dev
cfe-dev at lists.llvm.org
Fri Jun 1 09:07:55 PDT 2018
You're looking for getCanonicalType().
Also that's AST stuff, not analyzer-specific stuff.
On 6/1/18 6:09 AM, 牛治 via cfe-dev wrote:
> Dear developer:
> how to get the type of variable in CSA?
> for example:
> I can get the name and the type of typedefs if they're anonymous
> structures and the like, but normal typedefs(eg |typedef int size_t|)
> I can only get |size_t|. How can I get the type "int"?
>
> #include<stdio.h>
> typedef unsigned int WORD32;
> int main(void){
> WORD32 a=50;
> .........
> }
> *obtain a type is **WORD32,not **unsigned int.how to get **unsigned
> int by CSA interface or function?Thanks.*
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list