summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
commitf5bd02d290ff15268853e0456c130a1afa15e907 (patch)
treec7f5a7b6fd212399d821b83b22c1e6a42e8c4a0d /lib/Sema/SemaExprCXX.cpp
parentb3d5a323a5ca92ea73443499cee2f15db1ff0fb3 (diff)
Notes
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 0eea169b0727..462bf13540eb 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1445,6 +1445,12 @@ QualType Sema::CheckPointerToMemberOperands(
}
}
+ if (isa<CXXZeroInitValueExpr>(rex->IgnoreParens())) {
+ // Diagnose use of pointer-to-member type which when used as
+ // the functional cast in a pointer-to-member expression.
+ Diag(Loc, diag::err_pointer_to_member_type) << isIndirect;
+ return QualType();
+ }
// C++ 5.5p2
// The result is an object or a function of the type specified by the
// second operand.