diff options
Diffstat (limited to 'test/CodeGenCXX/catch-undef-behavior2.cpp')
-rw-r--r-- | test/CodeGenCXX/catch-undef-behavior2.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenCXX/catch-undef-behavior2.cpp b/test/CodeGenCXX/catch-undef-behavior2.cpp new file mode 100644 index 0000000..b8b31ca --- /dev/null +++ b/test/CodeGenCXX/catch-undef-behavior2.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -std=c++11 -fsanitize=signed-integer-overflow,integer-divide-by-zero,float-divide-by-zero,shift,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 + +bool GetOptionalBool(bool *value); +bool GetBool(bool default_value) { + // CHECK-LABEL: @_Z7GetBoolb + // CHECK-NOT: select + bool value; + return GetOptionalBool(&value) ? value : default_value; +} |