summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/conditional-expr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-22 07:24:36 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-22 07:24:36 +0000
commit96596c98fbb584d8c9eec99d0a1c0734da756787 (patch)
tree4cc2aa0da213cc084b87ef78df8bc359440a0d8e /clang/test/SemaCXX/conditional-expr.cpp
parent778f92ab024794d6751a30dfbe59852fd0d0522c (diff)
downloadbcm5719-llvm-96596c98fbb584d8c9eec99d0a1c0734da756787.tar.gz
bcm5719-llvm-96596c98fbb584d8c9eec99d0a1c0734da756787.zip
Switch initialization of parameters in a call over to
InitializationSequence (when a FunctionDecl is present). This required a few small fixes to initialization sequences: - Make sure to use the adjusted parameter type for initialization of function parameters. - Implement transparent union calling semantics in C llvm-svn: 91902
Diffstat (limited to 'clang/test/SemaCXX/conditional-expr.cpp')
-rw-r--r--clang/test/SemaCXX/conditional-expr.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/test/SemaCXX/conditional-expr.cpp b/clang/test/SemaCXX/conditional-expr.cpp
index 0f71b494661..0617cd5702c 100644
--- a/clang/test/SemaCXX/conditional-expr.cpp
+++ b/clang/test/SemaCXX/conditional-expr.cpp
@@ -25,7 +25,7 @@ struct Derived : Base {
void fn2();
};
struct Convertible { operator Base&(); };
-struct Priv : private Base {}; // expected-note 2 {{'private' inheritance specifier here}}
+struct Priv : private Base {}; // expected-note 4 {{'private' inheritance specifier here}}
struct Mid : Base {};
struct Fin : Mid, Derived {};
typedef void (Derived::*DFnPtr)();
@@ -109,13 +109,12 @@ void test()
(void)(i1 ? Base() : constder()); // expected-error {{incompatible operand types ('struct Base' and 'struct Derived const')}}
(void)(i1 ? constder() : Base()); // expected-error {{incompatible operand types ('struct Derived const' and 'struct Base')}}
- // FIXME: these are invalid hierarchy conversions
Priv priv;
Fin fin;
- (void)(i1 ? Base() : Priv()); // xpected-error private base
- (void)(i1 ? Priv() : Base()); // xpected-error private base
- (void)(i1 ? Base() : Fin()); // xpected-error ambiguous base
- (void)(i1 ? Fin() : Base()); // xpected-error ambiguous base
+ (void)(i1 ? Base() : Priv()); // expected-error{{conversion from 'struct Priv' to inaccessible base class 'struct Base'}}
+ (void)(i1 ? Priv() : Base()); // expected-error{{error: conversion from 'struct Priv' to inaccessible base class 'struct Base'}}
+ (void)(i1 ? Base() : Fin()); // expected-error{{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}}
+ (void)(i1 ? Fin() : Base()); // expected-error{{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}}
(void)(i1 ? base : priv); // expected-error {{conversion from 'struct Priv' to inaccessible base class 'struct Base'}}
(void)(i1 ? priv : base); // expected-error {{conversion from 'struct Priv' to inaccessible base class 'struct Base'}}
(void)(i1 ? base : fin); // expected-error {{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}}
OpenPOWER on IntegriCloud