aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCUDA/noinline.cu
blob: ce4dfe35ceaa834122ecde71c02fc2108b3af2d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: %clang_cc1 -fsyntax-only -verify=cuda %s
// RUN: %clang_cc1 -fsyntax-only -verify=pedantic -pedantic %s
// RUN: %clang_cc1 -fsyntax-only -verify=cpp -x c++ %s

// cuda-no-diagnostics

__noinline__ void fun1() { } // cpp-error {{unknown type name '__noinline__'}}

__attribute__((noinline)) void fun2() { }
__attribute__((__noinline__)) void fun3() { }
[[gnu::__noinline__]] void fun4() { }

#define __noinline__ __attribute__((__noinline__))
__noinline__ void fun5() {}

#undef __noinline__
#10 "cuda.h" 3 // pedantic-warning {{this style of line directive is a GNU extension}}
#define __noinline__ __attribute__((__noinline__))
__noinline__ void fun6() {}