Skip to content

Commit d0583e2

Browse files
committed
Keep same error for 2.0
1 parent 73e01d1 commit d0583e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

patches/clang/0001-OpenCL-3.0-support.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From bb88efeda6dc50ff165dd1616f562ec5b6d369c3 Mon Sep 17 00:00:00 2001
1+
From 01c068c2f8e4e7103b36bc2a5093dd9003b2ef27 Mon Sep 17 00:00:00 2001
22
From: Anton Zabaznov <[email protected]>
33
Date: Tue, 22 Sep 2020 19:03:50 +0300
44
Subject: [PATCH] OpenCL 3.0 support
@@ -7142,15 +7142,15 @@ index 64146f4a912..c1e629b5dc7 100644
71427142
<< Scope << "global or constant";
71437143
else
71447144
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
7145-
index 849bc09063b..fccddd7a93d 100644
7145+
index 849bc09063b..c963b95b131 100644
71467146
--- a/clang/lib/Sema/SemaDeclAttr.cpp
71477147
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
71487148
@@ -6362,7 +6362,7 @@ static void handleInternalLinkageAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
71497149
}
71507150

71517151
static void handleOpenCLNoSVMAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
71527152
- if (S.LangOpts.OpenCLVersion != 200)
7153-
+ if (S.LangOpts.OpenCLVersion <= 200)
7153+
+ if (S.LangOpts.OpenCLVersion < 200)
71547154
S.Diag(AL.getLoc(), diag::err_attribute_requires_opencl_version)
71557155
<< AL << "2.0" << 0;
71567156
else

0 commit comments

Comments
 (0)