https://issues.dlang.org/show_bug.cgi?id=22033
Issue ID: 22033
Summary: importC: Add C++ helper function to return Type for
given Identifier or string
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
For example, GCC provides the "C" wchar_t type as a macro, which could be
defined as "int", or "short unsigned int", or "long int", or "long unsigned
int", etc...
As DMD now has the ability to parse C types, it would be great to expose this
from CParser to convert these strings to get D Types.
e.g:
---
Type *ctype = CParser::getType("short unsigned int");
assert(ctype->ty == TY::Tuns16);
--