[PATCH] D111416: [Demangle] Add minimal support for D simple basic types
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 17:58:49 PST 2022
dblaikie added inline comments.
================
Comment at: llvm/lib/Demangle/DLangDemangle.cpp:275
+const char *Demangler::parseType(const char *Mangled) {
+ if (Mangled == nullptr || *Mangled == '\0')
+ return nullptr;
----------------
Looks like this function is currently never called with a null parameter (the one call is inside an `if (Mangled != nullptr)` block). So this should probably be omitted, or replaced with an assertion.
Is the other condition (`== '\0'`) reachable/tested? (I guess it'd fall out naturally from the switch case below - so maybe that could be done instead and this if test/early return could be removed?)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111416/new/
https://reviews.llvm.org/D111416
More information about the llvm-commits
mailing list