[cfe-dev] get sizeof(*) 's value

huc1985 huc1985 at 163.com
Mon Mar 25 01:50:53 PDT 2013

    I'm using a RecursiveASTVisitor and its VisitCallExpr method. I want to
find out all location using malloc. How to get the sizeof(*)'s value?
    for example:

          char* a = (char*)malloc(sizeof(char));   
          int* b = (int*)malloc(sizeof(int));   
          a, fun:malloc, alloc size:1bytes
          b, fun:malloc, alloc size:4bytes

     I want to know somthing like this. 


View this message in context: http://clang-developers.42468.n3.nabble.com/get-sizeof-s-value-tp4031125.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list