This revision was automatically updated to reflect the committed changes. Closed by commit rG664ce34e81d9: [clang-format] Quit analyzing solution space for large state count (authored by owenpan).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128574/new/ https://reviews.llvm.org/D128574 Files: clang/lib/Format/UnwrappedLineFormatter.cpp Index: clang/lib/Format/UnwrappedLineFormatter.cpp =================================================================== --- clang/lib/Format/UnwrappedLineFormatter.cpp +++ clang/lib/Format/UnwrappedLineFormatter.cpp @@ -1163,6 +1163,10 @@ // While not empty, take first element and follow edges. while (!Queue.empty()) { + // Quit if we still haven't found a solution by now. + if (Count > 25000000) + return 0; + Penalty = Queue.top().first.first; StateNode *Node = Queue.top().second; if (!Node->State.NextToken) {
Index: clang/lib/Format/UnwrappedLineFormatter.cpp =================================================================== --- clang/lib/Format/UnwrappedLineFormatter.cpp +++ clang/lib/Format/UnwrappedLineFormatter.cpp @@ -1163,6 +1163,10 @@ // While not empty, take first element and follow edges. while (!Queue.empty()) { + // Quit if we still haven't found a solution by now. + if (Count > 25000000) + return 0; + Penalty = Queue.top().first.first; StateNode *Node = Queue.top().second; if (!Node->State.NextToken) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits