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
diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp
index 6d30b89..569352e 100644
--- a/lib/Sema/DeclSpec.cpp
+++ b/lib/Sema/DeclSpec.cpp
@@ -286,6 +286,7 @@
case TST_image2d_t:
case TST_image2d_array_t:
case TST_image3d_t:
+ case TST_sampler_t:
case TST_event_t:
return false;
@@ -428,6 +429,7 @@
case DeclSpec::TST_image2d_t: return "image2d_t";
case DeclSpec::TST_image2d_array_t: return "image2d_array_t";
case DeclSpec::TST_image3d_t: return "image3d_t";
+ case DeclSpec::TST_sampler_t: return "sampler_t";
case DeclSpec::TST_event_t: return "event_t";
case DeclSpec::TST_error: return "(error)";
}