summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-11-05 17:18:09 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-11-05 17:18:09 +0000
commitb3a51061b1b9c4add078237850649f7c9efb13ab (patch)
tree8b316eca843681b024034db1125707173b9adb4a /lib/Sema/SemaExprCXX.cpp
parentb6d5e15aae202f157c6cd63da8fa4b089e7b31e9 (diff)
downloadFreeBSD-src-b3a51061b1b9c4add078237850649f7c9efb13ab.zip
FreeBSD-src-b3a51061b1b9c4add078237850649f7c9efb13ab.tar.gz
Update clang to r86140.
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 4868c14..dc57681 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1603,6 +1603,8 @@ QualType Sema::CXXCheckConditionalOperands(Expr *&Cond, Expr *&LHS, Expr *&RHS,
if (LHS->isTypeDependent() || RHS->isTypeDependent())
return Context.DependentTy;
+ CheckSignCompare(LHS, RHS, QuestionLoc, diag::warn_mixed_sign_conditional);
+
// C++0x 5.16p2
// If either the second or the third operand has type (cv) void, ...
QualType LTy = LHS->getType();
@@ -2030,7 +2032,13 @@ Sema::ActOnStartCXXMemberReference(Scope *S, ExprArg Base, SourceLocation OpLoc,
QualType BaseType = BaseExpr->getType();
if (BaseType->isDependentType()) {
- // FIXME: member of the current instantiation
+ // If we have a pointer to a dependent type and are using the -> operator,
+ // the object type is the type that the pointer points to. We might still
+ // have enough information about that type to do something useful.
+ if (OpKind == tok::arrow)
+ if (const PointerType *Ptr = BaseType->getAs<PointerType>())
+ BaseType = Ptr->getPointeeType();
+
ObjectType = BaseType.getAsOpaquePtr();
return move(Base);
}
OpenPOWER on IntegriCloud