diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-04 18:04:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-04 18:04:52 +0000 |
commit | 5cf216b7fa64b933b60743b0b26053e8e7aa87be (patch) | |
tree | ef24405eb359cfb47bd12645c2e9d25574525a51 /test/Sema/array-init.c | |
parent | 6d9b9e4f61e790d71e134cb84ec21230fb41341f (diff) |
Merge all the 'assignment' diagnostic code into one routine, decloning
it from several places. This merges the diagnostics, making them more
uniform and fewer in number. This also simplifies and cleans up the code.
Some highlights:
1. This removes a bunch of very-similar diagnostics.
2. This renames AssignmentCheckResult -> AssignConvertType
3. This merges PointerFromInt + IntFromPointer which were always treated the same.
4. This updates a bunch of test cases that have minor changes to the produced diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45589 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/array-init.c')
-rw-r--r-- | test/Sema/array-init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c index bf5ea06bab..1875fab389 100644 --- a/test/Sema/array-init.c +++ b/test/Sema/array-init.c @@ -9,7 +9,7 @@ int ary2[] = { x, y, z }; // expected-error{{initializer element is not constant extern int fileScopeExtern[3] = { 1, 3, 5 }; // expected-warning{{'extern' variable has an initializer}} -static int ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible types assigning 'char *' to 'int'}} +static int ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer/int conversion initializing 'char *', expected 'int'}} void func() { int x = 1; @@ -44,11 +44,11 @@ void func() { int a,b,c; } z = { 1 }; - struct threeElements *p = 7; // expected-warning{{incompatible types assigning 'int' to 'struct threeElements *'}} + struct threeElements *p = 7; // expected-warning{{incompatible pointer/int conversion initializing 'int', expected 'struct threeElements *'}} extern int blockScopeExtern[3] = { 1, 3, 5 }; // expected-error{{'extern' variable cannot have an initializer}} - static int x2[3] = { 1.0, "abc" , 5.8 }; // expected-warning{{incompatible types assigning 'char *' to 'int'}} + static int x2[3] = { 1.0, "abc" , 5.8 }; // expected-warning{{incompatible pointer/int conversion initializing 'char *', expected 'int'}} } void test() { |