summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH/cxx11-exception-spec.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-21 17:47:47 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-21 17:47:47 +0000
commit8b987a99767fa8fc6e848a8ae6fb8b19ed2c3d29 (patch)
tree857d12e6b891927d71aa4de04ac73b1ad1b0dbd0 /clang/test/PCH/cxx11-exception-spec.cpp
parent0ab75fd27f4d02e9a8326148456b737974d00ad0 (diff)
downloadbcm5719-llvm-8b987a99767fa8fc6e848a8ae6fb8b19ed2c3d29.tar.gz
bcm5719-llvm-8b987a99767fa8fc6e848a8ae6fb8b19ed2c3d29.zip
Fix serialization of uninstantiated exception specifications. Patch by Li Kan,
test by me. llvm-svn: 155289
Diffstat (limited to 'clang/test/PCH/cxx11-exception-spec.cpp')
-rw-r--r--clang/test/PCH/cxx11-exception-spec.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/PCH/cxx11-exception-spec.cpp b/clang/test/PCH/cxx11-exception-spec.cpp
new file mode 100644
index 00000000000..3fca4e48acf
--- /dev/null
+++ b/clang/test/PCH/cxx11-exception-spec.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t
+// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t -verify %s
+
+#ifndef HEADER_INCLUDED
+
+#define HEADER_INCLUDED
+
+template<bool b> int f() noexcept(b) {}
+decltype(f<false>()) a;
+decltype(f<true>()) b;
+
+#else
+
+static_assert(!noexcept(f<false>()), "");
+static_assert(noexcept(f<true>()), "");
+
+#endif
OpenPOWER on IntegriCloud