aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Type.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-07-01 14:36:47 +0000
committerSteve Naroff <snaroff@apple.com>2009-07-01 14:36:47 +0000
commit7154a77e7c1f23418342d3b72836ab504aa7821e (patch)
treedafff1fe142d877dabbee7f18aa0ea8365b6bdaa /lib/AST/Type.cpp
parentc0b8b19bd8056d6b5d831623a0825cce150f4507 (diff)
Rework Sema::CheckConditionalOperands(). No functionality change.
This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups). The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause). Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r--lib/AST/Type.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index eaa7d3b0d8..4e061a9fbe 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -185,6 +185,12 @@ bool Type::isStructureType() const {
return RT->getDecl()->isStruct();
return false;
}
+bool Type::isVoidPointerType() const {
+ if (const PointerType *PT = getAsPointerType())
+ return PT->getPointeeType()->isVoidType();
+ return false;
+}
+
bool Type::isUnionType() const {
if (const RecordType *RT = getAsRecordType())
return RT->getDecl()->isUnion();