| |||||||||||||||||||||||||||||
|
Hi, I am working on a static analysis plugin for Mozilla. I noticed the the C++ frontend has a very convenient pretty-printing API exposed through (decl|type)_as_string. I use decl_as_string() to get string representations of types. The scripts are interested in both kinds of types: the type name and the actual type. The API seems to be designed to provide that, but in reality returned strings contain a mix of the two, which is problematic for my scripting needs and results in inconsistent typedef usage in GCC error messages.. Major Issue: Specifying TFF_CHASE_TYPEDEFS as a parameter only works with top-level typenames because the C/C++ pretty printing code does not support/propagate the flags parameter. Is this considered a bug or a TODO? Would a patch to move the TFF* flags into the C frontend be of interest? Minor issues: I think this is a bug, likely a manifestation of the major issue: typedef int* pint; pint foo; <-- type_as_string(type, 0) returns "int*" Is the following behavior intentional? typedef int t1; class c{ typedef t1 t2; t2 v; <-- type_as_string returns "t1". }; Thanks, Taras More info on my plugin: http://wiki.mozilla.org/Dehydra_GCC
| ||||||||||||||||||||||||||||
© 2004-2008 readlist.com