summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-05 13:27:55 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-10-06 16:57:23 +0200
commit1cccad3dd24e4a5cf5d7299326ae302e71980971 (patch)
treeea958744863623e44b50642e0a2ec8a3c015052c /compilerplugins
parentcb060c2fe9e03b49953f43ab605559c4542e2ae4 (diff)
replace throw with abort
There is nothing catching the exception anyway, and this fails to compile if compiling the plugin with Clang's CXXFLAGS (which include -fno-exceptions). Change-Id: Iad9316ad9613e4fd66d0e5a16fd71bbb8066cc2b Reviewed-on: https://gerrit.libreoffice.org/80299 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/flatten.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/compilerplugins/clang/flatten.cxx b/compilerplugins/clang/flatten.cxx
index e56d21603774..81f897cb0ee3 100644
--- a/compilerplugins/clang/flatten.cxx
+++ b/compilerplugins/clang/flatten.cxx
@@ -474,7 +474,10 @@ std::string stripOpenAndCloseBrace(std::string s)
{
size_t i = s.find("{");
if (i == std::string::npos)
- throw "did not find {";
+ {
+ assert( !"did not find {" );
+ abort();
+ }
++i;
// strip to line end
@@ -486,7 +489,10 @@ std::string stripOpenAndCloseBrace(std::string s)
i = s.rfind("}");
if (i == std::string::npos)
- throw "did not find }";
+ {
+ assert( !"did not find }" );
+ abort();
+ }
--i;
while (s[i] == ' ')
--i;