From: Richard Smith Date: Fri, 10 Feb 2012 10:55:13 +0000 (+0000) Subject: Test cleanup: prefer static_assert to handmade alternative. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dcd285114fe2453f47e55e4b85fb2d54b6ee87c3;p=clang 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 --- 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"), "");