diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-04-19 19:26:31 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-04-19 19:26:31 +0000 |
commit | d1bd7fc4cd88f8790c56620d22560e19717f468a (patch) | |
tree | 5531b232e9cc74511490245ac74e9fb13da5eb89 /test/SemaCXX/conditional-expr.cpp | |
parent | b5e9cb4631877f60824447e1aff4fd2fa17f6d2c (diff) |
Another piece of the conditional operator puzzle. We'll want to use FindCompositePointerType in some other places, too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/conditional-expr.cpp')
-rw-r--r-- | test/SemaCXX/conditional-expr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp index 3a4da2afdd..aa71f60dc1 100644 --- a/test/SemaCXX/conditional-expr.cpp +++ b/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}} |