summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-17 16:28:18 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-17 16:28:18 +0000
commit9303134cefdc2239e80a0023f450bb9f8fe76744 (patch)
tree1786ab9a87da271127709b6caf91a8d9de782b95 /clang
parent6de08cd09349cbf3d7f15c04fe67d1a800598f02 (diff)
downloadbcm5719-llvm-9303134cefdc2239e80a0023f450bb9f8fe76744.tar.gz
bcm5719-llvm-9303134cefdc2239e80a0023f450bb9f8fe76744.zip
Add FIXME about not using MemberExpr nodes when the base type is a dependent type.
llvm-svn: 71979
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 744b0209860..e5ee363825a 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -2023,6 +2023,8 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
// must have pointer type, and the accessed type is the pointee.
if (OpKind == tok::arrow) {
if (BaseType->isDependentType())
+ // FIXME: This should not return a MemberExpr AST node, but a more
+ // specialized one.
return Owned(new (Context) MemberExpr(BaseExpr, true, 0,
MemberLoc, Context.DependentTy));
else if (const PointerType *PT = BaseType->getAsPointerType())
@@ -2048,6 +2050,8 @@ Sema::ActOnMemberReferenceExpr(Scope *S, ExprArg Base, SourceLocation OpLoc,
if (!PT || (getLangOptions().ObjC1 &&
!PT->getPointeeType()->isRecordType()))
+ // FIXME: This should not return a MemberExpr AST node, but a more
+ // specialized one.
return Owned(new (Context) MemberExpr(BaseExpr, false, 0,
MemberLoc, Context.DependentTy));
}
OpenPOWER on IntegriCloud