[cfe-commits] r61885 - in /cfe/trunk: include/clang/AST/Expr.h lib/AST/StmtPrinter.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp
Chris Lattner
clattner at apple.com
Wed Jan 7 13:40:30 PST 2009
On Jan 7, 2009, at 1:26 PM, Douglas Gregor wrote:
> Author: dgregor
> Date: Wed Jan 7 15:26:07 2009
> New Revision: 61885
>
> URL: http://llvm.org/viewvc/llvm-project?rev=61885&view=rev
> Log:
> Fix printing of member references to avoid displaying implicitly-
> generated member references, e.g., for anonymous struct/unions or
> implicit 'this' in member functions
hi Doug,
I think this is the wrong approach. Given something like this:
struct foo {
int X;
int Y() {
return X;
}
};
I think it would make more sense to model "X" as an
ImplicitThisFieldDeclRefExpr (or something like that) than as a
memberexpr with an implicit cxxthisexpr. This more naturally followed
the source. One specific problem is that MemberExpr would have to
know how to handle "implicit this" in getSourceRange() for example.
-Chris
More information about the cfe-commits
mailing list