[llvm] r338768 - [Unittests] Fix returning string in SolveQuadraticEquationWrap
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 13:45:06 PDT 2018
Author: kparzysz
Date: Thu Aug 2 13:45:06 2018
New Revision: 338768
URL: http://llvm.org/viewvc/llvm-project?rev=338768&view=rev
Log:
[Unittests] Fix returning string in SolveQuadraticEquationWrap
Returning a Twine caused runtime failures. Convert it to std::string
before retuning.
Modified:
llvm/trunk/unittests/ADT/APIntTest.cpp
Modified: llvm/trunk/unittests/ADT/APIntTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/APIntTest.cpp?rev=338768&r1=338767&r2=338768&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/APIntTest.cpp (original)
+++ llvm/trunk/unittests/ADT/APIntTest.cpp Thu Aug 2 13:45:06 2018
@@ -2381,9 +2381,9 @@ TEST(APIntTest, SolveQuadraticEquationWr
};
auto EquationToString = [&] (const char *X_str) {
- return Twine(A) + Twine(X_str) + Twine("^2 + ") + Twine(B) +
- Twine(X_str) + Twine(" + ") + Twine(C) + Twine(", bitwidth: ") +
- Twine(Width);
+ return (Twine(A) + Twine(X_str) + Twine("^2 + ") + Twine(B) +
+ Twine(X_str) + Twine(" + ") + Twine(C) + Twine(", bitwidth: ") +
+ Twine(Width)).str();
};
auto IsSolution = [&] (const char *X_str, int X) {
More information about the llvm-commits
mailing list