bader added a comment. Sorry for the delay.
Is this code valid: clk_event_t e1, e2, e3; clk_event_t events[] = {e1, e2}; enqueue_kernel(get_default_queue(), 0, get_ndrange(), 2, events, &e3, ...); With this patch clang rejects it with an error: 'illegal call to enqueue_kernel, expected 'clk_event_t *' argument type' C rules allows implicit conversion of to pointer by taking address of the first element of the array. ================ Comment at: lib/Sema/SemaChecking.cpp:154 @@ +153,3 @@ + unsigned NumNonVarArgs) { + const BlockPointerType *BPT = cast<BlockPointerType>(BlockArg->getType()); + unsigned NumBlockParams = ---------------- Here block type must be canonical too. http://reviews.llvm.org/D20249 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits