brintos

brintos / llvm-project-archived public Read only

0
0
Text · 321 B · 96aa8b0 Raw
21 lines · cpp
1// RUN: %clang_cc1 -emit-llvm-only %s2void f(bool flag) {3  int a = 1;4  int b = 2;5  6  (flag ? a : b) = 3;7}8 9// PR1075610namespace test0 {11  struct A {12    A(const A &);13    A &operator=(const A &);14    A sub() const;15    void foo() const;16  };17  void foo(bool cond, const A &a) {18    (cond ? a : a.sub()).foo();19  }20}21