Clang Project

clang_source_code/test/CodeGenCXX/cast-to-ref-bool.cpp
1// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
2
3// CHECK-LABEL: main
4int main(int argc, char **argv) {
5  // CHECK: load i8, i8* %
6  // CHECK-NEXT: trunc i8 %{{.+}} to i1
7  bool b = (bool &)argv[argc][1];
8  return b;
9}
10