]> granicus.if.org Git - clang/commitdiff
Test cleanup: prefer static_assert to handmade alternative.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 10 Feb 2012 10:55:13 +0000 (10:55 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 10 Feb 2012 10:55:13 +0000 (10:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150243 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/constexpr-nqueens.cpp

index fbf2045efbfbd2a43c1d704bcb2842f056bafd47..b158d6e4b6e07a23af3ed8ca446059e7cc50882b 100644 (file)
@@ -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"), "");