[PATCH] D139298: WIP: Add error handling to demangle API
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 01:08:34 PST 2023
jhenderson added inline comments.
================
Comment at: llvm/unittests/Demangle/DemangleTest.cpp:38
+ EXPECT_TRUE(itaniumDemangle("_Z3fooi", E));
+ EXPECT_TRUE(E == DemangleError::Success);
+
----------------
Here and below, can you use `EXPECT_EQ(E, DemangleError::Success)` (or equivalent)? This provides nicer error messages since it gives the actual value if the two aren't the same.
================
Comment at: llvm/unittests/Demangle/DemangleTest.cpp:41
+ // A string that shouldn't be handled by this demangler
+ // should return InvaildFormat
+ EXPECT_FALSE(itaniumDemangle("_", E));
----------------
The comment seems to be wrapped a bit early too?
Also applies below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139298/new/
https://reviews.llvm.org/D139298
More information about the llvm-commits
mailing list