about summary refs log tree commit diff homepage
path: root/test/CXX/symex/libc++/atexit.cpp
diff options
context:
space:
mode:
authorLukas Wölfer <lukas.woelfer@rwth-aachen.de>2018-08-04 23:14:50 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2019-03-17 15:43:21 +0000
commit7ad366f363d23b0aea788fca69349e50180f5f78 (patch)
treeb24cee8cae488fc841d2e1ebfcaba069779b1f87 /test/CXX/symex/libc++/atexit.cpp
parent3b6f5e52d0cec5e8018c590c9feccb39bb03206c (diff)
downloadklee-7ad366f363d23b0aea788fca69349e50180f5f78.tar.gz
Added libcxx flag
Diffstat (limited to 'test/CXX/symex/libc++/atexit.cpp')
-rw-r--r--test/CXX/symex/libc++/atexit.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CXX/symex/libc++/atexit.cpp b/test/CXX/symex/libc++/atexit.cpp
new file mode 100644
index 00000000..3d9e6834
--- /dev/null
+++ b/test/CXX/symex/libc++/atexit.cpp
@@ -0,0 +1,15 @@
+// RUN: sh %S/compile_with_libcxx.sh "%llvmgxx" "%s" "%S" "%t" "%klee" "%libcxx_include" | FileCheck %s
+//
+// CHECK: Returning from main
+// CHECK: atexit_1
+// CHECK: atexit_2
+
+#include <iostream>
+#include <cstdlib>
+
+int main(int argc, char** args){
+  auto atexithandler2 = std::atexit([](){std::cout << "atexit_2" << std::endl;});
+  auto atexithandler1 = std::atexit([](){std::cout << "atexit_1" << std::endl;});
+  std::cout << "Returning from main" << std::endl;
+  return 0;
+}