xref: /llvm-project/clang/test/CodeGenCXX/bool-bitfield.cpp (revision fd739804e0591468762eb87488a497a3f7d4afb0)
1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s \
2 // RUN:   | FileCheck %s
3 
4 // PR14638; make sure this doesn't crash.
5 struct A {
6     bool m_sorted : 1;
7 };
func1(bool b,A & a1)8 void func1(bool b, A& a1)
9 {
10     if ((a1.m_sorted = b)) {}
11 }
12 // CHECK-LABEL: define{{.*}} void @_Z5func1bR1A
13 // CHECK: br i1
14 // CHECK: ret void
15