Clang Project

clang_source_code/test/Parser/cuda-kernel-call-c++11.cu
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2
3template<typename T=int> struct S {};
4template<typename> void f();
5
6
7void foo(void) {
8  // In C++11 mode, all of these are expected to parse correctly, and the CUDA
9  // language should not interfere with that.
10
11  // expected-no-diagnostics
12
13  S<S<S<int>>> s3;
14  S<S<S<>>> s30;
15
16  S<S<S<S<int>>>> s4;
17  S<S<S<S<>>>> s40;
18
19  S<S<S<S<S<int>>>>> s5;
20  S<S<S<S<S<>>>>> s50;
21
22  (void)(&f<S<S<int>>>==0);
23  (void)(&f<S<S<>>>==0);
24}
25