[OpenCL] Fix lang mode predefined macros for C++ mode.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Mon, 12 Aug 2019 10:44:07 +0000 (10:44 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Mon, 12 Aug 2019 10:44:07 +0000 (10:44 +0000)
commitef58804ebc196fe54731e31d7db817471038084c
treec8944dc7ce62a53969b9938b8d40949571d46668
parent2e16060a8bbbd82f4637ddb5e58533a614ef529e
[OpenCL] Fix lang mode predefined macros for C++ mode.

In C++ mode we should only avoid adding __OPENCL_C_VERSION__,
all other predefined macros about the language mode are still
valid.

This change also fixes the language version check in the
headers accordingly.

Differential Revision: https://reviews.llvm.org/D65941

llvm-svn: 368552
clang/lib/Frontend/InitPreprocessor.cpp
clang/lib/Headers/opencl-c-base.h
clang/lib/Headers/opencl-c.h