Anastasia added inline comments.

================
Comment at: lib/Sema/SemaInit.cpp:5286
 
-static bool TryOCLZeroQueueInitialization(Sema &S,
-                                          InitializationSequence &Sequence,
-                                          QualType DestType,
-                                          Expr *Initializer) {
-  if (!S.getLangOpts().OpenCL || S.getLangOpts().OpenCLVersion < 200 ||
-      !DestType->isQueueT() ||
-      !Initializer->isIntegerConstantExpr(S.getASTContext()) ||
-      (Initializer->EvaluateKnownConstInt(S.getASTContext()) != 0))
-    return false;
+  if (DestType->isQueueT() && S.getLangOpts().OpenCLVersion >= 200) {
+    if (!Initializer->isIntegerConstantExpr(S.getASTContext()) ||
----------------
Let's remove OpenCLVersion check here because we reject queue_t during parsing 
if cl-std!=CL2.0.


================
Comment at: lib/Sema/SemaInit.cpp:5291
 
-  Sequence.AddOCLZeroQueueStep(DestType);
-  return true;
+    Sequence.AddOCLZeroQueueStep(DestType);
+    return true;
----------------
I guess this one can't be generalized?


Repository:
  rC Clang

https://reviews.llvm.org/D52654



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to