aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/FileCheck/FileCheckImpl.h
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2023-06-30 23:29:12 +0100
committerThomas Preud'homme <thomas.preudhomme@arm.com>2023-08-07 21:27:44 +0100
commitb743c19360a67af4a709bd839e8c80ad17f71a1c (patch)
tree007b6c470db338ae93ab2fe079c245a19e938a18 /llvm/lib/FileCheck/FileCheckImpl.h
parent4dce6d3061358dae6f61f1aa0b578e19c9a95151 (diff)
downloadllvm-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.h7
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