diff options
author | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2019-05-22 13:12:20 +0000 |
---|---|---|
committer | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2019-05-22 13:12:20 +0000 |
commit | ec36dad1b2089ec92370a36615b7828152e34a75 (patch) | |
tree | 3f430d2b8ba8eac6eeec36f1c31cf6c4073ded48 /lib/Basic | |
parent | dc1665e0c4c1261540d881b75c8b97d9121c6eed (diff) | |
download | clang-ec36dad1b2089ec92370a36615b7828152e34a75.tar.gz |
[OpenCL] Support pipe keyword in C++ mode
Support the OpenCL C pipe feature in C++ for OpenCL mode, to preserve
backwards compatibility with OpenCL C.
Various changes had to be made in Parse and Sema to enable
pipe-specific diagnostics, so enable a SemaOpenCL test for C++.
Differential Revision: https://reviews.llvm.org/D62181
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/Builtins.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Basic/Builtins.cpp b/lib/Basic/Builtins.cpp index cfc5927774..d23c280d47 100644 --- a/lib/Basic/Builtins.cpp +++ b/lib/Basic/Builtins.cpp @@ -70,8 +70,9 @@ bool Builtin::Context::builtinIsSupported(const Builtin::Info &BuiltinInfo, bool ObjCUnsupported = !LangOpts.ObjC && BuiltinInfo.Langs == OBJC_LANG; bool OclC1Unsupported = (LangOpts.OpenCLVersion / 100) != 1 && (BuiltinInfo.Langs & ALL_OCLC_LANGUAGES ) == OCLC1X_LANG; - bool OclC2Unsupported = LangOpts.OpenCLVersion != 200 && - (BuiltinInfo.Langs & ALL_OCLC_LANGUAGES) == OCLC20_LANG; + bool OclC2Unsupported = + (LangOpts.OpenCLVersion != 200 && !LangOpts.OpenCLCPlusPlus) && + (BuiltinInfo.Langs & ALL_OCLC_LANGUAGES) == OCLC20_LANG; bool OclCUnsupported = !LangOpts.OpenCL && (BuiltinInfo.Langs & ALL_OCLC_LANGUAGES); bool OpenMPUnsupported = !LangOpts.OpenMP && BuiltinInfo.Langs == OMP_LANG; |