diff options
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r-- | clang/lib/AST/ExprClassification.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp index 76c548f82ab..c035a42439a 100644 --- a/clang/lib/AST/ExprClassification.cpp +++ b/clang/lib/AST/ExprClassification.cpp @@ -627,7 +627,8 @@ static Cl::ModifiableType IsModifiable(ASTContext &Ctx, const Expr *E, // Const stuff is obviously not modifiable. if (CT.isConstQualified()) return Cl::CM_ConstQualified; - if (CT.getQualifiers().getAddressSpace() == LangAS::opencl_constant) + if (Ctx.getLangOpts().OpenCL && + CT.getQualifiers().getAddressSpace() == LangAS::opencl_constant) return Cl::CM_ConstAddrSpace; // Arrays are not modifiable, only their elements are. |