From bd4c4aebe6035e7a7125470cc9f0f92511230ee3 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 26 Aug 2009 22:36:53 +0000 Subject: When a member reference expression includes a qualifier on the member name, e.g., x->Base::f() retain the qualifier (and its source range information) in a new subclass of MemberExpr called CXXQualifiedMemberExpr. Provide construction, transformation, profiling, printing, etc., for this new expression type. When a virtual function is called via a qualified name, don't emit a virtual call. Instead, call that function directly. Mike, could you add a CodeGen test for this, too? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 310fae03c6..75fc107d20 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -240,7 +240,9 @@ LValue CodeGenFunction::EmitLValue(const Expr *E) { return EmitArraySubscriptExpr(cast(E)); case Expr::ExtVectorElementExprClass: return EmitExtVectorElementExpr(cast(E)); - case Expr::MemberExprClass: return EmitMemberExpr(cast(E)); + case Expr::MemberExprClass: + case Stmt::CXXQualifiedMemberExprClass: + return EmitMemberExpr(cast(E)); case Expr::CompoundLiteralExprClass: return EmitCompoundLiteralLValue(cast(E)); case Expr::ConditionalOperatorClass: -- cgit v1.2.3-70-g09d2