| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify=cuda %s |
| 2 |
// RUN: %clang_cc1 -fsyntax-only -verify=pedantic -pedantic %s |
| 3 |
// RUN: %clang_cc1 -fsyntax-only -verify=cpp -x c++ %s |
| 4 |
|
| 5 |
// cuda-no-diagnostics |
| 6 |
|
| 7 |
__noinline__ void fun1() { } // cpp-error {{unknown type name '__noinline__'}} |
| 8 |
|
| 9 |
__attribute__((noinline)) void fun2() { } |
| 10 |
__attribute__((__noinline__)) void fun3() { } |
| 11 |
[[gnu::__noinline__]] void fun4() { } |
| 12 |
|
| 13 |
#define __noinline__ __attribute__((__noinline__)) |
| 14 |
__noinline__ void fun5() {} |
| 15 |
|
| 16 |
#undef __noinline__ |
| 17 |
#10 "cuda.h" 3 // pedantic-warning {{this style of line directive is a GNU extension}} |
| 18 |
#define __noinline__ __attribute__((__noinline__)) |
| 19 |
__noinline__ void fun6() {} |