yaxunl added inline comments. ================ Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7653 @@ -7654,1 +7652,3 @@ +def err_opencl_function_variable : Error< + "%select{non-kernel function|non-program scope}0 variable cannot be declared in %1 address space">; def err_static_function_scope : Error< ---------------- is it better to use 'function scope' instead of 'non-program scope' ?
================ Comment at: test/SemaOpenCL/storageclass-cl20.cl:1 @@ -1,2 +1,2 @@ // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -DCL20 -cl-std=CL2.0 ---------------- remove -DCL20 ================ Comment at: test/SemaOpenCL/storageclass-cl20.cl:23 @@ -19,1 +22,3 @@ + extern global int G5; + extern int G6; // expected-error{{program scope variable must reside in global or constant address space}} } ---------------- 'extern int G6' refers to a program-scope variable 'int G6', since the default addr space of program-scope var is global, shouldn't 'extern int G6' have global addr space by default instead of private addr space? http://reviews.llvm.org/D17345 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits