diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-08-22 18:26:35 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-08-22 18:26:35 +0000 |
| commit | db68e28c05a67735211e688009890cf834c22e75 (patch) | |
| tree | 217cbfe0050d9474a55739a118f09ffb4d8a15c6 /include | |
| parent | 8c3e554d00d456d5093c21ce8a0c205461279aab (diff) | |
| download | clang-db68e28c05a67735211e688009890cf834c22e75.tar.gz clang-db68e28c05a67735211e688009890cf834c22e75.tar.bz2 clang-db68e28c05a67735211e688009890cf834c22e75.tar.xz | |
Eliminate a stale assertion. Fixes Clang self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/clang/AST/Type.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index f5a4a1ff92..754f1f74ff 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -897,6 +897,7 @@ public: bool isFunctionPointerType() const; bool isMemberPointerType() const; bool isMemberFunctionPointerType() const; + bool isMemberDataPointerType() const; bool isArrayType() const; bool isConstantArrayType() const; bool isIncompleteArrayType() const; @@ -3486,6 +3487,12 @@ inline bool Type::isMemberFunctionPointerType() const { else return false; } +inline bool Type::isMemberDataPointerType() const { + if (const MemberPointerType* T = getAs<MemberPointerType>()) + return !T->getPointeeType()->isFunctionType(); + else + return false; +} inline bool Type::isArrayType() const { return isa<ArrayType>(CanonicalType); } |
