]> granicus.if.org Git - re2c/commitdiff
Fixed Clang warning -Wunreachable-code (these were real serious errors).
authorUlya Trofimovich <skvadrik@gmail.com>
Sat, 13 Jul 2019 10:25:25 +0000 (11:25 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sat, 13 Jul 2019 10:25:25 +0000 (11:25 +0100)
lib/regexec_nfa_leftmost_trie.cc
lib/regexec_nfa_posix_trie.cc

index 6428e2bf62649f425b8fe24590be6b7ac80164ac..37d9cc5611a69bf9d4c98b70634298c9f517c22b 100644 (file)
@@ -33,8 +33,8 @@ int regexec_nfa_leftmost_trie(const regex_t *preg, const char *string
     }
     make_final_step(ctx);
 
-    return finalize(ctx, string, nmatch, pmatch);
     ctx.history.cache.clear();
+    return finalize(ctx, string, nmatch, pmatch);
 }
 
 void make_step(lzsimctx_t &ctx, uint32_t sym)
index ce0620984e17b520db48ea88f4bb1b9bfb0af021..90e9ec037c9c83774c050ec538a22c20c89c70d1 100644 (file)
@@ -39,8 +39,8 @@ int regexec_nfa_posix_trie(const regex_t *preg, const char *string
     }
     make_final_step(ctx);
 
-    return finalize(ctx, string, nmatch, pmatch);
     ctx.history.cache.clear();
+    return finalize(ctx, string, nmatch, pmatch);
 }
 
 void closure_posix(pzsimctx_t &ctx)