aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Type.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/Type.h')
-rw-r--r--include/clang/AST/Type.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index a047f32eba..0a851693c6 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -265,11 +265,12 @@ public:
// type, ignoring typedefs.
bool isFunctionType() const;
bool isPointerType() const;
+ bool isFunctionPointerType() const;
bool isReferenceType() const;
bool isArrayType() const;
bool isRecordType() const;
bool isStructureType() const;
- bool isUnionType() const;
+ bool isUnionType() const;
bool isVectorType() const; // GCC vector type.
bool isOCUVectorType() const; // OCU vector type.
@@ -868,6 +869,12 @@ inline bool Type::isFunctionType() const {
inline bool Type::isPointerType() const {
return isa<PointerType>(CanonicalType);
}
+inline bool Type::isFunctionPointerType() const {
+ if (const PointerType* T = dyn_cast<PointerType>(this))
+ return T->getPointeeType()->isFunctionType();
+ else
+ return false;
+}
inline bool Type::isReferenceType() const {
return isa<ReferenceType>(CanonicalType);
}