summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/conditional-expr.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-04-19 19:26:31 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-04-19 19:26:31 +0000
commit3b7ef5e3743810896a832fa798a687ea682e4e49 (patch)
tree8f8520ff12b7aed2fd66ebc977a6b2e9d9f5252c /clang/test/SemaCXX/conditional-expr.cpp
parent1377dc4c79f50da06fda7ae692349e83b1a19b0f (diff)
downloadbcm5719-llvm-3b7ef5e3743810896a832fa798a687ea682e4e49.tar.gz
bcm5719-llvm-3b7ef5e3743810896a832fa798a687ea682e4e49.zip
Another piece of the conditional operator puzzle. We'll want to use FindCompositePointerType in some other places, too.
llvm-svn: 69534
Diffstat (limited to 'clang/test/SemaCXX/conditional-expr.cpp')
-rw-r--r--clang/test/SemaCXX/conditional-expr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/SemaCXX/conditional-expr.cpp b/clang/test/SemaCXX/conditional-expr.cpp
index 3a4da2afddd..aa71f60dc16 100644
--- a/clang/test/SemaCXX/conditional-expr.cpp
+++ b/clang/test/SemaCXX/conditional-expr.cpp
@@ -146,13 +146,13 @@ void test()
i1 = i1 ? EVal : i1;
d1 = i1 ? 'c' : 4.0;
d1 = i1 ? 4.0 : 'c';
- pfm = i1 ? &Derived::fn2 : 0;
- pfm = i1 ? 0 : &Derived::fn2;
- // FIXME: pointer conversions don't work yet.
- //Base *pb = i1 ? (Base*)0 : (Derived*)0;
- //Base *pb = i1 ? (Derived*)0 : (Base*)0;
+ Base *pb = i1 ? (Base*)0 : (Derived*)0;
+ pb = i1 ? (Derived*)0 : (Base*)0;
+ // FIXME: member pointer conversions don't work yet.
//pfm = i1 ? &Base::fn1 : &Derived::fn2;
//pfm = i1 ? &Derived::fn2 : &Base::fn1;
+ //pfm = i1 ? &Derived::fn2 : 0;
+ //pfm = i1 ? 0 : &Derived::fn2;
// Conversion of primitives does not result in an lvalue.
&(i1 ? i1 : d1); // expected-error {{address expression must be an lvalue or a function designator}}
OpenPOWER on IntegriCloud