[PATCH] D60390: FileCheck [10/12]: Add support for signed numeric values
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 03:11:27 PDT 2020
arichardson added inline comments.
================
Comment at: llvm/unittests/Support/FileCheckTest.cpp:461
std::unique_ptr<ExpressionLiteral> Ten =
- std::make_unique<ExpressionLiteral>(bufferize(SM, "10"), 10);
+ std::make_unique<ExpressionLiteral>(bufferize(SM, "10"), (uint64_t)10);
ExpressionLiteral *TenPtr = Ten.get();
----------------
jhenderson wrote:
> `10ull` would be more typical, I'd think, here and elsewhere. Any particular reason you've chosen the cast?
`ull` is not guaranteed to be the same as a uint64_t constant since some platforms use unsigned long instead of unsigned long long. stdint.h provides `UINT64_C(10)` if you want to avoid the cast.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60390/new/
https://reviews.llvm.org/D60390
More information about the llvm-commits
mailing list