[PATCH] D27464: Use the fallible llvm::Regex constructor in Clang.
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 17:37:13 PST 2016
vsk added inline comments.
================
Comment at: lib/Driver/Multilib.cpp:220
#ifndef NDEBUG
- std::string Error;
- if (!R.isValid(Error)) {
- llvm::errs() << Error;
+ llvm::errs() << R.takeError();
+#endif
----------------
I have the same comments about this patch as I did re: D27465, but I thought I'd chime in here with an extra warning.
I don't think this will compile. The errs() object doesn't take ownership of the Error or check it. Better to write: `llvm::toString(R.takeError())`.
https://reviews.llvm.org/D27464
More information about the llvm-commits
mailing list