[PATCH] D91600: [llvm] NFC: Cleanup llvm-yaml-numeric-parser-fuzzer
Kirill Bobyrev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 15 05:53:38 PST 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGeefd620a2572: [llvm] NFC: Cleanup llvm-yaml-numeric-parser-fuzzer (authored by kbobyrev).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91600/new/
https://reviews.llvm.org/D91600
Files:
llvm/tools/llvm-yaml-numeric-parser-fuzzer/yaml-numeric-parser-fuzzer.cpp
Index: llvm/tools/llvm-yaml-numeric-parser-fuzzer/yaml-numeric-parser-fuzzer.cpp
===================================================================
--- llvm/tools/llvm-yaml-numeric-parser-fuzzer/yaml-numeric-parser-fuzzer.cpp
+++ llvm/tools/llvm-yaml-numeric-parser-fuzzer/yaml-numeric-parser-fuzzer.cpp
@@ -9,15 +9,14 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Regex.h"
#include "llvm/Support/YAMLTraits.h"
-#include <cassert>
#include <string>
-llvm::Regex Infinity("^[-+]?(\\.inf|\\.Inf|\\.INF)$");
-llvm::Regex Base8("^0o[0-7]+$");
-llvm::Regex Base16("^0x[0-9a-fA-F]+$");
-llvm::Regex Float("^[-+]?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?)([eE][-+]?[0-9]+)?$");
-
inline bool isNumericRegex(llvm::StringRef S) {
+ static llvm::Regex Infinity("^[-+]?(\\.inf|\\.Inf|\\.INF)$");
+ static llvm::Regex Base8("^0o[0-7]+$");
+ static llvm::Regex Base16("^0x[0-9a-fA-F]+$");
+ static llvm::Regex Float(
+ "^[-+]?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?)([eE][-+]?[0-9]+)?$");
if (S.equals(".nan") || S.equals(".NaN") || S.equals(".NAN"))
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91600.323726.patch
Type: text/x-patch
Size: 1068 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210215/59235d46/attachment.bin>
More information about the llvm-commits
mailing list