From 205d0445529eb985a1485ff8e2a18908f75f3bb1 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 12 Oct 2011 19:26:40 +0000 Subject: [PATCH] Switch diagnostic text from "C++0x" over to "C++11". We'd also like for "C++11" or "c++11" to be used for the warning groups, but without removing the old warning flags. Patches welcome; I've run out of time to work on this today. llvm-svn: 141801 --- .../clang/Basic/DiagnosticCommonKinds.td | 2 +- clang/include/clang/Basic/DiagnosticGroups.td | 2 +- .../clang/Basic/DiagnosticParseKinds.td | 44 +++++++++--------- .../clang/Basic/DiagnosticSemaKinds.td | 46 +++++++++---------- .../class.access/class.friend/p2-cxx03.cpp | 2 +- clang/test/CXX/class/class.friend/p2.cpp | 2 +- clang/test/CXX/class/class.friend/p6.cpp | 2 +- .../CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp | 4 +- clang/test/CXX/temp/temp.param/p15.cpp | 2 +- clang/test/CXX/temp/temp.param/p9.cpp | 4 +- clang/test/CodeGenObjCXX/blocks.mm | 4 +- clang/test/Parser/cxx-ext-delete-default.cpp | 10 ++-- clang/test/Parser/cxx-reference.cpp | 2 +- clang/test/Parser/cxx0x-in-cxx98.cpp | 8 ++-- clang/test/SemaCXX/PR10458.cpp | 2 +- clang/test/SemaCXX/PR9572.cpp | 2 +- clang/test/SemaCXX/auto-cxx0x.cpp | 2 +- clang/test/SemaCXX/auto-cxx98.cpp | 10 ++-- clang/test/SemaCXX/class.cpp | 4 +- clang/test/SemaCXX/convert-to-bool.cpp | 6 +-- clang/test/SemaCXX/cxx0x-compat.cpp | 6 +-- clang/test/SemaCXX/cxx0x-return-init-list.cpp | 6 +-- clang/test/SemaCXX/new-array-size-conv.cpp | 4 +- .../SemaTemplate/instantiate-function-2.cpp | 2 +- .../SemaTemplate/instantiate-member-class.cpp | 2 +- clang/test/SemaTemplate/temp_arg_nontype.cpp | 2 +- 26 files changed, 91 insertions(+), 91 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticCommonKinds.td b/clang/include/clang/Basic/DiagnosticCommonKinds.td index 603e1b9cb76c..2f32a590e023 100644 --- a/clang/include/clang/Basic/DiagnosticCommonKinds.td +++ b/clang/include/clang/Basic/DiagnosticCommonKinds.td @@ -52,7 +52,7 @@ def err_invalid_storage_class_in_func_decl : Error< "invalid storage class specifier in function declarator">; def err_expected_namespace_name : Error<"expected namespace name">; def ext_variadic_templates : ExtWarn< - "variadic templates are a C++0x extension">, InGroup; + "variadic templates are a C++11 extension">, InGroup; def err_default_special_members : Error< "only special member functions may be defaulted">; def err_friends_define_only_namespace_scope : Error< diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td index e704b61bfd25..8020dd163d23 100644 --- a/clang/include/clang/Basic/DiagnosticGroups.td +++ b/clang/include/clang/Basic/DiagnosticGroups.td @@ -302,7 +302,7 @@ def : DiagGroup<"comments", [Comment]>; // -Wcomments = -Wcomment def NonGCC : DiagGroup<"non-gcc", [SignCompare, Conversion, LiteralRange]>; -// A warning group for warnings about using C++0x features as extensions in +// A warning group for warnings about using C++11 features as extensions in // earlier C++ versions. def CXX0x : DiagGroup<"c++0x-extensions">; def DelegatingCtorCycles : diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td b/clang/include/clang/Basic/DiagnosticParseKinds.td index 733eccc7b5df..e589a0f0e481 100644 --- a/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -53,7 +53,7 @@ def ext_c99_variable_decl_in_for_loop : Extension< def ext_c99_compound_literal : Extension< "compound literals are a C99-specific feature">; def ext_enumerator_list_comma : Extension< - "commas at the end of enumerator lists are a %select{C99|C++0x}0-specific " + "commas at the end of enumerator lists are a %select{C99|C++11}0-specific " "feature">; def err_enumerator_list_missing_comma : Error< "missing ',' between enumerators">; @@ -187,26 +187,26 @@ def err_invalid_reference_qualifier_application : Error< def err_illegal_decl_reference_to_reference : Error< "%0 declared as a reference to a reference">; def ext_rvalue_reference : ExtWarn< - "rvalue references are a C++0x extension">, InGroup; + "rvalue references are a C++11 extension">, InGroup; def ext_ref_qualifier : ExtWarn< - "reference qualifiers on functions are a C++0x extension">, InGroup; + "reference qualifiers on functions are a C++11 extension">, InGroup; def ext_inline_namespace : ExtWarn< - "inline namespaces are a C++0x feature">, InGroup; + "inline namespaces are a C++11 feature">, InGroup; def err_generalized_initializer_lists : Error< - "generalized initializer lists are a C++0x extension unsupported in Clang">; + "generalized initializer lists are a C++11 extension unsupported in Clang">; def ext_generalized_initializer_lists : ExtWarn< - "generalized initializer lists are a C++0x extension unsupported in Clang">, + "generalized initializer lists are a C++11 extension unsupported in Clang">, InGroup; def ext_auto_type_specifier : ExtWarn< - "'auto' type specifier is a C++0x extension">, InGroup; + "'auto' type specifier is a C++11 extension">, InGroup; def warn_auto_storage_class : Warning< - "'auto' storage class specifier is redundant and incompatible with C++0x">, + "'auto' storage class specifier is redundant and incompatible with C++11">, InGroup; def ext_auto_storage_class : ExtWarn< - "'auto' storage class specifier is not permitted in C++0x, and will not " + "'auto' storage class specifier is not permitted in C++11, and will not " "be supported in future releases">; def ext_for_range : ExtWarn< - "range-based for loop is a C++0x extension">, InGroup; + "range-based for loop is a C++11 extension">, InGroup; def err_argument_required_after_attribute : Error< "argument required after attribute">; def err_missing_param : Error<"expected parameter declarator">; @@ -372,9 +372,9 @@ def err_default_delete_in_multiple_declaration : Error< "standalone declaration">; def err_cxx0x_attribute_forbids_arguments : Error< - "C++0x attribute '%0' cannot have an argument list">; + "C++11 attribute '%0' cannot have an argument list">; def err_cxx0x_attribute_requires_arguments : Error< - "C++0x attribute '%0' must have an argument list">; + "C++1 attribute '%0' must have an argument list">; def err_attributes_not_allowed : Error<"an attribute list cannot appear here">; /// C++ Templates @@ -399,7 +399,7 @@ def err_two_right_angle_brackets_need_space : Error< "a space is required between consecutive right angle brackets (use '> >')">; def warn_cxx0x_right_shift_in_template_arg : Warning< "use of right-shift operator ('>>') in template argument will require " - "parentheses in C++0x">; + "parentheses in C++11">; def err_multiple_template_declarators : Error< "%select{|a template declaration|an explicit template specialization|" "an explicit template instantiation}0 can " @@ -460,31 +460,31 @@ def err_missing_whitespace_digraph : Error< " which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'?">; def warn_deleted_function_accepted_as_extension: ExtWarn< - "deleted function definition accepted as a C++0x extension">, InGroup; + "deleted function definition accepted as a C++11 extension">, InGroup; def warn_defaulted_function_accepted_as_extension: ExtWarn< - "defaulted function definition accepted as a C++0x extension">, + "defaulted function definition accepted as a C++11 extension">, InGroup; -// C++0x in-class member initialization +// C++11 in-class member initialization def warn_nonstatic_member_init_accepted_as_extension: ExtWarn< - "in-class initialization of non-static data member accepted as a C++0x extension">, + "in-class initialization of non-static data member accepted as a C++11 extension">, InGroup; def err_bitfield_member_init: Error< "bitfield member cannot have an in-class initializer">; def err_incomplete_array_member_init: Error< "array bound cannot be deduced from an in-class initializer">; -// C++0x alias-declaration +// C++11 alias-declaration def ext_alias_declaration : ExtWarn< - "alias declarations accepted as a C++0x extension">, InGroup; + "alias declarations accepted as a C++11 extension">, InGroup; def err_alias_declaration_not_identifier : Error< "name defined in alias declaration must be an identifier">; def err_alias_declaration_specialization : Error< "%select{partial specialization|explicit specialization|explicit instantiation}0 of alias templates is not permitted">; -// C++0x override control +// C++11 override control def ext_override_control_keyword : Extension< - "'%0' keyword accepted as a C++0x extension">, InGroup; + "'%0' keyword accepted as a C++11 extension">, InGroup; def err_duplicate_virt_specifier : Error< "class member already marked '%0'">; @@ -501,7 +501,7 @@ def err_paren_sizeof_parameter_pack : Error< def err_sizeof_parameter_pack : Error< "expected parenthesized parameter pack name in 'sizeof...' expression">; -// C++0x lambda expressions +// C++11 lambda expressions def err_expected_comma_or_rsquare : Error< "expected ',' or ']' in lambda capture list">; def err_this_captured_by_reference : Error< diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 12d21e91696a..38b34a46cadb 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -618,12 +618,12 @@ def err_unexpected_friend : Error< def ext_enum_friend : ExtWarn< "enumeration type %0 cannot be a friend">; def ext_nonclass_type_friend : ExtWarn< - "non-class friend type %0 is a C++0x extension">, InGroup; + "non-class friend type %0 is a C++11 extension">, InGroup; def err_friend_is_member : Error< "friends cannot be members of the declaring class">; def ext_unelaborated_friend_type : ExtWarn< "specify '%select{struct|union|class|enum}0' to befriend %1; accepted " - "as a C++0x extension">, InGroup; + "as a C++11 extension">, InGroup; def err_qualified_friend_not_found : Error< "no function named %0 with type %1 was found in the specified scope">; def err_introducing_special_friend : Error< @@ -1076,11 +1076,11 @@ def err_temp_copy_deleted : Error< def err_temp_copy_incomplete : Error< "copying a temporary object of incomplete type %0">; -// C++0x decltype +// C++11 decltype def err_cannot_determine_declared_type_of_overloaded_function : Error< "cannot determine the type of an overloaded function">; -// C++0x auto +// C++11 auto def err_auto_variable_cannot_appear_in_own_initializer : Error< "variable %0 declared with 'auto' type cannot appear in its own initializer">; def err_illegal_decl_array_of_auto : Error< @@ -1113,7 +1113,7 @@ def err_auto_new_deduction_failure : Error< def err_auto_different_deductions : Error< "'auto' deduced as %0 in declaration of %1 and deduced as %2 in declaration of %3">; -// C++0x override control +// C++11 override control def override_keyword_only_allowed_on_virtual_member_functions : Error< "only virtual member functions can be marked '%0'">; def err_function_marked_override_not_overriding : Error< @@ -1121,16 +1121,16 @@ def err_function_marked_override_not_overriding : Error< def err_class_marked_final_used_as_base : Error< "base %0 is marked 'final'">; -// C++0x attributes +// C++11 attributes def err_repeat_attribute : Error<"'%0' attribute cannot be repeated">; -// C++0x [[final]] +// C++11 [[final]] def err_final_function_overridden : Error< "declaration of %0 overrides a 'final' function">; def err_final_base : Error< "derivation from 'final' %0">; -// C++0x scoped enumerations +// C++11 scoped enumerations def err_enum_invalid_underlying : Error< "non-integral type %0 is an invalid underlying type">; def err_enumerator_too_large : Error< @@ -1151,9 +1151,9 @@ def err_only_enums_have_underlying_types : Error< def err_incomplete_type_no_underlying_type : Error< "an incomplete enumeration type has no underlying type yet">; -// C++0x delegating constructors +// C++11 delegating constructors def err_delegation_0x_only : Error< - "delegating constructors are permitted only in C++0x">; + "delegating constructors are permitted only in C++11">; def err_delegating_initializer_alone : Error< "an initializer for a delegating constructor must appear alone">; def warn_delegating_ctor_cycle : Warning< @@ -1166,7 +1166,7 @@ def note_which_delegates_to : Note< def err_delegating_codegen_not_implemented : Error< "code generation for delegating constructors not implemented">; -// C++0x range-based for loop +// C++11 range-based for loop def err_for_range_decl_must_be_var : Error< "for range declaration must declare a variable">; def err_for_range_storage_class : Error< @@ -1188,7 +1188,7 @@ def note_for_range_type : Note<"range has type %0">; def note_for_range_begin_end : Note< "selected '%select{begin|end}0' %select{function|template }1%2 with iterator type %3">; -// C++0x constexpr +// C++11 constexpr def err_invalid_constexpr : Error< "%select{function parameter|typedef|non-static data member}0 " "cannot be constexpr">; @@ -2050,7 +2050,7 @@ def note_template_param_prev_default_arg : Note< def err_template_param_default_arg_missing : Error< "template parameter missing a default argument">; def ext_template_parameter_default_in_function_template : ExtWarn< - "default template arguments for a function template are a C++0x extension">, + "default template arguments for a function template are a C++11 extension">, InGroup; def err_template_parameter_default_template_member : Error< "cannot add a default template argument to the definition of a member of a " @@ -2187,7 +2187,7 @@ def err_template_spec_decl_out_of_scope_global : Error< def ext_template_spec_decl_out_of_scope_global : ExtWarn< "%select{class template|class template partial|function template|member " "function|static data member|member class}0 specialization of %1 must " - "originally be declared in the global scope; accepted as a C++0x extension">, + "originally be declared in the global scope; accepted as a C++11 extension">, InGroup; def err_template_spec_decl_out_of_scope : Error< "%select{class template|class template partial|function template|member " @@ -2196,7 +2196,7 @@ def err_template_spec_decl_out_of_scope : Error< def ext_template_spec_decl_out_of_scope : ExtWarn< "%select{class template|class template partial|function template|member " "function|static data member|member class}0 specialization of %1 must " - "originally be declared in namespace %2; accepted as a C++0x extension">, + "originally be declared in namespace %2; accepted as a C++11 extension">, InGroup; def err_template_spec_redecl_out_of_scope : Error< "%select{class template|class template partial|function template|member " @@ -2363,7 +2363,7 @@ def note_previous_explicit_instantiation : Note< "previous explicit instantiation is here">; def ext_explicit_instantiation_after_specialization : Extension< "explicit instantiation of %0 that occurs after an explicit " - "specialization will be ignored (C++0x extension)">, + "specialization will be ignored (C++11 extension)">, InGroup; def note_previous_template_specialization : Note< "previous template specialization is here">; @@ -2468,7 +2468,7 @@ def note_template_declared_here : Note< "%select{function template|class template|type alias template|template template parameter}0 " "%1 declared here">; -// C++0x Variadic Templates +// C++11 Variadic Templates def err_template_param_pack_default_arg : Error< "template parameter pack cannot have a default argument">; def err_template_param_pack_must_be_last_template_parameter : Error< @@ -2753,11 +2753,11 @@ def err_init_list_constant_narrowing : Error< "constant expression evaluates to %0 which cannot be narrowed to type %1">; def warn_init_list_variable_narrowing : Warning< "non-constant-expression cannot be narrowed from type %0 to %1 in " - "initializer list in C++0x">, + "initializer list in C++11">, InGroup, DefaultIgnore; def warn_init_list_constant_narrowing : Warning< "constant expression evaluates to %0 which cannot be narrowed to type %1 in " - "C++0x">, + "C++11">, InGroup, DefaultIgnore; def note_init_list_narrowing_override : Note< "override this message by inserting an explicit cast">; @@ -3673,7 +3673,7 @@ def err_array_size_ambiguous_conversion : Error< "enumeration type">; def ext_array_size_conversion : Extension< "implicit conversion from array size expression of type %0 to " - "%select{integral|enumeration}1 type %2 is a C++0x extension">, + "%select{integral|enumeration}1 type %2 is a C++11 extension">, InGroup; def err_address_space_qualified_new : Error< "'new' cannot allocate objects of type %0 in address space '%1'">; @@ -4376,11 +4376,11 @@ def warn_conv_to_void_not_used : Warning< def warn_not_compound_assign : Warning< "use of unary operator that may be intended as compound assignment (%0=)">; -// C++0x explicit conversion operators +// C++11 explicit conversion operators def warn_explicit_conversion_functions : Warning< - "explicit conversion functions are a C++0x extension">, InGroup; + "explicit conversion functions are a C++11 extension">, InGroup; -// C++0x defaulted functions +// C++11 defaulted functions def err_defaulted_default_ctor_params : Error< "an explicitly-defaulted default constructor must have no parameters">; def err_defaulted_copy_ctor_params : Error< diff --git a/clang/test/CXX/class.access/class.friend/p2-cxx03.cpp b/clang/test/CXX/class.access/class.friend/p2-cxx03.cpp index 82cddc2bad50..f8cabfd78a8f 100644 --- a/clang/test/CXX/class.access/class.friend/p2-cxx03.cpp +++ b/clang/test/CXX/class.access/class.friend/p2-cxx03.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s template class X0 { - friend T; // expected-warning{{non-class friend type 'T' is a C++0x extension}} + friend T; // expected-warning{{non-class friend type 'T' is a C++11 extension}} }; class X1 { }; diff --git a/clang/test/CXX/class/class.friend/p2.cpp b/clang/test/CXX/class/class.friend/p2.cpp index 87b69c095fbd..fb3cd19b2b18 100644 --- a/clang/test/CXX/class/class.friend/p2.cpp +++ b/clang/test/CXX/class/class.friend/p2.cpp @@ -4,7 +4,7 @@ struct B0; class A { friend class B {}; // expected-error {{cannot define a type in a friend declaration}} - friend int; // expected-warning {{non-class friend type 'int' is a C++0x extension}} + friend int; // expected-warning {{non-class friend type 'int' is a C++11 extension}} friend B0; // expected-warning {{specify 'struct' to befriend 'B0'}} friend class C; // okay }; diff --git a/clang/test/CXX/class/class.friend/p6.cpp b/clang/test/CXX/class/class.friend/p6.cpp index 0b173b5b3f70..82a90ff82f20 100644 --- a/clang/test/CXX/class/class.friend/p6.cpp +++ b/clang/test/CXX/class/class.friend/p6.cpp @@ -3,7 +3,7 @@ class A { friend static class B; // expected-error {{'static' is invalid in friend declarations}} friend extern class C; // expected-error {{'extern' is invalid in friend declarations}} - friend auto class D; // expected-warning {{incompatible with C++0x}} expected-error {{'auto' is invalid in friend declarations}} + friend auto class D; // expected-warning {{incompatible with C++11}} expected-error {{'auto' is invalid in friend declarations}} friend register class E; // expected-error {{'register' is invalid in friend declarations}} friend mutable class F; // expected-error {{'mutable' is invalid in friend declarations}} friend typedef class G; // expected-error {{'typedef' is invalid in friend declarations}} diff --git a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp index fcc1334b1506..ee870d960161 100644 --- a/clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp +++ b/clang/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp @@ -4,7 +4,7 @@ class A { public: explicit A(); - explicit operator int(); // expected-warning {{explicit conversion functions are a C++0x extension}} + explicit operator int(); // expected-warning {{explicit conversion functions are a C++11 extension}} explicit void f0(); // expected-error {{'explicit' can only be applied to a constructor or conversion function}} @@ -12,5 +12,5 @@ public: }; explicit A::A() { } // expected-error {{'explicit' can only be specified inside the class definition}} -explicit A::operator bool() { return false; } // expected-warning {{explicit conversion functions are a C++0x extension}}\ +explicit A::operator bool() { return false; } // expected-warning {{explicit conversion functions are a C++11 extension}}\ // expected-error {{'explicit' can only be specified inside the class definition}} diff --git a/clang/test/CXX/temp/temp.param/p15.cpp b/clang/test/CXX/temp/temp.param/p15.cpp index 13087791a3db..ee572e986b93 100644 --- a/clang/test/CXX/temp/temp.param/p15.cpp +++ b/clang/test/CXX/temp/temp.param/p15.cpp @@ -9,4 +9,4 @@ X> // expected-error{{a space is required between consecutive right a >> *x3; // expected-error{{a space is required between consecutive right angle brackets (use '> >')}} Y<(1 >> 2)> *y1; -Y<1 >> 2> *y2; // expected-warning{{use of right-shift operator ('>>') in template argument will require parentheses in C++0x}} +Y<1 >> 2> *y2; // expected-warning{{use of right-shift operator ('>>') in template argument will require parentheses in C++11}} diff --git a/clang/test/CXX/temp/temp.param/p9.cpp b/clang/test/CXX/temp/temp.param/p9.cpp index 62af522cd2c9..b2318c275e44 100644 --- a/clang/test/CXX/temp/temp.param/p9.cpp +++ b/clang/test/CXX/temp/temp.param/p9.cpp @@ -2,9 +2,9 @@ // A default template-argument shall not be specified in a function // template declaration or a function template definition -template // expected-warning{{default template arguments for a function template are a C++0x extension}} +template // expected-warning{{default template arguments for a function template are a C++11 extension}} void foo0(T); -template // expected-warning{{default template arguments for a function template are a C++0x extension}} +template // expected-warning{{default template arguments for a function template are a C++11 extension}} void foo1(T) { } // [...] nor in the template-parameter-list of the definition of a diff --git a/clang/test/CodeGenObjCXX/blocks.mm b/clang/test/CodeGenObjCXX/blocks.mm index db88db2cbac6..126931d51fad 100644 --- a/clang/test/CodeGenObjCXX/blocks.mm +++ b/clang/test/CodeGenObjCXX/blocks.mm @@ -30,7 +30,7 @@ void foo(id (^objectCreationBlock)(void)) { // Test4 struct S { - S *(^a)() = ^{ // expected-warning {{C++0x}} + S *(^a)() = ^{ // expected-warning {{C++11}} return this; }; }; @@ -40,7 +40,7 @@ S s; struct X { void f() { ^ { - struct Nested { Nested *ptr = this; }; // expected-warning {{C++0x}} + struct Nested { Nested *ptr = this; }; // expected-warning {{C++11}} } (); }; }; diff --git a/clang/test/Parser/cxx-ext-delete-default.cpp b/clang/test/Parser/cxx-ext-delete-default.cpp index 062723851496..be6efee24163 100644 --- a/clang/test/Parser/cxx-ext-delete-default.cpp +++ b/clang/test/Parser/cxx-ext-delete-default.cpp @@ -1,11 +1,11 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s struct A { - A(const A&) = delete; // expected-warning {{accepted as a C++0x extension}} - A& operator=(const A&) = delete; // expected-warning {{accepted as a C++0x extension}} - A() = default; // expected-warning {{accepted as a C++0x extension}} + A(const A&) = delete; // expected-warning {{accepted as a C++11 extension}} + A& operator=(const A&) = delete; // expected-warning {{accepted as a C++11 extension}} + A() = default; // expected-warning {{accepted as a C++11 extension}} ~A(); }; -void f() = delete; // expected-warning {{accepted as a C++0x extension}} -A::~A() = default; //expected-warning {{accepted as a C++0x extension}} +void f() = delete; // expected-warning {{accepted as a C++11 extension}} +A::~A() = default; //expected-warning {{accepted as a C++11 extension}} diff --git a/clang/test/Parser/cxx-reference.cpp b/clang/test/Parser/cxx-reference.cpp index fae938bcaab0..d21412cec0fc 100644 --- a/clang/test/Parser/cxx-reference.cpp +++ b/clang/test/Parser/cxx-reference.cpp @@ -18,4 +18,4 @@ int & volatile Y = val; // expected-error {{'volatile' qualifier may not be appl int & const volatile Z = val; /* expected-error {{'const' qualifier may not be applied}} \ expected-error {{'volatile' qualifier may not be applied}} */ -typedef int && RV; // expected-warning {{rvalue references are a C++0x extension}} +typedef int && RV; // expected-warning {{rvalue references are a C++11 extension}} diff --git a/clang/test/Parser/cxx0x-in-cxx98.cpp b/clang/test/Parser/cxx0x-in-cxx98.cpp index e0cbc23f5811..9e41a700a982 100644 --- a/clang/test/Parser/cxx0x-in-cxx98.cpp +++ b/clang/test/Parser/cxx0x-in-cxx98.cpp @@ -1,10 +1,10 @@ // RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s -inline namespace N { // expected-warning{{inline namespaces are a C++0x feature}} +inline namespace N { // expected-warning{{inline namespaces are a C++11 feature}} struct X { - template // expected-warning{{variadic templates are a C++0x extension}} - void f(Args &&...) &; // expected-warning{{rvalue references are a C++0x extension}} \ - // expected-warning{{reference qualifiers on functions are a C++0x extension}} + template // expected-warning{{variadic templates are a C++11 extension}} + void f(Args &&...) &; // expected-warning{{rvalue references are a C++11 extension}} \ + // expected-warning{{reference qualifiers on functions are a C++11 extension}} }; } diff --git a/clang/test/SemaCXX/PR10458.cpp b/clang/test/SemaCXX/PR10458.cpp index e1f077aa2639..57588ebcf1f0 100644 --- a/clang/test/SemaCXX/PR10458.cpp +++ b/clang/test/SemaCXX/PR10458.cpp @@ -2,6 +2,6 @@ void f() { int arr[] = { 1, 2, 3 }; - for (auto &i : arr) { // expected-warning {{'auto' type specifier is a C++0x extension}} expected-warning {{range-based for loop is a C++0x extension}} + for (auto &i : arr) { // expected-warning {{'auto' type specifier is a C++11 extension}} expected-warning {{range-based for loop is a C++11 extension}} } } diff --git a/clang/test/SemaCXX/PR9572.cpp b/clang/test/SemaCXX/PR9572.cpp index 25c0c017b7f6..b0bbfa6318cd 100644 --- a/clang/test/SemaCXX/PR9572.cpp +++ b/clang/test/SemaCXX/PR9572.cpp @@ -3,7 +3,7 @@ class Base { virtual ~Base(); // expected-note {{implicitly declared private here}} }; struct Foo : public Base { // expected-error {{base class 'Base' has private destructor}} - const int kBlah = 3; // expected-warning {{accepted as a C++0x extension}} + const int kBlah = 3; // expected-warning {{accepted as a C++11 extension}} Foo(); }; struct Bar : public Foo { diff --git a/clang/test/SemaCXX/auto-cxx0x.cpp b/clang/test/SemaCXX/auto-cxx0x.cpp index a7bb3e64e4ae..fb9f50919a70 100644 --- a/clang/test/SemaCXX/auto-cxx0x.cpp +++ b/clang/test/SemaCXX/auto-cxx0x.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x void f() { - auto int a; // expected-warning {{'auto' storage class specifier is not permitted in C++0x, and will not be supported in future releases}} + auto int a; // expected-warning {{'auto' storage class specifier is not permitted in C++11, and will not be supported in future releases}} int auto b; // expected-error{{cannot combine with previous 'int' declaration specifier}} } diff --git a/clang/test/SemaCXX/auto-cxx98.cpp b/clang/test/SemaCXX/auto-cxx98.cpp index 8d22469825c0..6c401ba11a93 100644 --- a/clang/test/SemaCXX/auto-cxx98.cpp +++ b/clang/test/SemaCXX/auto-cxx98.cpp @@ -1,8 +1,8 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98 void f() { - auto int a; // expected-warning {{'auto' storage class specifier is redundant and incompatible with C++0x}} - int auto b; // expected-warning {{'auto' storage class specifier is redundant and incompatible with C++0x}} - auto c; // expected-warning {{C++0x extension}} expected-error {{requires an initializer}} - static auto d = 0; // expected-warning {{C++0x extension}} - auto static e = 0; // expected-warning {{C++0x extension}} + auto int a; // expected-warning {{'auto' storage class specifier is redundant and incompatible with C++11}} + int auto b; // expected-warning {{'auto' storage class specifier is redundant and incompatible with C++11}} + auto c; // expected-warning {{C++11 extension}} expected-error {{requires an initializer}} + static auto d = 0; // expected-warning {{C++11 extension}} + auto static e = 0; // expected-warning {{C++11 extension}} } diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp index 52b062b5a716..160f365f4bbf 100644 --- a/clang/test/SemaCXX/class.cpp +++ b/clang/test/SemaCXX/class.cpp @@ -34,12 +34,12 @@ public: enum E1 { en1, en2 }; - int i = 0; // expected-warning {{in-class initialization of non-static data member accepted as a C++0x extension}} + int i = 0; // expected-warning {{in-class initialization of non-static data member accepted as a C++11 extension}} static int si = 0; // expected-error {{non-const static data member must be initialized out of line}} static const NestedC ci = 0; // expected-error {{static data member of type 'const C::NestedC' must be initialized out of line}} static const int nci = vs; // expected-error {{in-class initializer is not a constant expression}} static const int vi = 0; - static const volatile int cvi = 0; // ok, illegal in C++0x + static const volatile int cvi = 0; // ok, illegal in C++11 static const E evi = 0; void m() { diff --git a/clang/test/SemaCXX/convert-to-bool.cpp b/clang/test/SemaCXX/convert-to-bool.cpp index 4cd22e90c0e0..c9a355549fdf 100644 --- a/clang/test/SemaCXX/convert-to-bool.cpp +++ b/clang/test/SemaCXX/convert-to-bool.cpp @@ -8,7 +8,7 @@ struct ConvToInt { }; struct ExplicitConvToBool { - explicit operator bool(); // expected-warning{{explicit conversion functions are a C++0x extension}} + explicit operator bool(); // expected-warning{{explicit conversion functions are a C++11 extension}} }; void test_conv_to_bool(ConvToBool ctb, ConvToInt cti, ExplicitConvToBool ecb) { @@ -39,7 +39,7 @@ void test_conv_to_bool(ConvToBool ctb, ConvToInt cti, ExplicitConvToBool ecb) { void accepts_bool(bool) { } // expected-note{{candidate function}} struct ExplicitConvToRef { - explicit operator int&(); // expected-warning{{explicit conversion functions are a C++0x extension}} + explicit operator int&(); // expected-warning{{explicit conversion functions are a C++11 extension}} }; void test_explicit_bool(ExplicitConvToBool ecb) { @@ -56,7 +56,7 @@ void test_explicit_conv_to_ref(ExplicitConvToRef ecr) { struct A { }; struct B { }; struct C { - explicit operator A&(); // expected-warning{{explicit conversion functions are a C++0x extension}} + explicit operator A&(); // expected-warning{{explicit conversion functions are a C++11 extension}} operator B&(); // expected-note{{candidate}} }; diff --git a/clang/test/SemaCXX/cxx0x-compat.cpp b/clang/test/SemaCXX/cxx0x-compat.cpp index 1c4cbb2134e4..a01b26c5f91b 100644 --- a/clang/test/SemaCXX/cxx0x-compat.cpp +++ b/clang/test/SemaCXX/cxx0x-compat.cpp @@ -13,12 +13,12 @@ namespace M { } void f() { - auto int n = 0; // expected-warning {{'auto' storage class specifier is redundant and incompatible with C++0x}} + auto int n = 0; // expected-warning {{'auto' storage class specifier is redundant and incompatible with C++11}} } int n; struct S { char c; } -s = { n }, // expected-warning {{non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list in C++0x}} expected-note {{explicit cast}} -t = { 1234 }; // expected-warning {{constant expression evaluates to 1234 which cannot be narrowed to type 'char' in C++0x}} expected-warning {{changes value}} expected-note {{explicit cast}} +s = { n }, // expected-warning {{non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list in C++11}} expected-note {{explicit cast}} +t = { 1234 }; // expected-warning {{constant expression evaluates to 1234 which cannot be narrowed to type 'char' in C++11}} expected-warning {{changes value}} expected-note {{explicit cast}} diff --git a/clang/test/SemaCXX/cxx0x-return-init-list.cpp b/clang/test/SemaCXX/cxx0x-return-init-list.cpp index 2005a7f9f676..b786922b71a8 100644 --- a/clang/test/SemaCXX/cxx0x-return-init-list.cpp +++ b/clang/test/SemaCXX/cxx0x-return-init-list.cpp @@ -1,17 +1,17 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s // This test checks for a teeny tiny subset of the functionality in -// the C++0x generalized initializer lists feature, which happens to +// the C++11 generalized initializer lists feature, which happens to // be used in libstdc++ 4.5. We accept only this syntax so that Clang // can handle the libstdc++ 4.5 headers. int test0(int i) { - return { i }; // expected-warning{{generalized initializer lists are a C++0x extension unsupported in Clang}} + return { i }; // expected-warning{{generalized initializer lists are a C++11 extension unsupported in Clang}} } template T test1(U u) { - return { u }; // expected-warning{{generalized initializer lists are a C++0x extension unsupported in Clang}} + return { u }; // expected-warning{{generalized initializer lists are a C++11 extension unsupported in Clang}} } template int test1(char); diff --git a/clang/test/SemaCXX/new-array-size-conv.cpp b/clang/test/SemaCXX/new-array-size-conv.cpp index 80219a906209..e8bb67955f97 100644 --- a/clang/test/SemaCXX/new-array-size-conv.cpp +++ b/clang/test/SemaCXX/new-array-size-conv.cpp @@ -19,8 +19,8 @@ struct IndirectValueInt : ValueInt { }; struct TwoValueInts : ValueInt, IndirectValueInt { }; void test() { - (void)new int[ValueInt(10)]; // expected-warning{{implicit conversion from array size expression of type 'ValueInt' to integral type 'int' is a C++0x extension}} - (void)new int[ValueEnum()]; // expected-warning{{implicit conversion from array size expression of type 'ValueEnum' to enumeration type 'E' is a C++0x extension}} + (void)new int[ValueInt(10)]; // expected-warning{{implicit conversion from array size expression of type 'ValueInt' to integral type 'int' is a C++11 extension}} + (void)new int[ValueEnum()]; // expected-warning{{implicit conversion from array size expression of type 'ValueEnum' to enumeration type 'E' is a C++11 extension}} (void)new int[ValueBoth()]; // expected-error{{ambiguous conversion of array size expression of type 'ValueBoth' to an integral or enumeration type}} (void)new int[TwoValueInts()]; // expected-error{{ambiguous conversion of array size expression of type 'TwoValueInts' to an integral or enumeration type}} diff --git a/clang/test/SemaTemplate/instantiate-function-2.cpp b/clang/test/SemaTemplate/instantiate-function-2.cpp index 087ede2b89cb..19a8b61ff193 100644 --- a/clang/test/SemaTemplate/instantiate-function-2.cpp +++ b/clang/test/SemaTemplate/instantiate-function-2.cpp @@ -46,7 +46,7 @@ namespace PR9654 { namespace AliasTagDef { template T f() { - using S = struct { // expected-warning {{C++0x}} + using S = struct { // expected-warning {{C++11}} T g() { return T(); } diff --git a/clang/test/SemaTemplate/instantiate-member-class.cpp b/clang/test/SemaTemplate/instantiate-member-class.cpp index 1028b45cc0e1..c67eb4022a47 100644 --- a/clang/test/SemaTemplate/instantiate-member-class.cpp +++ b/clang/test/SemaTemplate/instantiate-member-class.cpp @@ -108,7 +108,7 @@ namespace test2 { namespace AliasTagDef { template struct F { - using S = struct U { // expected-warning {{C++0x}} + using S = struct U { // expected-warning {{C++11}} T g() { return T(); } diff --git a/clang/test/SemaTemplate/temp_arg_nontype.cpp b/clang/test/SemaTemplate/temp_arg_nontype.cpp index e93cfa3ebd5d..43fe38ba7c19 100644 --- a/clang/test/SemaTemplate/temp_arg_nontype.cpp +++ b/clang/test/SemaTemplate/temp_arg_nontype.cpp @@ -7,7 +7,7 @@ A *a1; // expected-error{{template argument for non-type template paramet A *a2; // expected-error{{template argument for non-type template parameter must be an expression}} -A<1 >> 2> *a3; // expected-warning{{use of right-shift operator ('>>') in template argument will require parentheses in C++0x}} +A<1 >> 2> *a3; // expected-warning{{use of right-shift operator ('>>') in template argument will require parentheses in C++11}} // C++ [temp.arg.nontype]p5: A *a4; // expected-error{{must be an expression}}