Author: dgregor
Date: Wed Nov 26 00:43:45 2008
New Revision: 60096
URL: http://llvm.org/viewvc/llvm-project?rev=60096&view=rev
Log:
Fix a minor typo in the handling of the conditional operator for Objective-C
interface pointers
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/test/SemaObjC/conditional-expr-3.m
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=60096&r1=60095&r2=60096&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed Nov 26 00:43:45 2008
@@ -1644,7 +1644,7 @@
Context.canAssignObjCInterfaces(LHSIface, RHSIface)) {
compositeType = lexT;
} else if (LHSIface && RHSIface &&
- Context.canAssignObjCInterfaces(LHSIface, RHSIface)) {
+ Context.canAssignObjCInterfaces(RHSIface, LHSIface)) {
compositeType = rexT;
} else if (Context.isObjCIdType(lhptee) ||
Context.isObjCIdType(rhptee)) {
Modified: cfe/trunk/test/SemaObjC/conditional-expr-3.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/conditional-expr-3.m?rev=60096&r1=60095&r2=60096&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/conditional-expr-3.m (original)
+++ cfe/trunk/test/SemaObjC/conditional-expr-3.m Wed Nov 26 00:43:45 2008
@@ -61,3 +61,7 @@
void f10(int cond, id<P0,P1> x0, id<P0,P2> x1) {
barP2(cond ? x0 : x1);
}
+
+int f11(int cond, A* a, B* b) {
+ return (cond? b : a)->x; // expected-error{{'A' does not have a member named
'x'}}
+}
\ No newline at end of file
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits