aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/conditional-expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/conditional-expr.cpp')
-rw-r--r--test/SemaCXX/conditional-expr.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp
index a09ff2bd41..d008b8d6ed 100644
--- a/test/SemaCXX/conditional-expr.cpp
+++ b/test/SemaCXX/conditional-expr.cpp
@@ -199,17 +199,24 @@ void test()
}
namespace PR6595 {
+ struct OtherString {
+ OtherString();
+ OtherString(const char*);
+ };
+
struct String {
String(const char *);
+ String(const OtherString&);
operator const char*() const;
};
- void f(bool Cond, String S) {
+ void f(bool Cond, String S, OtherString OS) {
(void)(Cond? S : "");
(void)(Cond? "" : S);
const char a[1] = {'a'};
(void)(Cond? S : a);
(void)(Cond? a : S);
+ (void)(Cond? OS : S);
}
}