[cfe-dev] [PATCH] Replace "can not" with "cannot" in diagnostics messages
Ismail Pazarbasi
ismail.pazarbasi at gmail.com
Fri Mar 7 14:29:54 PST 2014
As subject says, "can not" has been replaced with "cannot" in
diagnostics and tests.
-------------- next part --------------
Index: include/clang/Basic/DiagnosticParseKinds.td
===================================================================
--- include/clang/Basic/DiagnosticParseKinds.td (revision 203166)
+++ include/clang/Basic/DiagnosticParseKinds.td (working copy)
@@ -190,13 +190,13 @@
def err_expected_semi_after_method_proto : Error<
"expected ';' after method prototype">;
def err_expected_semi_after_namespace_name : Error<
"expected ';' after namespace name">;
def err_unexpected_namespace_attributes_alias : Error<
- "attributes can not be specified on namespace alias">;
+ "attributes cannot be specified on namespace alias">;
def err_inline_namespace_alias : Error<"namespace alias cannot be inline">;
def err_namespace_nonnamespace_scope : Error<
"namespaces can only be defined in global or namespace scope">;
def err_nested_namespaces_with_double_colon : Error<
"nested namespace definition must define each namespace separately">;
def err_expected_semi_after_attribute_list : Error<
@@ -409,13 +409,13 @@
def err_missing_catch_finally : Error<
"@try statement without a @catch and @finally clause">;
def err_objc_concat_string : Error<"unexpected token after Objective-C string">;
def err_expected_objc_container : Error<
"'@end' must appear in an Objective-C context">;
def err_unexpected_protocol_qualifier : Error<
- "@implementation declaration can not be protocol qualified">;
+ "@implementation declaration cannot be protocol qualified">;
def err_objc_unexpected_atend : Error<
"'@end' appears where closing brace '}' is expected">;
def error_property_ivar_decl : Error<
"property synthesize requires specification of an ivar">;
def err_synthesized_property_name : Error<
"expected a property name in @synthesize">;
Index: include/clang/Basic/DiagnosticSemaKinds.td
===================================================================
--- include/clang/Basic/DiagnosticSemaKinds.td (revision 203166)
+++ include/clang/Basic/DiagnosticSemaKinds.td (working copy)
@@ -103,15 +103,15 @@
"variable length array cannot be formed during template argument deduction">;
def err_array_star_in_function_definition : Error<
"variable length array must be bound in function definition">;
def err_vla_decl_in_file_scope : Error<
"variable length array declaration not allowed at file scope">;
def err_vla_decl_has_static_storage : Error<
- "variable length array declaration can not have 'static' storage duration">;
+ "variable length array declaration cannot have 'static' storage duration">;
def err_vla_decl_has_extern_linkage : Error<
- "variable length array declaration can not have 'extern' linkage">;
+ "variable length array declaration cannot have 'extern' linkage">;
def ext_vla_folded_to_constant : Extension<
"variable length array folded to constant array as an extension">, InGroup<GNUFoldingConstant>;
// C99 variably modified types
def err_variably_modified_template_arg : Error<
"variably modified type %0 cannot be used as a template argument">;
@@ -270,15 +270,15 @@
"using declaration in class refers into '%0', which is not a class">;
def err_using_decl_nested_name_specifier_is_current_class : Error<
"using declaration refers to its own class">;
def err_using_decl_nested_name_specifier_is_not_base_class : Error<
"using declaration refers into '%0', which is not a base class of %1">;
def err_using_decl_constructor_not_in_direct_base : Error<
- "%0 is not a direct base of %1, can not inherit constructors">;
+ "%0 is not a direct base of %1, cannot inherit constructors">;
def err_using_decl_constructor_conflict : Error<
- "can not inherit constructor, already inherited constructor with "
+ "cannot inherit constructor, already inherited constructor with "
"the same signature">;
def note_using_decl_constructor_conflict_current_ctor : Note<
"conflicting constructor">;
def note_using_decl_constructor_conflict_previous_ctor : Note<
"previous constructor">;
def note_using_decl_constructor_conflict_previous_using : Note<
@@ -286,24 +286,24 @@
def warn_using_decl_constructor_ellipsis : Warning<
"inheriting constructor does not inherit ellipsis">,
InGroup<DiagGroup<"inherited-variadic-ctor">>;
def note_using_decl_constructor_ellipsis : Note<
"constructor declared with ellipsis here">;
def err_using_decl_can_not_refer_to_class_member : Error<
- "using declaration can not refer to class member">;
+ "using declaration cannot refer to class member">;
def err_using_decl_can_not_refer_to_namespace : Error<
- "using declaration can not refer to namespace">;
+ "using declaration cannot refer to namespace">;
def err_using_decl_constructor : Error<
- "using declaration can not refer to a constructor">;
+ "using declaration cannot refer to a constructor">;
def warn_cxx98_compat_using_decl_constructor : Warning<
"inheriting constructors are incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
def err_using_decl_destructor : Error<
- "using declaration can not refer to a destructor">;
+ "using declaration cannot refer to a destructor">;
def err_using_decl_template_id : Error<
- "using declaration can not refer to a template specialization">;
+ "using declaration cannot refer to a template specialization">;
def note_using_decl_target : Note<"target of using declaration">;
def note_using_decl_conflict : Note<"conflicting declaration">;
def err_using_decl_redeclaration : Error<"redeclaration of using decl">;
def err_using_decl_conflict : Error<
"target of using declaration conflicts with declaration already in scope">;
def err_using_decl_conflict_reverse : Error<
@@ -858,13 +858,13 @@
"property %0 attempting to use instance variable %1 declared in super class %2">;
def error_weak_property : Error<
"existing instance variable %1 for __weak property %0 must be __weak">;
def error_strong_property : Error<
"existing instance variable %1 for strong property %0 may not be __weak">;
def error_dynamic_property_ivar_decl : Error<
- "dynamic property can not have instance variable specification">;
+ "dynamic property cannot have instance variable specification">;
def error_duplicate_ivar_use : Error<
"synthesized properties %0 and %1 both claim instance variable %2">;
def error_property_implemented : Error<"property %0 is already implemented">;
def warn_objc_missing_super_call : Warning<
"method possibly missing a [super %0] call">,
InGroup<ObjCMissingSuperCalls>;
@@ -983,19 +983,19 @@
def err_multiple_final_overriders : Error<
"virtual function %q0 has more than one final overrider in %1">;
def note_final_overrider : Note<"final overrider of %q0 in %1">;
def err_type_defined_in_type_specifier : Error<
- "%0 can not be defined in a type specifier">;
+ "%0 cannot be defined in a type specifier">;
def err_type_defined_in_result_type : Error<
- "%0 can not be defined in the result type of a function">;
+ "%0 cannot be defined in the result type of a function">;
def err_type_defined_in_param_type : Error<
- "%0 can not be defined in a parameter type">;
+ "%0 cannot be defined in a parameter type">;
def err_type_defined_in_alias_template : Error<
- "%0 can not be defined in a type alias template">;
+ "%0 cannot be defined in a type alias template">;
def note_pure_virtual_function : Note<
"unimplemented pure virtual method %0 in %1">;
def err_deleted_decl_not_first : Error<
"deleted definition must be first declaration">;
@@ -1159,13 +1159,13 @@
"'mutable' can only be applied to member variables">;
def err_virtual_non_function : Error<
"'virtual' can only appear on non-static member functions">;
def err_virtual_out_of_class : Error<
"'virtual' can only be specified inside the class definition">;
def err_virtual_member_function_template : Error<
- "'virtual' can not be specified on member function templates">;
+ "'virtual' cannot be specified on member function templates">;
def err_static_overrides_virtual : Error<
"'static' member function %0 overrides a virtual function in a base class">;
def err_explicit_non_function : Error<
"'explicit' can only appear on non-static member functions">;
def err_explicit_out_of_class : Error<
"'explicit' can only be specified inside the class definition">;
@@ -3252,13 +3252,13 @@
def err_partial_spec_args_match_primary_template : Error<
"%select{class|variable}0 template partial specialization does not "
"specialize any template argument; to %select{declare|define}1 the "
"primary template, remove the template argument list">;
def warn_partial_specs_not_deducible : Warning<
"%select{class|variable}0 template partial specialization contains "
- "%select{a template parameter|template parameters}1 that can not be "
+ "%select{a template parameter|template parameters}1 that cannot be "
"deduced; this partial specialization will never be used">;
def note_partial_spec_unused_parameter : Note<
"non-deducible template parameter %0">;
def err_partial_spec_ordering_ambiguous : Error<
"ambiguous partial specializations of %0">;
def note_partial_spec_match : Note<"partial specialization matches %0">;
@@ -3782,13 +3782,13 @@
def warn_illegal_constant_array_size : Extension<
"size of static array must be an integer constant expression">;
def err_vm_decl_in_file_scope : Error<
"variably modified type declaration not allowed at file scope">;
def err_vm_decl_has_extern_linkage : Error<
- "variably modified type declaration can not have 'extern' linkage">;
+ "variably modified type declaration cannot have 'extern' linkage">;
def err_typecheck_field_variable_size : Error<
"fields must have a constant size: 'variable length array in structure' "
"extension will never be supported">;
def err_vm_func_decl : Error<
"function declaration cannot have variably modified type">;
def err_array_too_large : Error<
@@ -4907,13 +4907,13 @@
"@catch parameter cannot have storage specifier '%0'">;
def warn_register_objc_catch_parm : Warning<
"'register' storage specifier on @catch parameter will be ignored">;
def err_qualified_objc_catch_parm : Error<
"@catch parameter declarator cannot be qualified">;
def warn_objc_pointer_cxx_catch_fragile : Warning<
- "can not catch an exception thrown with @throw in C++ in the non-unified "
+ "cannot catch an exception thrown with @throw in C++ in the non-unified "
"exception model">, InGroup<ObjCNonUnifiedException>;
def err_objc_object_catch : Error<
"can't catch an Objective-C object by value">;
def err_incomplete_type_objc_at_encode : Error<
"'@encode' of incomplete type %0">;
Index: test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp
===================================================================
--- test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp (revision 203166)
+++ test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp (working copy)
@@ -4,9 +4,9 @@
struct A {
template<class T> void f(T);
template<class T> struct X { };
};
struct B : A {
- using A::f<double>; // expected-error{{using declaration can not refer to a template specialization}}
- using A::X<int>; // expected-error{{using declaration can not refer to a template specialization}}
+ using A::f<double>; // expected-error{{using declaration cannot refer to a template specialization}}
+ using A::X<int>; // expected-error{{using declaration cannot refer to a template specialization}}
};
Index: test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp
===================================================================
--- test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp (revision 203166)
+++ test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp (working copy)
@@ -2,7 +2,7 @@
// C++0x N2914.
namespace A {
namespace B { }
}
-using A::B; // expected-error{{using declaration can not refer to namespace}}
+using A::B; // expected-error{{using declaration cannot refer to namespace}}
Index: test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp
===================================================================
--- test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp (revision 203166)
+++ test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp (working copy)
@@ -3,13 +3,13 @@
struct X {
int i;
static int a;
};
-using X::i; // expected-error{{using declaration can not refer to class member}}
-using X::s; // expected-error{{using declaration can not refer to class member}}
+using X::i; // expected-error{{using declaration cannot refer to class member}}
+using X::s; // expected-error{{using declaration cannot refer to class member}}
void f() {
- using X::i; // expected-error{{using declaration can not refer to class member}}
- using X::s; // expected-error{{using declaration can not refer to class member}}
+ using X::i; // expected-error{{using declaration cannot refer to class member}}
+ using X::s; // expected-error{{using declaration cannot refer to class member}}
}
Index: test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp
===================================================================
--- test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp (revision 203166)
+++ test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp (working copy)
@@ -1,43 +1,43 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s -fcxx-exceptions
using X = struct { // ok
};
-template<typename T> using Y = struct { // expected-error {{can not be defined in a type alias template}}
+template<typename T> using Y = struct { // expected-error {{cannot be defined in a type alias template}}
};
class K {
virtual ~K();
- operator struct S {} (); // expected-error{{'K::S' can not be defined in a type specifier}}
+ operator struct S {} (); // expected-error{{'K::S' cannot be defined in a type specifier}}
};
struct A {};
void f() {
int arr[3] = {1,2,3};
for (struct S { S(int) {} } s : arr) { // expected-error {{types may not be defined in a for range declaration}}
}
- new struct T {}; // expected-error {{'T' can not be defined in a type specifier}}
- new struct A {}; // expected-error {{'A' can not be defined in a type specifier}}
+ new struct T {}; // expected-error {{'T' cannot be defined in a type specifier}}
+ new struct A {}; // expected-error {{'A' cannot be defined in a type specifier}}
- try {} catch (struct U {}) {} // expected-error {{'U' can not be defined in a type specifier}}
+ try {} catch (struct U {}) {} // expected-error {{'U' cannot be defined in a type specifier}}
- (void)(struct V { V(int); })0; // expected-error {{'V' can not be defined in a type specifier}}
+ (void)(struct V { V(int); })0; // expected-error {{'V' cannot be defined in a type specifier}}
- (void)dynamic_cast<struct W {}*>((K*)0); // expected-error {{'W' can not be defined in a type specifier}}
- (void)static_cast<struct X {}*>(0); // expected-error {{'X' can not be defined in a type specifier}}
- (void)reinterpret_cast<struct Y {}*>(0); // expected-error {{'Y' can not be defined in a type specifier}}
- (void)const_cast<struct Z {}*>((const Z*)0); // expected-error {{'Z' can not be defined in a type specifier}}
+ (void)dynamic_cast<struct W {}*>((K*)0); // expected-error {{'W' cannot be defined in a type specifier}}
+ (void)static_cast<struct X {}*>(0); // expected-error {{'X' cannot be defined in a type specifier}}
+ (void)reinterpret_cast<struct Y {}*>(0); // expected-error {{'Y' cannot be defined in a type specifier}}
+ (void)const_cast<struct Z {}*>((const Z*)0); // expected-error {{'Z' cannot be defined in a type specifier}}
}
-void g() throw (struct Ex {}) { // expected-error {{'Ex' can not be defined in a type specifier}}
+void g() throw (struct Ex {}) { // expected-error {{'Ex' cannot be defined in a type specifier}}
}
-alignas(struct Aa {}) int x; // expected-error {{'Aa' can not be defined in a type specifier}}
+alignas(struct Aa {}) int x; // expected-error {{'Aa' cannot be defined in a type specifier}}
-int a = sizeof(struct So {}); // expected-error {{'So' can not be defined in a type specifier}}
-int b = alignof(struct Ao {}); // expected-error {{'Ao' can not be defined in a type specifier}}
+int a = sizeof(struct So {}); // expected-error {{'So' cannot be defined in a type specifier}}
+int b = alignof(struct Ao {}); // expected-error {{'Ao' cannot be defined in a type specifier}}
namespace std { struct type_info; }
-const std::type_info &ti = typeid(struct Ti {}); // expected-error {{'Ti' can not be defined in a type specifier}}
+const std::type_info &ti = typeid(struct Ti {}); // expected-error {{'Ti' cannot be defined in a type specifier}}
Index: test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp
===================================================================
--- test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp (revision 203166)
+++ test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp (working copy)
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
struct A { };
-A::A (enum { e1 }) {} // expected-error{{can not be defined in a parameter}}
-void A::f(enum { e2 }) {} // expected-error{{can not be defined in a parameter}}
+A::A (enum { e1 }) {} // expected-error{{cannot be defined in a parameter}}
+void A::f(enum { e2 }) {} // expected-error{{cannot be defined in a parameter}}
-enum { e3 } A::g() { } // expected-error{{can not be defined in the result type}} \
+enum { e3 } A::g() { } // expected-error{{cannot be defined in the result type}} \
// expected-error{{out-of-line definition}}
Index: test/CXX/drs/dr1xx.cpp
===================================================================
--- test/CXX/drs/dr1xx.cpp (revision 203166)
+++ test/CXX/drs/dr1xx.cpp (working copy)
@@ -63,13 +63,13 @@
template<> struct A<int>::B { int X; };
}
namespace dr109 { // dr109: yes
struct A { template<typename T> void f(T); };
template<typename T> struct B : T {
- using T::template f; // expected-error {{using declaration can not refer to a template}}
+ using T::template f; // expected-error {{using declaration cannot refer to a template}}
void g() { this->f<int>(123); } // expected-error {{use 'template'}}
};
}
namespace dr111 { // dr111: dup 535
struct A { A(); A(volatile A&, int = 0); A(A&, const char * = "foo"); };
@@ -719,15 +719,15 @@
template<typename> struct C;
template<typename> void f();
template<typename> static int n; // expected-error 0-1{{extension}}
};
struct D : A<int>, B {
using A<int>::n;
- using B::C<int>; // expected-error {{using declaration can not refer to a template specialization}}
- using B::f<int>; // expected-error {{using declaration can not refer to a template specialization}}
- using B::n<int>; // expected-error {{using declaration can not refer to a template specialization}}
+ using B::C<int>; // expected-error {{using declaration cannot refer to a template specialization}}
+ using B::f<int>; // expected-error {{using declaration cannot refer to a template specialization}}
+ using B::n<int>; // expected-error {{using declaration cannot refer to a template specialization}}
};
}
namespace { // dr171: yes
int dr171a;
}
Index: test/CXX/special/class.inhctor/elsewhere.cpp
===================================================================
--- test/CXX/special/class.inhctor/elsewhere.cpp (revision 203166)
+++ test/CXX/special/class.inhctor/elsewhere.cpp (working copy)
@@ -6,13 +6,13 @@
// A using-declaration for a class member shall be a member-declaration.
struct B1 {
B1(int);
};
-using B1::B1; // expected-error {{using declaration can not refer to class member}}
+using B1::B1; // expected-error {{using declaration cannot refer to class member}}
// C++11 [namespace.udecl]p10:
// A using-declaration is a declaration and can therefore be used repeatedly
// where (and only where) multiple declarations are allowed.
struct I1 : B1 {
@@ -24,13 +24,13 @@
// In a using declaration used as a member-declaration, the nested-name-
// specifier shall name a base class of the class being defined.
// If such a using-declaration names a constructor, the nested-name-specifier
// shall name a direct base class of the class being defined.
struct D1 : I1 {
- using B1::B1; // expected-error {{'B1' is not a direct base of 'D1', can not inherit constructors}}
+ using B1::B1; // expected-error {{'B1' is not a direct base of 'D1', cannot inherit constructors}}
};
template<typename T> struct A {};
template<typename T> struct B : A<bool>, A<char> {
using A<T>::A; // expected-error {{'A<double>::', which is not a base class of 'B<double>'}}
@@ -44,13 +44,13 @@
};
C<bool> cb;
C<char> cc; // expected-note {{here}}
template<typename T> struct D : A<T> {};
template<typename T> struct E : D<T> {
- using A<bool>::A; // expected-error {{'A<bool>' is not a direct base of 'E<bool>', can not inherit}}
+ using A<bool>::A; // expected-error {{'A<bool>' is not a direct base of 'E<bool>', cannot inherit}}
};
E<bool> eb; // expected-note {{here}}
template<typename T> struct F : D<bool> {
using A<T>::A; // expected-error {{'A<bool>' is not a direct base of 'F<bool>'}}
};
Index: test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp
===================================================================
--- test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp (revision 203166)
+++ test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp (working copy)
@@ -18,16 +18,16 @@
template<template<typename> class...X> int v4;
template<template<typename> class...X> int v4<X...>;
// expected-error at -1{{variable template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list}}
template<typename Outer> struct X {
template<typename Inner> static int y;
- template<typename Inner> static int y<Outer>; // expected-warning {{can not be deduced}} expected-note {{'Inner'}}
+ template<typename Inner> static int y<Outer>; // expected-warning {{cannot be deduced}} expected-note {{'Inner'}}
template<typename Inner> static int y<Inner>; // expected-error {{does not specialize}}
};
-template<typename Outer> template<typename Inner> int X<Outer>::y<Outer>; // expected-warning {{can not be deduced}} expected-note {{'Inner'}}
+template<typename Outer> template<typename Inner> int X<Outer>::y<Outer>; // expected-warning {{cannot be deduced}} expected-note {{'Inner'}}
template<typename Outer> template<typename Inner> int X<Outer>::y<Inner>; // expected-error {{does not specialize}}
// FIXME: Merging this with the above class causes an assertion failure when
// instantiating one of the bogus partial specializations.
template<typename Outer> struct Y {
template<typename Inner> static int y;
Index: test/CXX/temp/temp.decls/temp.mem/p3.cpp
===================================================================
--- test/CXX/temp/temp.decls/temp.mem/p3.cpp (revision 203166)
+++ test/CXX/temp/temp.decls/temp.mem/p3.cpp (working copy)
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
template <class T> struct AA {
- template <class C> virtual void g(C); // expected-error{{'virtual' can not be specified on member function templates}}
+ template <class C> virtual void g(C); // expected-error{{'virtual' cannot be specified on member function templates}}
virtual void f();
};
Index: test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp
===================================================================
--- test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp (revision 203166)
+++ test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp (working copy)
@@ -29,13 +29,13 @@
>::value? 1 : -1];
template<typename ... Types> struct UselessPartialSpec;
template<typename ... Types, // expected-note{{non-deducible template parameter 'Types'}}
typename Tail> // expected-note{{non-deducible template parameter 'Tail'}}
- struct UselessPartialSpec<Types..., Tail>; // expected-warning{{class template partial specialization contains template parameters that can not be deduced; this partial specialization will never be used}}
+ struct UselessPartialSpec<Types..., Tail>; // expected-warning{{class template partial specialization contains template parameters that cannot be deduced; this partial specialization will never be used}}
}
namespace DeduceNonTypeTemplateArgsInArray {
template<typename ...ArrayTypes>
struct split_arrays;
Index: test/Parser/builtin_classify_type.c
===================================================================
--- test/Parser/builtin_classify_type.c (revision 203166)
+++ test/Parser/builtin_classify_type.c (working copy)
@@ -6,13 +6,13 @@
int a;
float b;
double d;
struct foo s;
static int ary[__builtin_classify_type(a)];
- static int ary2[(__builtin_classify_type)(a)]; // expected-error{{variable length array declaration can not have 'static' storage duration}}
+ static int ary2[(__builtin_classify_type)(a)]; // expected-error{{variable length array declaration cannot have 'static' storage duration}}
static int ary3[(*__builtin_classify_type)(a)]; // expected-error{{builtin functions must be directly called}}
int result;
result = __builtin_classify_type(a);
result = __builtin_classify_type(b);
Index: test/Parser/cxx-decl.cpp
===================================================================
--- test/Parser/cxx-decl.cpp (revision 203166)
+++ test/Parser/cxx-decl.cpp (working copy)
@@ -178,13 +178,13 @@
float->foo(); // expected-error {{cannot use arrow operator on a type}}
FLOAT->foo();
}
namespace PR15017 {
- template<typename T = struct X { int i; }> struct S {}; // expected-error {{'PR15017::X' can not be defined in a type specifier}}
+ template<typename T = struct X { int i; }> struct S {}; // expected-error {{'PR15017::X' cannot be defined in a type specifier}}
}
// Ensure we produce at least some diagnostic for attributes in C++98.
[[]] struct S; // expected-error 2{{}}
namespace test7 {
Index: test/Parser/cxx-using-declaration.cpp
===================================================================
--- test/Parser/cxx-using-declaration.cpp (revision 203166)
+++ test/Parser/cxx-using-declaration.cpp (working copy)
@@ -30,13 +30,13 @@
void D::g(int) { g('c'); } // recursively calls D::g(int)
namespace E {
template <typename TYPE> int funcE(TYPE arg) { return(arg); }
}
-using E::funcE<int>; // expected-error{{using declaration can not refer to a template specialization}}
+using E::funcE<int>; // expected-error{{using declaration cannot refer to a template specialization}}
namespace F {
struct X;
}
using F::X;
Index: test/Parser/cxx11-type-specifier.cpp
===================================================================
--- test/Parser/cxx11-type-specifier.cpp (revision 203166)
+++ test/Parser/cxx11-type-specifier.cpp (working copy)
@@ -12,13 +12,13 @@
(void) new constexpr int; // expected-error{{type name does not allow constexpr}}
} catch (constexpr int) { // expected-error{{type name does not allow constexpr}}
}
// These parse as type definitions, not as type references with braced
// initializers. Sad but true...
- (void) new struct S {}; // expected-error{{'S' can not be defined in a type specifier}}
- (void) new enum E { e }; // expected-error{{'E' can not be defined in a type specifier}}
+ (void) new struct S {}; // expected-error{{'S' cannot be defined in a type specifier}}
+ (void) new enum E { e }; // expected-error{{'E' cannot be defined in a type specifier}}
}
// And for trailing-type-specifier-seq
auto f() -> unknown; // expected-error{{unknown type name 'unknown'}}
Index: test/Parser/namespace-alias-attr.cpp
===================================================================
--- test/Parser/namespace-alias-attr.cpp (revision 203166)
+++ test/Parser/namespace-alias-attr.cpp (working copy)
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -verify %s
namespace A
{
}
-namespace B __attribute__ (( static )) = A; // expected-error{{attributes can not be specified on namespace alias}}
+namespace B __attribute__ (( static )) = A; // expected-error{{attributes cannot be specified on namespace alias}}
Index: test/Parser/objc-error-qualified-implementation.m
===================================================================
--- test/Parser/objc-error-qualified-implementation.m (revision 203166)
+++ test/Parser/objc-error-qualified-implementation.m (working copy)
@@ -3,27 +3,27 @@
@protocol P
@end
@interface I @end
- at implementation I<P> @end // expected-error {{@implementation declaration can not be protocol qualified}}
+ at implementation I<P> @end // expected-error {{@implementation declaration cannot be protocol qualified}}
@interface J < P,P >
@end
- at implementation J < P,P > // expected-error {{@implementation declaration can not be protocol qualified}}
+ at implementation J < P,P > // expected-error {{@implementation declaration cannot be protocol qualified}}
@end
@interface K @end
- at implementation K <P // expected-error {{@implementation declaration can not be protocol qualified}}
+ at implementation K <P // expected-error {{@implementation declaration cannot be protocol qualified}}
@end // expected-error {{expected '>'}}
// rdar://13920026
- at implementation I (Cat) <P> // expected-error {{@implementation declaration can not be protocol qualified}}
+ at implementation I (Cat) <P> // expected-error {{@implementation declaration cannot be protocol qualified}}
- (void) Meth {}
@end
- at implementation I (Cat1) <P // expected-error {{@implementation declaration can not be protocol qualified}}
+ at implementation I (Cat1) <P // expected-error {{@implementation declaration cannot be protocol qualified}}
@end // expected-error {{expected '>'}}
Index: test/Sema/vla.c
===================================================================
--- test/Sema/vla.c (revision 203166)
+++ test/Sema/vla.c (working copy)
@@ -16,13 +16,13 @@
// PR3048
int x = sizeof(struct{char qq[x];}); // expected-error {{fields must have a constant size}}
// PR2352
void f2(unsigned int m)
{
- extern int e1[2][m]; // expected-error {{variable length array declaration can not have 'extern' linkage}}
+ extern int e1[2][m]; // expected-error {{variable length array declaration cannot have 'extern' linkage}}
e1[0][0] = 0;
}
// PR2361
@@ -31,16 +31,16 @@
int d[i]; // expected-error {{variable length array declaration not allowed at file scope}}
int (*e)[i]; // expected-error {{variably modified type declaration not allowed at file scope}}
void f3()
{
- static int a[i]; // expected-error {{variable length array declaration can not have 'static' storage duration}}
- extern int b[i]; // expected-error {{variable length array declaration can not have 'extern' linkage}}
+ static int a[i]; // expected-error {{variable length array declaration cannot have 'static' storage duration}}
+ extern int b[i]; // expected-error {{variable length array declaration cannot have 'extern' linkage}}
- extern int (*c1)[i]; // expected-error {{variably modified type declaration can not have 'extern' linkage}}
+ extern int (*c1)[i]; // expected-error {{variably modified type declaration cannot have 'extern' linkage}}
static int (*d)[i];
}
// PR3663
static const unsigned array[((2 * (int)((((4) / 2) + 1.0/3.0) * (4) - 1e-8)) + 1)]; // expected-warning {{variable length array folded to constant array as an extension}}
Index: test/SemaCXX/alias-template.cpp
===================================================================
--- test/SemaCXX/alias-template.cpp (revision 203166)
+++ test/SemaCXX/alias-template.cpp (working copy)
@@ -99,16 +99,16 @@
template<typename T> using X = CtorDtorName;
X<int>(); // expected-error {{expected member name}}
~X<int>(); // expected-error {{destructor cannot be declared using a type alias}}
};
namespace TagName {
- template<typename Z> using S = struct { int n; }; // expected-error {{can not be defined}}
- template<typename Z> using T = class { int n; }; // expected-error {{can not be defined}}
- template<typename Z> using U = enum { a, b, c }; // expected-error {{can not be defined}}
- template<typename Z> using V = struct V { int n; }; // expected-error {{'TagName::V' can not be defined in a type alias template}}
+ template<typename Z> using S = struct { int n; }; // expected-error {{cannot be defined}}
+ template<typename Z> using T = class { int n; }; // expected-error {{cannot be defined}}
+ template<typename Z> using U = enum { a, b, c }; // expected-error {{cannot be defined}}
+ template<typename Z> using V = struct V { int n; }; // expected-error {{'TagName::V' cannot be defined in a type alias template}}
}
namespace StdExample {
template<typename T, typename U> struct pair;
template<typename T> using handler_t = void (*)(T);
Index: test/SemaCXX/conversion-function.cpp
===================================================================
--- test/SemaCXX/conversion-function.cpp (revision 203166)
+++ test/SemaCXX/conversion-function.cpp (working copy)
@@ -405,14 +405,14 @@
A f(const C c) { return c; }
}
namespace PR18234 {
struct A {
- operator enum E { e } (); // expected-error {{'PR18234::A::E' can not be defined in a type specifier}}
- operator struct S { int n; } (); // expected-error {{'PR18234::A::S' can not be defined in a type specifier}}
+ operator enum E { e } (); // expected-error {{'PR18234::A::E' cannot be defined in a type specifier}}
+ operator struct S { int n; } (); // expected-error {{'PR18234::A::S' cannot be defined in a type specifier}}
} a;
A::S s = a;
A::E e = a; // expected-note {{here}}
bool k1 = e == A::e; // expected-error {{no member named 'e'}}
bool k2 = e.n == 0;
}
Index: test/SemaCXX/type-definition-in-specifier.cpp
===================================================================
--- test/SemaCXX/type-definition-in-specifier.cpp (revision 203166)
+++ test/SemaCXX/type-definition-in-specifier.cpp (working copy)
@@ -10,16 +10,16 @@
struct S0 { int x; };
void f0() {
typedef struct S1 { int x; } S1_typedef;
- (void)((struct S2 { int x; }*)0); // expected-error{{can not be defined}}
+ (void)((struct S2 { int x; }*)0); // expected-error{{cannot be defined}}
struct S3 { int x; } s3;
- (void)static_cast<struct S4 { int x; } *>(0); // expected-error{{can not be defined}}
+ (void)static_cast<struct S4 { int x; } *>(0); // expected-error{{cannot be defined}}
}
struct S5 { int x; } f1() { return S5(); } // expected-error{{result type}}
void f2(struct S6 { int x; } p); // expected-error{{parameter type}}
Index: test/SemaObjCXX/exceptions-fragile.mm
===================================================================
--- test/SemaObjCXX/exceptions-fragile.mm (revision 203166)
+++ test/SemaObjCXX/exceptions-fragile.mm (working copy)
@@ -3,10 +3,10 @@
@interface NSException @end
void opaque();
namespace test0 {
void test() {
try {
- } catch (NSException *e) { // expected-warning {{can not catch an exception thrown with @throw in C++ in the non-unified exception model}}
+ } catch (NSException *e) { // expected-warning {{cannot catch an exception thrown with @throw in C++ in the non-unified exception model}}
}
}
}
More information about the cfe-dev
mailing list