blob: e5f104168a82a85ea9f56ef8d5dc9db8f7b1bbdd [file] [log] [blame]
Douglas Gregor1f381062011-01-26 20:35:32 +00001// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s
2
Douglas Gregorb3df1382011-10-12 19:26:40 +00003inline namespace N { // expected-warning{{inline namespaces are a C++11 feature}}
Douglas Gregor1f381062011-01-26 20:35:32 +00004struct X {
Douglas Gregorb3df1382011-10-12 19:26:40 +00005 template<typename ...Args> // expected-warning{{variadic templates are a C++11 extension}}
6 void f(Args &&...) &; // expected-warning{{rvalue references are a C++11 extension}} \
7 // expected-warning{{reference qualifiers on functions are a C++11 extension}}
Douglas Gregor1f381062011-01-26 20:35:32 +00008};
9}
10
Richard Smithd60feeb2011-10-15 04:01:16 +000011struct B {
12 virtual void f();
13 virtual void g();
14};
15struct D final : B { // expected-warning {{'final' keyword accepted as a C++11 extension}}
16 virtual void f() override; // expected-warning {{'override' keyword accepted as a C++11 extension}}
17 virtual void g() final; // expected-warning {{'final' keyword accepted as a C++11 extension}}
18};
Richard Smith95fa2522011-10-15 04:11:50 +000019
20void NewBracedInitList() {
21 // A warning on this would be sufficient once we can handle it correctly.
22 new int {}; // expected-error {{}}
23}