aboutsummaryrefslogtreecommitdiffstats
path: root/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-13 19:25:57 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-13 19:25:57 +0000
commit289ae9e3ac13cefd468cfb852e8b9f52e984de08 (patch)
treebdee1fefb7c19e3c949b2eadeecc371c8fbce48b /test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp
parent9d043122e0fc90510de06d43da8eda827464c1da (diff)
downloadsrc-vendor/libc++/libc++-trunk-r307894.tar.gz
src-vendor/libc++/libc++-trunk-r307894.zip
Vendor import of libc++ trunk r307894:vendor/libc++/libc++-trunk-r307894
Diffstat (limited to 'test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp')
-rw-r--r--test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp b/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp
new file mode 100644
index 000000000000..37aaa2acf1d9
--- /dev/null
+++ b/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// test that cmath builds with -fdelayed-template-parsing
+
+// REQUIRES: fdelayed-template-parsing
+
+// RUN: %build -fdelayed-template-parsing
+// RUN: %run
+
+#include <cmath>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main() {
+ assert(std::isfinite(1.0));
+ assert(!std::isinf(1.0));
+ assert(!std::isnan(1.0));
+}
+
+using namespace std;