diff options
Diffstat (limited to 'clang/test/SemaCXX/conditional-expr.cpp')
-rw-r--r-- | clang/test/SemaCXX/conditional-expr.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/conditional-expr.cpp b/clang/test/SemaCXX/conditional-expr.cpp index a812a5920d6..f1fe8ba79bb 100644 --- a/clang/test/SemaCXX/conditional-expr.cpp +++ b/clang/test/SemaCXX/conditional-expr.cpp @@ -238,3 +238,20 @@ namespace PR6757 { (void)(true ? Bar() : Foo3()); // expected-error{{no viable constructor copying temporary}} } } + +// Reduced from selfhost. +namespace test1 { + struct A { + enum Foo { + fa, fb, fc, fd, fe, ff + }; + + Foo x(); + }; + + void foo(int); + + void test(A *a) { + foo(a ? a->x() : 0); + } +} |