summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/temp_arg_template.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-08-28 00:13:42 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-08-28 00:13:42 +0000
commitc8940019b971070910bbaeada22f0d1f0d5f34ba (patch)
tree28d6278a1216e2ba9415bac2f2db9529db30c358 /test/SemaTemplate/temp_arg_template.cpp
parentba715449e7b60915014d6d84d8fea74e7127184f (diff)
downloadclang-c8940019b971070910bbaeada22f0d1f0d5f34ba.tar.gz
clang-c8940019b971070910bbaeada22f0d1f0d5f34ba.tar.bz2
clang-c8940019b971070910bbaeada22f0d1f0d5f34ba.tar.xz
Some of this test doesn't want -std=c++11
Sorry for the churn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/temp_arg_template.cpp')
-rw-r--r--test/SemaTemplate/temp_arg_template.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/SemaTemplate/temp_arg_template.cpp b/test/SemaTemplate/temp_arg_template.cpp
index 0833fdf83a..2053b7978d 100644
--- a/test/SemaTemplate/temp_arg_template.cpp
+++ b/test/SemaTemplate/temp_arg_template.cpp
@@ -1,3 +1,4 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
template<template<typename T> class X> struct A; // expected-note 2{{previous template template parameter is here}}
@@ -31,7 +32,9 @@ template<typename T> void f(int);
A<f> *a9; // expected-error{{must be a class template}}
// Evil digraph '<:' is parsed as '[', expect error.
+#if __cplusplus < 201103
A<::N::Z> *a10; // expected-error{{found '<::' after a template name which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?}}
+#endif
// Do not do a digraph correction here.
A<: :N::Z> *a11; // expected-error{{expected expression}} \
@@ -56,11 +59,12 @@ namespace N {
}
// PR12179
+#if __cplusplus < 201103
template <typename Primitive, template <Primitive...> class F> // expected-warning {{variadic templates are a C++11 extension}}
struct unbox_args {
typedef typename Primitive::template call<F> x;
};
-
+#else
template <template <typename> class... Templates>
struct template_tuple {};
template <typename T>
@@ -71,3 +75,4 @@ template_tuple<Templates...> f7() {}
void foo() {
f7<identity>();
}
+#endif