minix/external/bsd/llvm/dist/clang/test/PCH/cxx11-exception-spec.cpp
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

18 lines
403 B
C++

// 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
// expected-no-diagnostics
#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