2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm-only %s
|
2009-09-16 00:36:17 +08:00
|
|
|
void f(bool flag) {
|
|
|
|
int a = 1;
|
|
|
|
int b = 2;
|
|
|
|
|
|
|
|
(flag ? a : b) = 3;
|
|
|
|
}
|
2011-08-26 15:31:35 +08:00
|
|
|
|
|
|
|
// PR10756
|
|
|
|
namespace test0 {
|
|
|
|
struct A {
|
|
|
|
A(const A &);
|
|
|
|
A &operator=(const A &);
|
|
|
|
A sub() const;
|
|
|
|
void foo() const;
|
|
|
|
};
|
|
|
|
void foo(bool cond, const A &a) {
|
|
|
|
(cond ? a : a.sub()).foo();
|
|
|
|
}
|
|
|
|
}
|