summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/expression-traits.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/expression-traits.cpp')
-rw-r--r--test/SemaCXX/expression-traits.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/SemaCXX/expression-traits.cpp b/test/SemaCXX/expression-traits.cpp
index 3a00687..51bb90e 100644
--- a/test/SemaCXX/expression-traits.cpp
+++ b/test/SemaCXX/expression-traits.cpp
@@ -520,20 +520,19 @@ void expr_cond(bool cond)
// 5.16 Conditional operator [expr.cond]
//
// 2 If either the second or the third operand has type (possibly
- // cv-qualified) void, then the lvalue-to-rvalue (4.1),
- // array-to-pointer (4.2), and function-to-pointer (4.3) standard
- // conversions are performed on the second and third operands, and one
- // of the following shall hold:
+ // cv-qualified) void, one of the following shall hold:
//
// - The second or the third operand (but not both) is a
- // throw-expression (15.1); the result is of the type of the other and
- // is an rvalue.
+ // (possibly parenthesized) throw-expression (15.1); the result
+ // is of the type and value category of the other.
Class classLvalue;
ASSERT_RVALUE(cond ? throw 1 : (void)0);
ASSERT_RVALUE(cond ? (void)0 : throw 1);
- ASSERT_RVALUE(cond ? throw 1 : classLvalue);
- ASSERT_RVALUE(cond ? classLvalue : throw 1);
+ ASSERT_RVALUE(cond ? throw 1 : 0);
+ ASSERT_RVALUE(cond ? 0 : throw 1);
+ ASSERT_LVALUE(cond ? throw 1 : classLvalue);
+ ASSERT_LVALUE(cond ? classLvalue : throw 1);
// - Both the second and the third operands have type void; the result
// is of type void and is an rvalue. [Note: this includes the case
OpenPOWER on IntegriCloud