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.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 {