aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-03-09 01:51:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-03-09 01:51:56 +0000
commitcd485926f1ffda2eaa9adeea34e1e15c35ab5fba (patch)
tree30db6d360d6833f1fa5445ca90e9ca45a3454a18 /include
parent3d13c5a1e72ed8f8be9c083791d30643d1b1ec43 (diff)
[AST] Type::isVoidType() is trivial and should be inlined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/Type.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index 3176f1909c..7bd367c054 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -4816,6 +4816,12 @@ inline bool Type::isNonOverloadPlaceholderType() const {
return false;
}
+inline bool Type::isVoidType() const {
+ if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
+ return BT->getKind() == BuiltinType::Void;
+ return false;
+}
+
inline bool Type::isHalfType() const {
if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
return BT->getKind() == BuiltinType::Half;