[PATCH] D21989: [OpenCL] Improve diagnostics of OpenCL types
Alexey Bader via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 5 05:05:10 PDT 2016
bader accepted this revision.
bader added a comment.
This revision is now accepted and ready to land.
LGTM.
A few minor style comments.
================
Comment at: lib/Sema/SemaExpr.cpp:10806-10807
@@ -10816,4 +10805,4 @@
// the ATOMIC_VAR_INIT macro.
if (LHSExpr->getType()->isAtomicType() ||
RHSExpr->getType()->isAtomicType()) {
SourceRange SR(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
----------------
Please, refactor this code to use LHSTy & RHSTy.
================
Comment at: lib/Sema/SemaType.cpp:3832
@@ -3829,1 +3831,3 @@
+ if (LangOpts.OpenCL)
+ DeclType.Cls.TypeQuals|=DeclSpec::TQ_const;
T = S.BuildQualifiedType(T, DeclType.Loc, DeclType.Cls.TypeQuals);
----------------
Please, add spaces around |=.
================
Comment at: test/SemaOpenCL/invalid-pipes-cl2.0.cl:10
@@ -9,2 +9,3 @@
void test4() {
- pipe int p; // expected-error {{type 'pipe int' can only be used as a function parameter}}
+ pipe int p; // expected-error {{type 'pipe int' can only be used as a function parameter}}gedit test.cl
+ //TODO: fix parsing of this pipe int (*p);
----------------
Please, remove 'gedit test.cl' at the end of the line.
================
Comment at: test/SemaOpenCL/sampler_t.cl:22
@@ +21,3 @@
+
+void bar(){
+ sampler_t smp1 = 7;
----------------
Please, add space before {.
http://reviews.llvm.org/D21989
More information about the cfe-commits
mailing list