Skip to content

Commit

Permalink
[OpenCL] Renamed value of std flag in C++ mode.
Browse files Browse the repository at this point in the history
 
Clang should accept -std=clc++ (not -std=c++!) for OpenCL.

This was forgotten in r367008.

llvm-svn: 369779
  • Loading branch information
Anastasia Stulova committed Aug 23, 2019
1 parent 0ae5498 commit ad5047d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/LangStandards.def
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ LANGSTANDARD(opencl12, "cl1.2",
LANGSTANDARD(opencl20, "cl2.0",
OpenCL, "OpenCL 2.0",
LineComment | C99 | Digraphs | HexFloat | OpenCL)
LANGSTANDARD(openclcpp, "c++",
LANGSTANDARD(openclcpp, "clc++",
OpenCL, "C++ for OpenCL",
LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
Digraphs | HexFloat | OpenCL)
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/unknown-std.cl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// CHECK-NEXT: note: use 'cl1.1' for 'OpenCL 1.1' standard
// CHECK-NEXT: note: use 'cl1.2' for 'OpenCL 1.2' standard
// CHECK-NEXT: note: use 'cl2.0' for 'OpenCL 2.0' standard
// CHECK-NEXT: note: use 'c++' for 'C++ for OpenCL' standard
// CHECK-NEXT: note: use 'clc++' for 'C++ for OpenCL' standard

// Make sure that no other output is present.
// CHECK-NOT: {{^.+$}}
Expand Down

0 comments on commit ad5047d

Please sign in to comment.