diff options
author | John McCall <rjmccall@apple.com> | 2011-10-18 21:02:43 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-10-18 21:02:43 +0000 |
commit | e0a22d06888c13989b3f72db319f1d498bf69153 (patch) | |
tree | b32f178c32688b4c8cadabfac0d387f21f235e3d /lib/AST/ExprClassification.cpp | |
parent | ebaf0e6ab743394dda086a01b457838cb6e589a8 (diff) |
Macro metaprogramming for builtin types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprClassification.cpp')
-rw-r--r-- | lib/AST/ExprClassification.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/ExprClassification.cpp b/lib/AST/ExprClassification.cpp index 49c68213aa..594ae69ec4 100644 --- a/lib/AST/ExprClassification.cpp +++ b/lib/AST/ExprClassification.cpp @@ -480,14 +480,16 @@ static Cl::Kinds ClassifyBinaryOp(ASTContext &Ctx, const BinaryOperator *E) { // is a pointer to a data member is of the same value category as its first // operand. if (E->getOpcode() == BO_PtrMemD) - return (E->getType()->isFunctionType() || E->getType() == Ctx.BoundMemberTy) + return (E->getType()->isFunctionType() || + E->hasPlaceholderType(BuiltinType::BoundMember)) ? Cl::CL_MemberFunction : ClassifyInternal(Ctx, E->getLHS()); // C++ [expr.mptr.oper]p6: The result of an ->* expression is an lvalue if its // second operand is a pointer to data member and a prvalue otherwise. if (E->getOpcode() == BO_PtrMemI) - return (E->getType()->isFunctionType() || E->getType() == Ctx.BoundMemberTy) + return (E->getType()->isFunctionType() || + E->hasPlaceholderType(BuiltinType::BoundMember)) ? Cl::CL_MemberFunction : Cl::CL_LValue; |