[PATCH] D48909: [clang-doc] Update BitcodeReader to use llvm::Error

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 9 14:34:44 PDT 2018


leonardchan added a comment.

Should there be any tests associated with these changes?



================
Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:308
-  llvm::errs() << "Invalid type for info.\n";
-  exit(1);
 }
----------------
Probably not important or it's just me being picky/dumb, but is this exit the intended behavior of this program when reaching this function? If so, should the exit also be expected even when using llvm::Error?

This also applies to the other times exit() is called in these add functions.


================
Comment at: clang-tools-extra/clang-doc/BitcodeReader.cpp:311
 
-template <> void addTypeInfo(RecordInfo *I, MemberTypeInfo &&T) {
   I->Members.emplace_back(std::move(T));
----------------
Is it necessary to change the return value to llvm::Error for what were originally void functions?


https://reviews.llvm.org/D48909





More information about the cfe-commits mailing list