summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprClassification.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-10-18 21:02:43 +0000
committerJohn McCall <rjmccall@apple.com>2011-10-18 21:02:43 +0000
commite314e27c58b1111e38a688fa8d203b0149189710 (patch)
tree457e9608d1046f338268a563f351f2772eb0fb47 /clang/lib/AST/ExprClassification.cpp
parent0bf8a492fd75bed43728e9447e74fa4d3a9dac25 (diff)
Macro metaprogramming for builtin types.
llvm-svn: 142420
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r--clang/lib/AST/ExprClassification.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp
index 49c68213aa43..594ae69ec405 100644
--- a/clang/lib/AST/ExprClassification.cpp
+++ b/clang/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;