diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-06-11 04:42:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-06-11 04:42:12 +0000 |
commit | 2720dc656bca9f9a4b1c115e85481af5c07536e3 (patch) | |
tree | 225097c5ead1aecc58b6a22a7ef857961a29fcc0 /clang/test | |
parent | 79044dbebfa6d508e4a15ba9de52e24a014db0af (diff) | |
download | bcm5719-llvm-2720dc656bca9f9a4b1c115e85481af5c07536e3.tar.gz bcm5719-llvm-2720dc656bca9f9a4b1c115e85481af5c07536e3.zip |
Fix order of operands for the warning about incompatible Objective-C
pointer assignment in C++. This was a longstanding problem spotted by
Jordy Rose.
llvm-svn: 132873
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/SemaObjCXX/overload.mm | 4 | ||||
-rw-r--r-- | clang/test/SemaObjCXX/related-result-type-inference.mm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaObjCXX/overload.mm b/clang/test/SemaObjCXX/overload.mm index 960a7b228ff..ea5f0e59328 100644 --- a/clang/test/SemaObjCXX/overload.mm +++ b/clang/test/SemaObjCXX/overload.mm @@ -52,12 +52,12 @@ void test0(A* a, B* b, id val) { void test1(A* a) { B* b = a; // expected-warning{{incompatible pointer types initializing 'B *' with an expression of type 'A *'}} - B *c; c = a; // expected-warning{{incompatible pointer types assigning to 'A *' from 'B *'}} + B *c; c = a; // expected-warning{{incompatible pointer types assigning to 'B *' from 'A *'}} } void test2(A** ap) { B** bp = ap; // expected-warning{{incompatible pointer types initializing 'B **' with an expression of type 'A **'}} - bp = ap; // expected-warning{{incompatible pointer types assigning to 'A **' from 'B **'}} + bp = ap; // expected-warning{{incompatible pointer types assigning to 'B **' from 'A **'}} } // FIXME: we should either allow overloading here or give a better diagnostic diff --git a/clang/test/SemaObjCXX/related-result-type-inference.mm b/clang/test/SemaObjCXX/related-result-type-inference.mm index 58fb961e23d..accec793ad3 100644 --- a/clang/test/SemaObjCXX/related-result-type-inference.mm +++ b/clang/test/SemaObjCXX/related-result-type-inference.mm @@ -66,5 +66,5 @@ void test_inference() { NSArray *arr = [[NSMutableArray alloc] init]; NSMutableArray *marr = [arr retain]; // expected-warning{{incompatible pointer types initializing 'NSMutableArray *' with an expression of type 'NSArray *'}} - marr = [arr retain]; // expected-warning{{incompatible pointer types assigning to 'NSArray *' from 'NSMutableArray *'}} + marr = [arr retain]; // expected-warning{{incompatible pointer types assigning to 'NSMutableArray *' from 'NSArray *'}} } |