[cfe-dev] Patch proposal for __builtin_offsetof construct.
r.amadini at virgilio.it
Fri Apr 16 03:35:02 PDT 2010
I'm the student who is trying to fix the problem mentioned in
I followed the guidelines described in the previous messages, creating a
dedicated class OffsetOfExpr which doesn't contain any sub-expression.
The offsetof base type is encoded in a TypeSourceInfo field, while
the sub-components are stored in a SmallVector of
OffsetOfExpr::OffsetOfNode (a public struct similar to
Note that the goal of this patch is solely to avoid the unsuitable use of
UnaryOperator for OffsetOf expressions: namely, it is not meant to
solution to other FIXME's (e.g., type-dependent OffsetOfExpr are still
This patch passes all clang tests (it refers to revision 100962), but since
I'm only a beginner in clang development I am note sure about the code I
so any comments and/or suggestions are really welcome.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the cfe-dev