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/AST/StmtProfile.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/AST/StmtProfile.cpp')
-rw-r--r-- | lib/AST/StmtProfile.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/StmtProfile.cpp b/lib/AST/StmtProfile.cpp index ff20299168..0ffe5e17c6 100644 --- a/lib/AST/StmtProfile.cpp +++ b/lib/AST/StmtProfile.cpp @@ -546,6 +546,11 @@ StmtProfiler::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *S) { VisitType(S->getTypeAsWritten()); } +void StmtProfiler::VisitCXXQualifiedMemberExpr(CXXQualifiedMemberExpr *S) { + VisitMemberExpr(S); + VisitNestedNameSpecifier(S->getQualifier()); +} + void StmtProfiler::VisitCXXUnresolvedMemberExpr(CXXUnresolvedMemberExpr *S) { VisitExpr(S); ID.AddBoolean(S->isArrow()); |