summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/conditional-expr.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-04-02 08:55:10 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-04-02 08:55:10 +0000
commit07b2cfcdb817cc0790420f159a313d61e7241cb9 (patch)
treed374cdca417e76f1bf101f139dba2db1d10ee8f7 /test/SemaCXX/conditional-expr.cpp
parent1e255aab650a7fa2047fd953cae65b12215280af (diff)
downloadFreeBSD-src-07b2cfcdb817cc0790420f159a313d61e7241cb9.zip
FreeBSD-src-07b2cfcdb817cc0790420f159a313d61e7241cb9.tar.gz
Update clang to r100181.
Diffstat (limited to 'test/SemaCXX/conditional-expr.cpp')
-rw-r--r--test/SemaCXX/conditional-expr.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp
index accc8db..e2a966bd 100644
--- a/test/SemaCXX/conditional-expr.cpp
+++ b/test/SemaCXX/conditional-expr.cpp
@@ -7,7 +7,8 @@
struct ToBool { explicit operator bool(); };
struct B;
-struct A { A(); A(const B&); }; // expected-note 2 {{candidate constructor}}
+struct A { A(); A(const B&); }; // expected-note 2 {{candidate constructor}} \
+ // expected-note 2 {{candidate is the implicit copy constructor}}
struct B { operator A() const; }; // expected-note 2 {{candidate function}}
struct I { operator int(); };
struct J { operator I(); };
@@ -197,3 +198,18 @@ void test()
// *must* create a separate temporary copy of class objects. This can only
// be properly tested at runtime, though.
}
+
+namespace PR6595 {
+ struct String {
+ String(const char *);
+ operator const char*() const;
+ };
+
+ void f(bool Cond, String S) {
+ (void)(Cond? S : "");
+ (void)(Cond? "" : S);
+ const char a[1] = {'a'};
+ (void)(Cond? S : a);
+ (void)(Cond? a : S);
+ }
+}
OpenPOWER on IntegriCloud