diff options
Diffstat (limited to 'clang/test/CodeGenCXX/static-init-2.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/static-init-2.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/static-init-2.cpp b/clang/test/CodeGenCXX/static-init-2.cpp new file mode 100644 index 0000000..768e6de --- /dev/null +++ b/clang/test/CodeGenCXX/static-init-2.cpp @@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -emit-llvm-only -verify %s + +// Make sure we don't crash generating y; its value is constant, but the +// initializer has side effects, so EmitConstantExpr should fail. +int x(); +int y = x() & 0; |