From b13291aa59c4c074e70f2d0181f9721e38b494d4 Mon Sep 17 00:00:00 2001 From: Jordan Rose <jordan_rose@apple.com> Date: Thu, 19 Jul 2012 18:10:18 +0000 Subject: [PATCH] Capitalize "Objective-C" and "C++" in user-facing contexts. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160516 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticDriverKinds.td | 2 +- include/clang/Basic/DiagnosticParseKinds.td | 2 +- include/clang/Basic/DiagnosticSemaKinds.td | 24 +++++++++---------- include/clang/Basic/LangOptions.def | 2 +- include/clang/Driver/CC1Options.td | 2 +- test/SemaObjC/arc-no-runtime.m | 2 +- test/SemaObjC/arc.m | 2 +- test/SemaObjC/assign-rvalue-message.m | 2 +- test/SemaObjC/format-strings-objc.m | 12 +++++----- test/SemaObjC/objc-container-subscripting-2.m | 4 ++-- test/SemaObjC/objc-container-subscripting-3.m | 2 +- test/SemaObjC/objc-container-subscripting.m | 8 +++---- test/SemaObjC/objc-dictionary-literal.m | 2 +- .../SemaObjCXX/objc-container-subscripting.mm | 4 ++-- 14 files changed, 35 insertions(+), 35 deletions(-) diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td index 45a3729b8aa..a73240b7039 100644 --- a/include/clang/Basic/DiagnosticDriverKinds.td +++ b/include/clang/Basic/DiagnosticDriverKinds.td @@ -103,7 +103,7 @@ def err_drv_unknown_objc_runtime : Error< "unknown or ill-formed Objective-C runtime '%0'">; def warn_c_kext : Warning< - "ignoring -fapple-kext which is valid for c++ and objective-c++ only">; + "ignoring -fapple-kext which is valid for C++ and Objective-C++ only">; def warn_drv_input_file_unused : Warning< "%0: '%1' input unused when '%2' is present">; def warn_drv_preprocessed_input_file_unused : Warning< diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index ae1a041596a..ae3f3a6a152 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -384,7 +384,7 @@ def warn_semicolon_before_method_body : Warning< "semicolon before method body is ignored">, InGroup<DiagGroup<"semicolon-before-method-body">>, DefaultIgnore; def note_extra_comma_message_arg : Note< - "comma separating objective-c messaging arguments">; + "comma separating Objective-C messaging arguments">; def err_expected_field_designator : Error< "expected a field designator, such as '.field = 4'">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index d42f21fa0c3..2da36b82697 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -1714,7 +1714,7 @@ def warn_pointer_attribute_wrong_type : Warning< "'%0' only applies to pointer types; type here is %1">, InGroup<IgnoredAttributes>; def warn_objc_object_attribute_wrong_type : Warning< - "'%0' only applies to objective-c object or block pointer types; type here is %1">, + "'%0' only applies to Objective-C object or block pointer types; type here is %1">, InGroup<IgnoredAttributes>; def warn_gnu_inline_attribute_requires_inline : Warning< "'gnu_inline' attribute requires function to be marked 'inline'," @@ -3388,7 +3388,7 @@ def note_protected_by___block : Note< def note_protected_by_objc_ownership : Note< "jump bypasses initialization of retaining variable">; def note_enters_block_captures_cxx_obj : Note< - "jump enters lifetime of block which captures a destructible c++ object">; + "jump enters lifetime of block which captures a destructible C++ object">; def note_enters_block_captures_strong : Note< "jump enters lifetime of block which strongly captures a variable">; def note_enters_block_captures_weak : Note< @@ -3417,7 +3417,7 @@ def note_exits_objc_autoreleasepool : Note< def note_exits_objc_ownership : Note< "jump exits scope of retaining variable">; def note_exits_block_captures_cxx_obj : Note< - "jump exits lifetime of block which captures a destructible c++ object">; + "jump exits lifetime of block which captures a destructible C++ object">; def note_exits_block_captures_strong : Note< "jump exits lifetime of block which strongly captures a variable">; def note_exits_block_captures_weak : Note< @@ -3653,7 +3653,7 @@ def err_illegal_decl_array_of_functions : Error< def err_illegal_decl_array_incomplete_type : Error< "array has incomplete element type %0">; def err_illegal_message_expr_incomplete_type : Error< - "objective-c message has incomplete result type %0">; + "Objective-C message has incomplete result type %0">; def err_illegal_decl_array_of_references : Error< "'%0' declared as array of references of type %1">; def err_decl_negative_array_size : Error< @@ -4080,8 +4080,8 @@ def err_objc_subscript_key_type : Error< def err_objc_subscript_dic_object_type : Error< "method object parameter type %0 is not object type">; def err_objc_subscript_object_type : Error< - "cannot assign to this %select{dictionary|array}1 because assigning method's 2nd parameter" - " of type %0 is not an objective-C pointer type">; + "cannot assign to this %select{dictionary|array}1 because assigning method's " + "2nd parameter of type %0 is not an Objective-C pointer type">; def err_objc_subscript_base_type : Error< "%select{dictionary|array}1 subscript base type %0 is not an Objective-C object">; def err_objc_multiple_subscript_type_conversion : Error< @@ -4089,17 +4089,17 @@ def err_objc_multiple_subscript_type_conversion : Error< "multiple type conversion functions">; def err_objc_subscript_type_conversion : Error< "indexing expression is invalid because subscript type %0 is not an integral" - " or objective-C pointer type">; + " or Objective-C pointer type">; def err_objc_subscript_pointer : Error< "indexing expression is invalid because subscript type %0 is not an" - " objective-C pointer">; + " Objective-C pointer">; def err_objc_indexing_method_result_type : Error< "method for accessing %select{dictionary|array}1 element must have Objective-C" " object return type instead of %0">; def err_objc_index_incomplete_class_type : Error< - "objective-C index expression has incomplete class type %0">; + "Objective-C index expression has incomplete class type %0">; def err_illegal_container_subscripting_op : Error< - "illegal operation on objective-c container subscripting">; + "illegal operation on Objective-C container subscripting">; def err_property_not_found_forward_class : Error< "property %0 cannot be found in forward class object %1">; def err_property_not_as_forward_class : Error< @@ -4117,7 +4117,7 @@ def ext_gnu_ptr_func_arith : Extension< "type%select{|s}2 %1%select{| and %3}2 is a GNU extension">, InGroup<PointerArith>; def error_readonly_message_assignment : Error< - "assigning to 'readonly' return result of an objective-c message not allowed">; + "assigning to 'readonly' return result of an Objective-C message not allowed">; def ext_integer_increment_complex : Extension< "ISO C does not support '++'/'--' on complex integer type %0">; def ext_integer_complement_complex : Extension< @@ -4197,7 +4197,7 @@ def warn_objc_pointer_cxx_catch_fragile : Warning< "can not 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">; + "can't catch an Objective-C object by value">; def err_incomplete_type_objc_at_encode : Error< "'@encode' of incomplete type %0">; diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def index 6409e33d8cf..fab17a2fe56 100644 --- a/include/clang/Basic/LangOptions.def +++ b/include/clang/Basic/LangOptions.def @@ -124,7 +124,7 @@ BENIGN_LANGOPT(InlineVisibilityHidden , 1, 0, "hidden default visibility for inl BENIGN_LANGOPT(ParseUnknownAnytype, 1, 0, "__unknown_anytype") BENIGN_LANGOPT(DebuggerSupport , 1, 0, "debugger support") BENIGN_LANGOPT(DebuggerCastResultToId, 1, 0, "for 'po' in the debugger, cast the result to id if it is of unknown type") -BENIGN_LANGOPT(DebuggerObjCLiteral , 1, 0, "debugger objective-C literals and subscripting support") +BENIGN_LANGOPT(DebuggerObjCLiteral , 1, 0, "debugger Objective-C literals and subscripting support") BENIGN_LANGOPT(AddressSanitizer , 1, 0, "AddressSanitizer enabled") BENIGN_LANGOPT(ThreadSanitizer , 1, 0, "ThreadSanitizer enabled") diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 436aed4ae22..8fd3166ebe4 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -431,7 +431,7 @@ def fdebugger_support : Flag<"-fdebugger-support">, def fdebugger_cast_result_to_id : Flag<"-fdebugger-cast-result-to-id">, HelpText<"Enable casting unknown expression results to id">; def fdebugger_objc_literal : Flag<"-fdebugger-objc-literal">, - HelpText<"Enable special debugger support for objective-C subscripting and literals">; + HelpText<"Enable special debugger support for Objective-C subscripting and literals">; def fdeprecated_macro : Flag<"-fdeprecated-macro">, HelpText<"Defines the __DEPRECATED macro">; def fno_deprecated_macro : Flag<"-fno-deprecated-macro">, diff --git a/test/SemaObjC/arc-no-runtime.m b/test/SemaObjC/arc-no-runtime.m index b75064f7765..c5820d4321d 100644 --- a/test/SemaObjC/arc-no-runtime.m +++ b/test/SemaObjC/arc-no-runtime.m @@ -3,7 +3,7 @@ // rdar://problem/9150784 void test(void) { __weak id x; // expected-error {{the current deployment target does not support automated __weak references}} - __weak void *v; // expected-warning {{'__weak' only applies to objective-c object or block pointer types}} + __weak void *v; // expected-warning {{'__weak' only applies to Objective-C object or block pointer types}} } @interface A diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m index cdc02d9821a..bd30715a6b3 100644 --- a/test/SemaObjC/arc.m +++ b/test/SemaObjC/arc.m @@ -641,7 +641,7 @@ void test35(void) { test36_helper(&y); ^{ test36_helper(&y); }(); - __strong int non_objc_type; // expected-warning {{'__strong' only applies to objective-c object or block pointer types}} + __strong int non_objc_type; // expected-warning {{'__strong' only applies to Objective-C object or block pointer types}} } void test36(int first, ...) { diff --git a/test/SemaObjC/assign-rvalue-message.m b/test/SemaObjC/assign-rvalue-message.m index 1105d5e743a..a90cc50cdd3 100644 --- a/test/SemaObjC/assign-rvalue-message.m +++ b/test/SemaObjC/assign-rvalue-message.m @@ -19,6 +19,6 @@ struct Bar { - (void)baz { bar.x = 0; - [self bar].x = 10; // expected-error {{assigning to 'readonly' return result of an objective-c message not allowed}} + [self bar].x = 10; // expected-error {{assigning to 'readonly' return result of an Objective-C message not allowed}} } @end diff --git a/test/SemaObjC/format-strings-objc.m b/test/SemaObjC/format-strings-objc.m index c6f26e53b8e..a53a304bd1f 100644 --- a/test/SemaObjC/format-strings-objc.m +++ b/test/SemaObjC/format-strings-objc.m @@ -218,12 +218,12 @@ void test_nonBuiltinCFStrings() { @end void testInvalidFormatArgument(NSDictionary *dict) { - NSLog(@"no specifiers", dict[CFSTR("abc")]); // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or objective-C pointer type}} - NSLog(@"%@", dict[CFSTR("abc")]); // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or objective-C pointer type}} - NSLog(@"%@ %@", dict[CFSTR("abc")]); // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or objective-C pointer type}} + NSLog(@"no specifiers", dict[CFSTR("abc")]); // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or Objective-C pointer type}} + NSLog(@"%@", dict[CFSTR("abc")]); // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or Objective-C pointer type}} + NSLog(@"%@ %@", dict[CFSTR("abc")]); // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or Objective-C pointer type}} - [Foo fooWithFormat:@"no specifiers", dict[CFSTR("abc")]]; // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or objective-C pointer type}} - [Foo fooWithFormat:@"%@", dict[CFSTR("abc")]]; // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or objective-C pointer type}} - [Foo fooWithFormat:@"%@ %@", dict[CFSTR("abc")]]; // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or objective-C pointer type}} expected-warning{{more '%' conversions than data arguments}} + [Foo fooWithFormat:@"no specifiers", dict[CFSTR("abc")]]; // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or Objective-C pointer type}} + [Foo fooWithFormat:@"%@", dict[CFSTR("abc")]]; // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or Objective-C pointer type}} + [Foo fooWithFormat:@"%@ %@", dict[CFSTR("abc")]]; // expected-error{{indexing expression is invalid because subscript type 'CFStringRef' (aka 'const struct __CFString *') is not an integral or Objective-C pointer type}} expected-warning{{more '%' conversions than data arguments}} } diff --git a/test/SemaObjC/objc-container-subscripting-2.m b/test/SemaObjC/objc-container-subscripting-2.m index 3c0081b72a7..62320fcebb7 100644 --- a/test/SemaObjC/objc-container-subscripting-2.m +++ b/test/SemaObjC/objc-container-subscripting-2.m @@ -16,8 +16,8 @@ typedef unsigned int size_t; id func() { NSMutableArray *array; float f; - array[f] = array; // expected-error {{indexing expression is invalid because subscript type 'float' is not an integral or objective-C pointer type}} - return array[3.14]; // expected-error {{indexing expression is invalid because subscript type 'double' is not an integral or objective-C pointer type}} + array[f] = array; // expected-error {{indexing expression is invalid because subscript type 'float' is not an integral or Objective-C pointer type}} + return array[3.14]; // expected-error {{indexing expression is invalid because subscript type 'double' is not an integral or Objective-C pointer type}} } void test_unused() { diff --git a/test/SemaObjC/objc-container-subscripting-3.m b/test/SemaObjC/objc-container-subscripting-3.m index 5fd1a10915f..2f716d6f791 100644 --- a/test/SemaObjC/objc-container-subscripting-3.m +++ b/test/SemaObjC/objc-container-subscripting-3.m @@ -14,7 +14,7 @@ int main() { Test *array; int i = array[10]; // expected-error {{method for accessing array element must have Objective-C object return type instead of 'int'}} - array[2] = i; // expected-error {{cannot assign to this array because assigning method's 2nd parameter of type 'int' is not an objective-C pointer type}} + array[2] = i; // expected-error {{cannot assign to this array because assigning method's 2nd parameter of type 'int' is not an Objective-C pointer type}} NSMutableDictionary *dict; id key, val; diff --git a/test/SemaObjC/objc-container-subscripting.m b/test/SemaObjC/objc-container-subscripting.m index 4125bc634a7..3bbd7d404bb 100644 --- a/test/SemaObjC/objc-container-subscripting.m +++ b/test/SemaObjC/objc-container-subscripting.m @@ -14,15 +14,15 @@ int main() { NSMutableArray<P> * array; id oldObject = array[10]; // expected-error {{method index parameter type 'double' is not integral type}} array[3] = 0; // expected-error {{method index parameter type 'void *' is not integral type}} \ - // expected-error {{cannot assign to this array because assigning method's 2nd parameter of type 'id *' is not an objective-C pointer type}} + // expected-error {{cannot assign to this array because assigning method's 2nd parameter of type 'id *' is not an Objective-C pointer type}} I* iarray; iarray[3] = 0; // expected-error {{expected method to write array element not found on object of type 'I *'}} I* p = iarray[4]; // expected-error {{expected method to read array element not found on object of type 'I *'}} - oldObject = array[10]++; // expected-error {{illegal operation on objective-c container subscripting}} - oldObject = array[10]--; // expected-error {{illegal operation on objective-c container subscripting}} - oldObject = --array[10]; // expected-error {{illegal operation on objective-c container subscripting}} + oldObject = array[10]++; // expected-error {{illegal operation on Objective-C container subscripting}} + oldObject = array[10]--; // expected-error {{illegal operation on Objective-C container subscripting}} + oldObject = --array[10]; // expected-error {{illegal operation on Objective-C container subscripting}} } @interface NSMutableDictionary diff --git a/test/SemaObjC/objc-dictionary-literal.m b/test/SemaObjC/objc-dictionary-literal.m index 2acbc39e388..0b6da4a77ba 100644 --- a/test/SemaObjC/objc-dictionary-literal.m +++ b/test/SemaObjC/objc-dictionary-literal.m @@ -27,7 +27,7 @@ int main() { NSDictionary *dict = @{ @"name":@666 }; dict[@"name"] = @666; - dict["name"] = @666; // expected-error {{indexing expression is invalid because subscript type 'char *' is not an objective-C pointer}} + dict["name"] = @666; // expected-error {{indexing expression is invalid because subscript type 'char *' is not an Objective-C pointer}} return 0; } diff --git a/test/SemaObjCXX/objc-container-subscripting.mm b/test/SemaObjCXX/objc-container-subscripting.mm index c835cbe53c6..537e1520df5 100644 --- a/test/SemaObjCXX/objc-container-subscripting.mm +++ b/test/SemaObjCXX/objc-container-subscripting.mm @@ -32,8 +32,8 @@ template void test_dictionary_subscripts(NSMutableDictionary*, id, int); // expe template<typename T, typename U, typename O> void test_array_subscripts(T base, U index, O obj) { - base[index] = obj; // expected-error {{indexing expression is invalid because subscript type 'double' is not an integral or objective-C pointer type}} - obj = base[index]; // expected-error {{indexing expression is invalid because subscript type 'double' is not an integral or objective-C pointer type}} + base[index] = obj; // expected-error {{indexing expression is invalid because subscript type 'double' is not an integral or Objective-C pointer type}} + obj = base[index]; // expected-error {{indexing expression is invalid because subscript type 'double' is not an integral or Objective-C pointer type}} } template void test_array_subscripts(NSMutableArray *, int, id); -- GitLab