[clang] db664a6 - [Doc][OpenCL] Fixed typos in code examples

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 09:47:45 PDT 2022


Author: Anastasia Stulova
Date: 2022-09-22T17:46:47+01:00
New Revision: db664a666c2c0cc144c7827dbdad1b893a63408c

URL: https://github.com/llvm/llvm-project/commit/db664a666c2c0cc144c7827dbdad1b893a63408c
DIFF: https://github.com/llvm/llvm-project/commit/db664a666c2c0cc144c7827dbdad1b893a63408c.diff

LOG: [Doc][OpenCL] Fixed typos in code examples

Added: 
    

Modified: 
    clang/docs/LanguageExtensions.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 17b2f8a00297b..bbaf31cc9792e 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -2136,7 +2136,7 @@ between the host and device is known to be compatible.
   struct OnlySL {
     int a;
     int b;
-    NotPod() : a(0), b(0) {}
+    OnlySL() : a(0), b(0) {}
   };
 
   // Not standard layout type because of two 
diff erent access controls.
@@ -2144,16 +2144,17 @@ between the host and device is known to be compatible.
     int a;
   private:
     int b;
-  }
+  };
 
+  #pragma OPENCL EXTENSION __cl_clang_non_portable_kernel_param_types : enable
   kernel void kernel_main(
     Pod a,
-  #pragma OPENCL EXTENSION __cl_clang_non_portable_kernel_param_types : enable
+
     OnlySL b,
     global NotSL *c,
-  #pragma OPENCL EXTENSION __cl_clang_non_portable_kernel_param_types : disable
-    global OnlySL *d,
+    global OnlySL *d
   );
+  #pragma OPENCL EXTENSION __cl_clang_non_portable_kernel_param_types : disable
 
 Remove address space builtin function
 -------------------------------------


        


More information about the cfe-commits mailing list