1// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors 2// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors 3// RUN: %clang_cc1 -std=c++1y -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors 4 5// expected-no-diagnostics 6 7namespace DR1550 { // dr1550: yes 8 int f(bool b, int n) { 9 return (b ? (throw 0) : n) + (b ? n : (throw 0)); 10 } 11} 12 13namespace DR1560 { // dr1560: 3.5 14 void f(bool b, int n) { 15 (b ? throw 0 : n) = (b ? n : throw 0) = 0; 16 } 17 class X { X(const X&); }; 18 const X &get(); 19 const X &x = true ? get() : throw 0; 20} 21