aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-26 22:36:53 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-26 22:36:53 +0000
commitbd4c4aebe6035e7a7125470cc9f0f92511230ee3 (patch)
tree734d79f1194c9a66938d1a138267cff5beb0e471 /lib/Sema/SemaChecking.cpp
parentd2fa56687f8bd5ac6ebf9d9468d0efd714986a54 (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/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 27f03bd98f..e6fa372736 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -1421,7 +1421,8 @@ static DeclRefExpr* EvalVal(Expr *E) {
}
// Accesses to members are potential references to data on the stack.
- case Stmt::MemberExprClass: {
+ case Stmt::MemberExprClass:
+ case Stmt::CXXQualifiedMemberExprClass: {
MemberExpr *M = cast<MemberExpr>(E);
// Check for indirect access. We only want direct field accesses.