diff options
author | Eli Bendersky <eliben@google.com> | 2014-06-20 13:09:59 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2014-06-20 13:09:59 +0000 |
commit | 47277ffc39d9b1f068204e70f06fbec2fe0f8c53 (patch) | |
tree | b2b70dc528f974db960336552fa1ae2caa306546 /test/Parser/cuda-kernel-call-c++11.cu | |
parent | 693a26d234c4ebf6411a50d5b3d50ca8ea2f54c6 (diff) |
Fix PR20081: Parsing templates in the presence of -x cuda -std=c++11
http://reviews.llvm.org/D4222
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cuda-kernel-call-c++11.cu')
-rw-r--r-- | test/Parser/cuda-kernel-call-c++11.cu | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Parser/cuda-kernel-call-c++11.cu b/test/Parser/cuda-kernel-call-c++11.cu new file mode 100644 index 0000000000..8f833f79af --- /dev/null +++ b/test/Parser/cuda-kernel-call-c++11.cu @@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s + +template<typename> struct S {}; +template<typename> void f(); + + +void foo(void) { + // In C++11 mode, all of these are expected to parse correctly, and the CUDA + // language should not interfere with that. + + // expected-no-diagnostics + + S<S<S<int>>> s3; + + S<S<S<S<int>>>> s4; + + S<S<S<S<S<int>>>>> s5; + + (void)(&f<S<S<int>>>==0); +} |