r312268 - Disable clang-format's MemoizationTest as it becomes prohibitive with EXPENSIVE_CHECKS

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 31 11:49:34 PDT 2017

Author: dblaikie
Date: Thu Aug 31 11:49:34 2017
New Revision: 312268

URL: http://llvm.org/viewvc/llvm-project?rev=312268&view=rev
Disable clang-format's MemoizationTest as it becomes prohibitive with EXPENSIVE_CHECKS

EXPENSIVE_CHECKS enables libstdc++'s library consistency checks, which
includes checking the container passed to std::priority_queue for its
well-formedness. This makes the clang-format memoization too expensive,
so disable it.

(it's a necessary feature of libstdc++'s consistency checks that it
ruins the required scalability of C++ standard library features - so
these workarounds are to be expected if a test ever tries to test
scalability in some way, like this test does)


Modified: cfe/trunk/unittests/Format/FormatTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=312268&r1=312267&r2=312268&view=diff
--- cfe/trunk/unittests/Format/FormatTest.cpp (original)
+++ cfe/trunk/unittests/Format/FormatTest.cpp Thu Aug 31 11:49:34 2017
@@ -3440,6 +3440,10 @@ TEST_F(FormatTest, BreakConstructorIniti
+// Expensive checks enables libstdc++ checking which includes validating the
+// state of ranges used in std::priority_queue - this blows out the
+// runtime/scalability of the function and makes this test unacceptably slow.
 TEST_F(FormatTest, MemoizationTests) {
   // This breaks if the memoization lookup does not take \c Indent and
   // \c LastSpace into account.
@@ -3518,6 +3522,7 @@ TEST_F(FormatTest, MemoizationTests) {
   input += "           a) {}";
   verifyFormat(input, OnePerLine);
 TEST_F(FormatTest, BreaksAsHighAsPossible) {

More information about the cfe-commits mailing list