[PATCH] D82630: [ObjectYAML][DWARF] Collect diagnostic message when YAMLParser fails.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 26 04:50:54 PDT 2020


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

Great, LGTM, with one nit.



================
Comment at: llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp:24
+  auto SectionsOrErr = DWARFYAML::emitDebugSections(Yaml);
+  ASSERT_THAT_EXPECTED(SectionsOrErr, Succeeded());
+}
----------------
Since you don't do anything with the expected after this, this can just be `EXPECT_THAT_EXPECTED` - `ASSERT_THAT_EXPECTED` terminates the current test rather than allowing it to continue. This isn't relevant currently, but might be important should the test be extended to check the values that have been parsed. I don't think testing the values needs doing in this patch though, since this patch is about error handling.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82630/new/

https://reviews.llvm.org/D82630





More information about the llvm-commits mailing list