[PATCH] D150797: Turn unreachable error into assert
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 00:27:53 PDT 2023
jhenderson added inline comments.
================
Comment at: llvm/lib/FileCheck/FileCheck.cpp:148-150
bool MissingFormPrefix = AlternateForm && !StrVal.consume_front("0x");
+ (void)MissingFormPrefix;
+ assert(!MissingFormPrefix && "missing alternate form prefix");
----------------
I'd get rid of the unnecessary temporary and just do the calculation inline.
Also, is this the right place for the assert? Previously the error was later in the code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150797/new/
https://reviews.llvm.org/D150797
More information about the llvm-commits
mailing list