1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc inline namespace N { // expected-warning{{inline namespaces are a C++11 feature}} 4f4a2713aSLionel Sambuc struct X { 5f4a2713aSLionel Sambuc template<typename ...Args> // expected-warning{{variadic templates are a C++11 extension}} 6f4a2713aSLionel Sambuc void f(Args &&...) &; // expected-warning{{rvalue references are a C++11 extension}} \ 7f4a2713aSLionel Sambuc // expected-warning{{reference qualifiers on functions are a C++11 extension}} 8f4a2713aSLionel Sambuc }; 9f4a2713aSLionel Sambuc } 10f4a2713aSLionel Sambuc 11f4a2713aSLionel Sambuc struct B { 12f4a2713aSLionel Sambuc virtual void f(); 13f4a2713aSLionel Sambuc virtual void g(); 14f4a2713aSLionel Sambuc }; 15f4a2713aSLionel Sambuc struct D final : B { // expected-warning {{'final' keyword is a C++11 extension}} 16f4a2713aSLionel Sambuc virtual void f() override; // expected-warning {{'override' keyword is a C++11 extension}} 17f4a2713aSLionel Sambuc virtual void g() final; // expected-warning {{'final' keyword is a C++11 extension}} 18f4a2713aSLionel Sambuc }; 19f4a2713aSLionel Sambuc NewBracedInitList()20f4a2713aSLionel Sambucvoid NewBracedInitList() { 21f4a2713aSLionel Sambuc // A warning on this would be sufficient once we can handle it correctly. 22f4a2713aSLionel Sambuc new int {}; // expected-error {{}} 23f4a2713aSLionel Sambuc } 24f4a2713aSLionel Sambuc 25f4a2713aSLionel Sambuc struct Auto { 26f4a2713aSLionel Sambuc static int n; 27f4a2713aSLionel Sambuc }; 28f4a2713aSLionel Sambuc auto Auto::n = 0; // expected-warning {{'auto' type specifier is a C++11 extension}} 29f4a2713aSLionel Sambuc auto Auto::m = 0; // expected-error {{no member named 'm' in 'Auto'}} 30f4a2713aSLionel Sambuc // expected-warning@-1 {{'auto' type specifier is a C++11 extension}} 31*0a6a1f1dSLionel Sambuc 32*0a6a1f1dSLionel Sambuc struct Conv { template<typename T> operator T(); }; 33*0a6a1f1dSLionel Sambuc bool pr21367_a = new int && false; 34*0a6a1f1dSLionel Sambuc bool pr21367_b = &Conv::operator int && false; 35