Richard Smith | 41be673 | 2011-10-14 20:48:27 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat -verify %s |
Richard Smith | 84ef899 | 2011-10-14 20:41:13 +0000 | [diff] [blame] | 2 | |
| 3 | template<typename ...T> // expected-warning {{variadic templates are incompatible with C++98}} |
| 4 | class Variadic1 {}; |
| 5 | |
| 6 | template<template<typename> class ...T> // expected-warning {{variadic templates are incompatible with C++98}} |
| 7 | class Variadic2 {}; |
| 8 | |
| 9 | template<int ...I> // expected-warning {{variadic templates are incompatible with C++98}} |
| 10 | class Variadic3 {}; |
Richard Smith | 41be673 | 2011-10-14 20:48:27 +0000 | [diff] [blame] | 11 | |
| 12 | int alignas(8) with_alignas; // expected-warning {{'alignas' is incompatible with C++98}} |
| 13 | int with_attribute [[ ]]; // expected-warning {{attributes are incompatible with C++98}} |
Richard Smith | 661a996 | 2011-10-15 01:18:56 +0000 | [diff] [blame] | 14 | |
| 15 | void Literals() { |
| 16 | (void)u8"str"; // expected-warning {{unicode literals are incompatible with C++98}} |
| 17 | (void)u"str"; // expected-warning {{unicode literals are incompatible with C++98}} |
| 18 | (void)U"str"; // expected-warning {{unicode literals are incompatible with C++98}} |
| 19 | (void)u'x'; // expected-warning {{unicode literals are incompatible with C++98}} |
| 20 | (void)U'x'; // expected-warning {{unicode literals are incompatible with C++98}} |
| 21 | |
| 22 | (void)u8R"X(str)X"; // expected-warning {{raw string literals are incompatible with C++98}} |
| 23 | (void)uR"X(str)X"; // expected-warning {{raw string literals are incompatible with C++98}} |
| 24 | (void)UR"X(str)X"; // expected-warning {{raw string literals are incompatible with C++98}} |
| 25 | (void)R"X(str)X"; // expected-warning {{raw string literals are incompatible with C++98}} |
| 26 | (void)LR"X(str)X"; // expected-warning {{raw string literals are incompatible with C++98}} |
| 27 | } |
| 28 | |
| 29 | template<typename T> struct S {}; |
| 30 | S<::S<void> > s; // expected-warning {{'<::' is treated as digraph '<:' (aka '[') followed by ':' in C++98}} |