================
@@ -0,0 +1,12 @@
+// RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s
+
+// Issue 182534
+int a();
+
+// CHECK: error: passing 'int (*)()' to parameter of type '__global int (*)'
changes address space of pointer
----------------
ojhunt wrote:
once you switch to `-verify` you can switch to the diagnostic test syntax, e.g:
```cpp
void b(__attribute__((opencl_global)) int(*) );
// expected-error@-1 {{passing 'int (*)()' to parameter of type '__global int
(*)' changes address space of pointer}}
```
over time you'll get more familiar with the full features, but for now the
basic syntax is
```
// expected-{error,warning,note,remark}@location {{the error, warning, note, or
remark text}}
```
For simple tests like this having a location of `-N` means "N lines
previously", you can also have labeled locations, but that becomes more useful
once you're making changes that require extensive tests.
https://github.com/llvm/llvm-project/pull/183616
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits