diff options
author | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2023-06-30 23:29:12 +0100 |
---|---|---|
committer | Thomas Preud'homme <thomas.preudhomme@arm.com> | 2023-08-07 21:27:44 +0100 |
commit | b743c19360a67af4a709bd839e8c80ad17f71a1c (patch) | |
tree | 007b6c470db338ae93ab2fe079c245a19e938a18 /llvm/lib/FileCheck/FileCheckImpl.h | |
parent | 4dce6d3061358dae6f61f1aa0b578e19c9a95151 (diff) | |
download | llvm-b743c19360a67af4a709bd839e8c80ad17f71a1c.zip llvm-b743c19360a67af4a709bd839e8c80ad17f71a1c.tar.gz llvm-b743c19360a67af4a709bd839e8c80ad17f71a1c.tar.bz2 |
[FileCheck] Turn errors into assert in valueFromStringRepr()
getWildcardRegex() guarantees that only valid hex numbers are matched by
FileCheck numeric expressions. This commit therefore only asserts the
lack of parsing failure in valueFromStringRepr().
Depends On D154430
Reviewed By: arichardson
Differential Revision: https://reviews.llvm.org/D154431
Diffstat (limited to 'llvm/lib/FileCheck/FileCheckImpl.h')
-rw-r--r-- | llvm/lib/FileCheck/FileCheckImpl.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/FileCheck/FileCheckImpl.h b/llvm/lib/FileCheck/FileCheckImpl.h index f5f8ea2..c154616 100644 --- a/llvm/lib/FileCheck/FileCheckImpl.h +++ b/llvm/lib/FileCheck/FileCheckImpl.h @@ -96,11 +96,8 @@ public: Expected<std::string> getMatchingString(APInt Value) const; /// \returns the value corresponding to string representation \p StrVal - /// according to the matching format represented by this instance or an error - /// with diagnostic against \p SM if \p StrVal does not correspond to a valid - /// and representable value. - Expected<APInt> valueFromStringRepr(StringRef StrVal, - const SourceMgr &SM) const; + /// according to the matching format represented by this instance. + APInt valueFromStringRepr(StringRef StrVal, const SourceMgr &SM) const; }; /// Class to represent an overflow error that might result when manipulating a |