Skip to content
Commit 3d0c9788 authored by Alexey Bader's avatar Alexey Bader
Browse files

[OpenCL] Allow function declaration with empty argument list.

Summary:
does it make sense to enable K&R function declaration style for OpenCL?
clang throws following error message for the declaration w/o arguments:

```
int my_func();
error: function with no prototype cannot use the spir_function calling convention
```

Current way to fix this issue is to specify that parameter list is empty by using 'void':

```
int my_func(void);
```

Let me know what do you think about this patch.

Reviewers: Anastasia, yaxunl

Reviewed By: Anastasia

Subscribers: cfe-commits, echuraev

Differential Revision: https://reviews.llvm.org/D33681

llvm-svn: 306653
parent 82090a7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment