13ea9e33ea25e0c2b12db56418ba3f994eb662c04Pirama Arumuga Nainar// RUN: %clang_cc1 -std=c++11 -fsanitize=signed-integer-overflow,integer-divide-by-zero,float-divide-by-zero,shift-base,shift-exponent,unreachable,return,vla-bound,alignment,null,vptr,object-size,float-cast-overflow,bool,enum,array-bounds,function -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s 2c56991755e6799f1f733d02f7a98d3159e94c185Nick Lewycky 3c56991755e6799f1f733d02f7a98d3159e94c185Nick Lewyckybool GetOptionalBool(bool *value); 4c56991755e6799f1f733d02f7a98d3159e94c185Nick Lewyckybool GetBool(bool default_value) { 5c56991755e6799f1f733d02f7a98d3159e94c185Nick Lewycky // CHECK-LABEL: @_Z7GetBoolb 6c56991755e6799f1f733d02f7a98d3159e94c185Nick Lewycky // CHECK-NOT: select 7c56991755e6799f1f733d02f7a98d3159e94c185Nick Lewycky bool value; 8c56991755e6799f1f733d02f7a98d3159e94c185Nick Lewycky return GetOptionalBool(&value) ? value : default_value; 9c56991755e6799f1f733d02f7a98d3159e94c185Nick Lewycky} 10