summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorXiuli Pan <xiulipan@outlook.com>2016-06-07 03:41:07 +0000
committerXiuli Pan <xiulipan@outlook.com>2016-06-07 03:41:07 +0000
commita219552ca838b44d44c9b165fc4def5503f69bb6 (patch)
treefe9c9cd20d90ccfea709416c6f5a08a39b8eb516 /clang/lib/AST/ExprConstant.cpp
parent532dcbc2c5d5b0a6ec757699e0b23d6a7417e12e (diff)
downloadbcm5719-llvm-a219552ca838b44d44c9b165fc4def5503f69bb6.tar.gz
bcm5719-llvm-a219552ca838b44d44c9b165fc4def5503f69bb6.zip
Revert "[OPENCL] Fix wrongly vla error for OpenCL array."
Test case break on system-z. This reverts commit 9a7212e1e87f1396952d74f8c62314a775ccbb1c. llvm-svn: 271975
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index e14330cf60e..8c24b0333e1 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -2745,10 +2745,7 @@ static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E,
} else if (VD->isConstexpr()) {
// OK, we can read this variable.
} else if (BaseType->isIntegralOrEnumerationType()) {
- // In OpenCL if a variable is in constant address space it is a const value.
- if (!(BaseType.isConstQualified() ||
- (Info.getLangOpts().OpenCL &&
- BaseType.getAddressSpace() == LangAS::opencl_constant))) {
+ if (!BaseType.isConstQualified()) {
if (Info.getLangOpts().CPlusPlus) {
Info.Diag(E, diag::note_constexpr_ltor_non_const_int, 1) << VD;
Info.Note(VD->getLocation(), diag::note_declared_at);
OpenPOWER on IntegriCloud