aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/cxx11-noreturn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/cxx11-noreturn.cpp')
-rw-r--r--test/CodeGenCXX/cxx11-noreturn.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/cxx11-noreturn.cpp b/test/CodeGenCXX/cxx11-noreturn.cpp
new file mode 100644
index 000000000000..31c651d75efc
--- /dev/null
+++ b/test/CodeGenCXX/cxx11-noreturn.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -emit-llvm -std=c++11 %s -o - | FileCheck %s
+
+int g();
+
+// CHECK: _Z1fv(){{.*}} [[NR:#[0-9]+]]
+[[noreturn]] int f() {
+ while (g()) {}
+}
+
+// CHECK: attributes [[NR]] = { noreturn nounwind{{.*}} }