[cfe-commits] r71907 - in /cfe/trunk: include/clang/AST/Expr.h lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp test/SemaTemplate/instantiate-function-1.cpp

Eli Friedman eli.friedman at gmail.com
Sat May 16 13:18:15 PDT 2009


On Sat, May 16, 2009 at 10:27 AM, Anders Carlsson <andersca at mac.com> wrote:
> How about this:
> if (BaseType->isDependentType()) {
>   const PointerType *PT = BaseType->getAsPointerType();
>   if (!PT || (getLangOptions().ObjC1 &&
>               !PT->getPointeeType()->isRecordType()))
>     return Owned(new (Context) MemberExpr(BaseExpr, false, 0,
>                                           MemberLoc, Context.DependentTy));
> }
> This passes the tests, and when compiling Obj-C++ code it doesn't give an
> error for
> T t
> t.f;
> but it still gives an error for
> this.f;

That looks correct.

-Eli




More information about the cfe-commits mailing list