diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2016-12-20 02:43:58 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2016-12-20 02:43:58 +0000 |
commit | cbe1eba0c6df4a6dd5a19fd4f6ba5e05cce7f101 (patch) | |
tree | 3bd3074ff8b96c27d560f369d531d2990e828bbf /clang/test | |
parent | dc6e0169ae208471f204543a0d4643b34e712a96 (diff) | |
download | bcm5719-llvm-cbe1eba0c6df4a6dd5a19fd4f6ba5e05cce7f101.tar.gz bcm5719-llvm-cbe1eba0c6df4a6dd5a19fd4f6ba5e05cce7f101.zip |
Fix the spelling of 'bitfield' in diagnostics to be consistently 'bit-field'.
The latter agrees with most existing diagnostics and the C and C++ standards.
Differential Revision: https://reviews.llvm.org/D26530
llvm-svn: 290159
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Parser/objc-property-syntax.m | 2 | ||||
-rw-r--r-- | clang/test/Sema/constant-conversion.c | 24 | ||||
-rw-r--r-- | clang/test/SemaCXX/conversion.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/member-init.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaOpenCL/unsupported.cl | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/clang/test/Parser/objc-property-syntax.m b/clang/test/Parser/objc-property-syntax.m index 38d12d5905c..8e56a090018 100644 --- a/clang/test/Parser/objc-property-syntax.m +++ b/clang/test/Parser/objc-property-syntax.m @@ -4,7 +4,7 @@ int prop; }; @property unsigned char bufferedUTF8Bytes[4]; // expected-error {{property cannot have array or function type}} -@property unsigned char bufferedUTFBytes:1; // expected-error {{property name cannot be a bitfield}} +@property unsigned char bufferedUTFBytes:1; // expected-error {{property name cannot be a bit-field}} @property(nonatomic, retain, setter=ab_setDefaultToolbarItems) MyClass *ab_defaultToolbarItems; // expected-error {{method name referenced in property setter attribute must end with ':'}} @property int prop; diff --git a/clang/test/Sema/constant-conversion.c b/clang/test/Sema/constant-conversion.c index 224f2ee4b53..bf8221089d8 100644 --- a/clang/test/Sema/constant-conversion.c +++ b/clang/test/Sema/constant-conversion.c @@ -11,7 +11,7 @@ void test_6792488(void) { void test_7809123(void) { struct { int i5 : 5; } a; - a.i5 = 36; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 36 to 4}} + a.i5 = 36; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 36 to 4}} } void test() { @@ -31,11 +31,11 @@ void test3() { int bar : 2; }; - struct A a = { 0, 10 }; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to -2}} - struct A b[] = { 0, 10, 0, 0 }; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to -2}} - struct A c[] = {{10, 0}}; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to 2}} - struct A d = (struct A) { 10, 0 }; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to 2}} - struct A e = { .foo = 10 }; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to 2}} + struct A a = { 0, 10 }; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to -2}} + struct A b[] = { 0, 10, 0, 0 }; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to -2}} + struct A c[] = {{10, 0}}; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to 2}} + struct A d = (struct A) { 10, 0 }; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to 2}} + struct A e = { .foo = 10 }; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to 2}} } void test4() { @@ -43,7 +43,7 @@ void test4() { char c : 2; } a; - a.c = 0x101; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 257 to 1}} + a.c = 0x101; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 257 to 1}} } void test5() { @@ -52,7 +52,7 @@ void test5() { } a; // Don't warn about this implicit conversion to bool, or at least - // don't warn about it just because it's a bitfield. + // don't warn about it just because it's a bit-field. a.b = 100; } @@ -71,7 +71,7 @@ void test7() { f.twoBits1 = ~0; // no-warning f.twoBits1 = ~1; // no-warning - f.twoBits2 = ~2; // expected-warning {{implicit truncation from 'int' to bitfield changes value from -3 to 1}} + f.twoBits2 = ~2; // expected-warning {{implicit truncation from 'int' to bit-field changes value from -3 to 1}} f.twoBits1 &= ~1; // no-warning f.twoBits2 &= ~2; // no-warning } @@ -79,7 +79,7 @@ void test7() { void test8() { enum E { A, B, C }; struct { enum E x : 1; } f; - f.x = C; // expected-warning {{implicit truncation from 'int' to bitfield changes value from 2 to 0}} + f.x = C; // expected-warning {{implicit truncation from 'int' to bit-field changes value from 2 to 0}} } void test9() { @@ -128,6 +128,6 @@ void test10() { s.a = ~0U; s.a = ~(1<<A); - s.a = -9; // expected-warning{{implicit truncation from 'int' to bitfield changes value from -9 to 7}} - s.a = 16; // expected-warning{{implicit truncation from 'int' to bitfield changes value from 16 to 0}} + s.a = -9; // expected-warning{{implicit truncation from 'int' to bit-field changes value from -9 to 7}} + s.a = 16; // expected-warning{{implicit truncation from 'int' to bit-field changes value from 16 to 0}} } diff --git a/clang/test/SemaCXX/conversion.cpp b/clang/test/SemaCXX/conversion.cpp index 7b86cecdbce..dcd64fa2ec8 100644 --- a/clang/test/SemaCXX/conversion.cpp +++ b/clang/test/SemaCXX/conversion.cpp @@ -50,7 +50,7 @@ namespace test1 { namespace test2 { struct A { unsigned int x : 2; - A() : x(10) {} // expected-warning {{implicit truncation from 'int' to bitfield changes value from 10 to 2}} + A() : x(10) {} // expected-warning {{implicit truncation from 'int' to bit-field changes value from 10 to 2}} }; } diff --git a/clang/test/SemaCXX/member-init.cpp b/clang/test/SemaCXX/member-init.cpp index 20e4cec5bfd..105c2e49822 100644 --- a/clang/test/SemaCXX/member-init.cpp +++ b/clang/test/SemaCXX/member-init.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -verify -std=c++11 -Wall %s struct Bitfield { - int n : 3 = 7; // expected-error {{bitfield member cannot have an in-class initializer}} + int n : 3 = 7; // expected-error {{bit-field member cannot have an in-class initializer}} }; int a; diff --git a/clang/test/SemaOpenCL/unsupported.cl b/clang/test/SemaOpenCL/unsupported.cl index a39a61b9542..a5fc570e757 100644 --- a/clang/test/SemaOpenCL/unsupported.cl +++ b/clang/test/SemaOpenCL/unsupported.cl @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -verify %s struct { - int a : 1; // expected-error {{bitfields are not supported in OpenCL}} + int a : 1; // expected-error {{bit-fields are not supported in OpenCL}} }; void no_vla(int n) { |