summaryrefslogtreecommitdiffstats
path: root/clang/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
commit3425710ccaaaddb0c855f6af5bc47784db15c391 (patch)
tree76c63409927a9ef6ac266d836487c2fdc3de9ffe /clang/test/SemaTemplate/temp_arg_template.cpp
parente9fd605b41d121679c9e9cb75905977595b01c39 (diff)
downloadbcm5719-llvm-3425710ccaaaddb0c855f6af5bc47784db15c391.tar.gz
bcm5719-llvm-3425710ccaaaddb0c855f6af5bc47784db15c391.zip
Some of this test doesn't want -std=c++11
Sorry for the churn. llvm-svn: 189429
Diffstat (limited to 'clang/test/SemaTemplate/temp_arg_template.cpp')
-rw-r--r--clang/test/SemaTemplate/temp_arg_template.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/temp_arg_template.cpp b/clang/test/SemaTemplate/temp_arg_template.cpp
index 0833fdf83a2..2053b7978db 100644
--- a/clang/test/SemaTemplate/temp_arg_template.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud