diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-08-26 22:36:53 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-08-26 22:36:53 +0000 |
| commit | bd4c4aebe6035e7a7125470cc9f0f92511230ee3 (patch) | |
| tree | 734d79f1194c9a66938d1a138267cff5beb0e471 /lib/CodeGen/CGExpr.cpp | |
| parent | d2fa56687f8bd5ac6ebf9d9468d0efd714986a54 (diff) | |
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
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | lib/CodeGen/CGExpr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<ArraySubscriptExpr>(E)); case Expr::ExtVectorElementExprClass: return EmitExtVectorElementExpr(cast<ExtVectorElementExpr>(E)); - case Expr::MemberExprClass: return EmitMemberExpr(cast<MemberExpr>(E)); + case Expr::MemberExprClass: + case Stmt::CXXQualifiedMemberExprClass: + return EmitMemberExpr(cast<MemberExpr>(E)); case Expr::CompoundLiteralExprClass: return EmitCompoundLiteralLValue(cast<CompoundLiteralExpr>(E)); case Expr::ConditionalOperatorClass: |
