aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Type.h
diff options
context:
space:
mode:
authorGuy Benyei <guy.benyei@intel.com>2013-02-07 10:55:47 +0000
committerGuy Benyei <guy.benyei@intel.com>2013-02-07 10:55:47 +0000
commit21f18c4fda167dc5f72feddbd6a7ac1b63200a0d (patch)
tree80c1b120c64d3066fd4f5799174a16d8ed49eca0 /include/clang/AST/Type.h
parentf5a6aefa37d73fff3c47953e2c447f074e726a0e (diff)
Add OpenCL samplers as Clang builtin types and check sampler related restrictions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Type.h')
-rw-r--r--include/clang/AST/Type.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index 1469746d43..3e6297aeb8 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -1584,6 +1584,7 @@ public:
bool isImageType() const; // Any OpenCL image type
+ bool isSamplerT() const; // OpenCL sampler_t
bool isEventT() const; // OpenCL event_t
bool isOpenCLSpecificType() const; // Any OpenCL specific type
@@ -4918,6 +4919,11 @@ inline bool Type::isImage2dArrayT() const {
inline bool Type::isImage3dT() const {
return isSpecificBuiltinType(BuiltinType::OCLImage3d);
}
+
+inline bool Type::isSamplerT() const {
+ return isSpecificBuiltinType(BuiltinType::OCLSampler);
+}
+
inline bool Type::isEventT() const {
return isSpecificBuiltinType(BuiltinType::OCLEvent);
}
@@ -4929,7 +4935,7 @@ inline bool Type::isImageType() const {
}
inline bool Type::isOpenCLSpecificType() const {
- return isImageType() || isEventT();
+ return isSamplerT() || isEventT() || isImageType();
}
inline bool Type::isTemplateTypeParmType() const {