r189429 - Some of this test doesn't want -std=c++11

Richard Smith richard at metafoo.co.uk
Tue Aug 27 17:19:26 PDT 2013


On Tue, Aug 27, 2013 at 5:13 PM, David Majnemer <david.majnemer at gmail.com>wrote:

> Author: majnemer
> Date: Tue Aug 27 19:13:42 2013
> New Revision: 189429
>
> URL: http://llvm.org/viewvc/llvm-project?rev=189429&view=rev
> Log:
> Some of this test doesn't want -std=c++11
>
> Sorry for the churn.
>
> Modified:
>     cfe/trunk/test/SemaTemplate/temp_arg_template.cpp
>
> Modified: cfe/trunk/test/SemaTemplate/temp_arg_template.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_arg_template.cpp?rev=189429&r1=189428&r2=189429&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/SemaTemplate/temp_arg_template.cpp (original)
> +++ cfe/trunk/test/SemaTemplate/temp_arg_template.cpp Tue Aug 27 19:13:42
> 2013
> @@ -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>
>

Maybe just add the expected-warning to this part, or remove it from above?
We don't really care about the C++98/C++11 warning difference here.


>  struct template_tuple {};
>  template <typename T>
> @@ -71,3 +75,4 @@ template_tuple<Templates...> f7() {}
>  void foo() {
>    f7<identity>();
>  }
> +#endif
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130827/d88cc5ad/attachment.html>


More information about the cfe-commits mailing list