This patch:
- Prevents local variables to be declared in global AS
- Diagnoses AS of local variables with an extern storage class as if they would be in a program scope
Paths
| Differential D17345
[OpenCL] Improve diagnostics of address spaces for variables inside function ClosedPublic Authored by Anastasia on Feb 17 2016, 11:54 AM.
Details
Summary This patch:
Diff Detail Event Timeline
yaxunl edited edge metadata. Comment ActionsLGTM. Thanks.
This revision is now accepted and ready to land.Feb 19 2016, 12:03 PM Comment Actions I am adding a small clean up here for duplicate code! @sam, could you please re-check again. Thanks!
Revision Contents
Diff 49651 include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
test/Parser/opencl-storage-class.cl
test/SemaOpenCL/storageclass-cl20.cl
test/SemaOpenCL/storageclass.cl
|
is it better to use 'function scope' instead of 'non-program scope' ?