aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-02-10 10:55:13 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-02-10 10:55:13 +0000
commitdcd285114fe2453f47e55e4b85fb2d54b6ee87c3 (patch)
treeb6c5e30baca820297a3d5d0cc148bf30e3ed801c
parent1067d05041db25301cd923712870bcf97db6d8bc (diff)
Test cleanup: prefer static_assert to handmade alternative.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150243 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/SemaCXX/constexpr-nqueens.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/SemaCXX/constexpr-nqueens.cpp b/test/SemaCXX/constexpr-nqueens.cpp
index fbf2045efb..b158d6e4b6 100644
--- a/test/SemaCXX/constexpr-nqueens.cpp
+++ b/test/SemaCXX/constexpr-nqueens.cpp
@@ -62,7 +62,7 @@ constexpr bool Board::check(const char *p, int Row, int Col) {
*p == 0 ? true :
false;
}
-constexpr bool check = q8.check(
+static_assert(q8.check(
"o-------\n"
"------o-\n"
"----o---\n"
@@ -70,7 +70,4 @@ constexpr bool check = q8.check(
"-o------\n"
"---o----\n"
"-----o--\n"
- "--o-----\n");
-
-typedef int check_it[1];
-typedef int check_it[check];
+ "--o-----\n"), "");